finnal
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
all:sendGpioSignal
|
||||
|
||||
sendGpioSignal:
|
||||
g++ -g -o sendGpioSignal sendGpioSignal.cpp /home/orangepi/RKApp/ApCreate/NetraLib/src/Netra.cpp -I/home/orangepi/RKApp/ApCreate/NetraLib/include -lwiringPi
|
||||
g++ -g -o sendGpioSignal sendGpioSignal.cpp //home/orangepi/RKApp/softWareInit/NetraLib/src/Netra.cpp -I/home/orangepi/RKApp/softWareInit/NetraLib/include -lwiringPi
|
||||
|
||||
mv sendGpioSignal ../bin
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
#include <thread>
|
||||
#include <wiringPi.h>
|
||||
|
||||
#include "/home/orangepi/RKApp/ApCreate/NetraLib/include/Netra.hpp"
|
||||
#include "/home/orangepi/RKApp/softWareInit/NetraLib/include/Netra.hpp"
|
||||
|
||||
using namespace std;
|
||||
using namespace QCL;
|
||||
|
||||
5074
PyApp/upload.log
5074
PyApp/upload.log
File diff suppressed because it is too large
Load Diff
Binary file not shown.
@@ -4,6 +4,8 @@
|
||||
1.启动RTSP推流
|
||||
2.启动系统各项服务,用于和双目交互
|
||||
3.启动mqtt,与App进行数据交互
|
||||
|
||||
认证失败则会退出程序
|
||||
*/
|
||||
|
||||
#include <iostream>
|
||||
@@ -101,8 +103,8 @@ void getMsgCallback(mqtt::const_message_ptr msg);
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
// 开启4G模块
|
||||
// StartNet();
|
||||
// this_thread::sleep_for(chrono::seconds(2));
|
||||
StartNet();
|
||||
this_thread::sleep_for(chrono::seconds(2));
|
||||
|
||||
// 关闭全部信号
|
||||
blockAllSignals();
|
||||
@@ -115,8 +117,6 @@ int main(int argc, char *argv[])
|
||||
return 0;
|
||||
}
|
||||
|
||||
// 验证成功,启动程序
|
||||
|
||||
// 初始化mqtt
|
||||
mqttInit();
|
||||
|
||||
@@ -280,7 +280,7 @@ void getMsgCallback(mqtt::const_message_ptr msg)
|
||||
// 开启服务:fastApi,pub
|
||||
void StartService()
|
||||
{
|
||||
string commnd = "echo 'orangepi' | sudo -S ../../StartService/bin/start start";
|
||||
string commnd = "echo 'orangepi' | sudo -S -E env PATH=$PATH ../../StartService/bin/start start";
|
||||
system(commnd.c_str());
|
||||
}
|
||||
|
||||
@@ -376,7 +376,13 @@ void OpenRTSP()
|
||||
void VideoStream()
|
||||
{
|
||||
// 静音ffmpeg的统计输出,保留错误;避免污染日志
|
||||
string commnd = "ffmpeg -nostats -hide_banner -loglevel error -f v4l2 -i /dev/video0 -c:v h264_rkmpp -rtsp_transport tcp -f rtsp rtsp://192.168.12.1:8554/stream 2>/dev/null";
|
||||
// string commnd = "ffmpeg -nostats -hide_banner -loglevel error -f v4l2 -i /dev/video0 -c:v h264_rkmpp -rtsp_transport tcp -f rtsp rtsp://192.168.12.1:8554/stream 2>/dev/null";
|
||||
string commnd =
|
||||
"VIDEO_SIZE=$(xdpyinfo | awk '/dimensions:/ {print $2}'); "
|
||||
"DISPLAY_VAL=${DISPLAY:-:0.0}; "
|
||||
"ffmpeg -nostats -hide_banner -loglevel error "
|
||||
"-f x11grab -framerate 15 -video_size \"$VIDEO_SIZE\" -i \"$DISPLAY_VAL\" "
|
||||
"-c:v h264_rkmpp -b:v 2000k -f rtsp rtsp://192.168.12.1:8554/stream 2>/dev/null";
|
||||
video_proc = bp::child("/bin/bash", bp::args = {"-c", commnd});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user