finnal
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
all:sendGpioSignal
|
all:sendGpioSignal
|
||||||
|
|
||||||
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
|
mv sendGpioSignal ../bin
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
#include <thread>
|
#include <thread>
|
||||||
#include <wiringPi.h>
|
#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 std;
|
||||||
using namespace QCL;
|
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推流
|
1.启动RTSP推流
|
||||||
2.启动系统各项服务,用于和双目交互
|
2.启动系统各项服务,用于和双目交互
|
||||||
3.启动mqtt,与App进行数据交互
|
3.启动mqtt,与App进行数据交互
|
||||||
|
|
||||||
|
认证失败则会退出程序
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
@@ -101,8 +103,8 @@ void getMsgCallback(mqtt::const_message_ptr msg);
|
|||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
// 开启4G模块
|
// 开启4G模块
|
||||||
// StartNet();
|
StartNet();
|
||||||
// this_thread::sleep_for(chrono::seconds(2));
|
this_thread::sleep_for(chrono::seconds(2));
|
||||||
|
|
||||||
// 关闭全部信号
|
// 关闭全部信号
|
||||||
blockAllSignals();
|
blockAllSignals();
|
||||||
@@ -115,8 +117,6 @@ int main(int argc, char *argv[])
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 验证成功,启动程序
|
|
||||||
|
|
||||||
// 初始化mqtt
|
// 初始化mqtt
|
||||||
mqttInit();
|
mqttInit();
|
||||||
|
|
||||||
@@ -280,7 +280,7 @@ void getMsgCallback(mqtt::const_message_ptr msg)
|
|||||||
// 开启服务:fastApi,pub
|
// 开启服务:fastApi,pub
|
||||||
void StartService()
|
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());
|
system(commnd.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -376,7 +376,13 @@ void OpenRTSP()
|
|||||||
void VideoStream()
|
void VideoStream()
|
||||||
{
|
{
|
||||||
// 静音ffmpeg的统计输出,保留错误;避免污染日志
|
// 静音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});
|
video_proc = bp::child("/bin/bash", bp::args = {"-c", commnd});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user