修复4G串口打不开,程序启动失败问题

This commit is contained in:
2026-03-05 13:40:03 +08:00
parent 0448084da5
commit 99ad0a33df
6 changed files with 169 additions and 16 deletions

Binary file not shown.

View File

@@ -839,6 +839,7 @@ bool videoInit(VideoCapture &cap)
cap.set(CAP_PROP_FRAME_HEIGHT, 480);
cap.set(CAP_PROP_FPS, 30);
cap.set(CAP_PROP_BUFFERSIZE, 1);
// 尝试 MJPG若不支持则忽略
cap.set(CAP_PROP_FOURCC, VideoWriter::fourcc('M', 'J', 'P', 'G'));
double fccv = cap.get(CAP_PROP_FOURCC);
@@ -887,6 +888,7 @@ bool processFrame(VideoCapture &cap, FILE *pipe, Mat &frame, int64 &count, chron
this_thread::sleep_for(50ms);
return true;
}
handleFrame = frame;
vector<Dection> destCopy;