忘记改啥了

This commit is contained in:
zhangpeng 2025-06-25 18:10:46 +08:00
parent 4415269f51
commit fa5a44bcbf
3 changed files with 65 additions and 2 deletions

58
.vscode/settings.json vendored
View File

@ -4,6 +4,62 @@
"*.db": "db",
"*.json": "jsonl",
"gst.h": "c",
"rtsp-server.h": "c"
"rtsp-server.h": "c",
"ostream": "cpp",
"array": "cpp",
"atomic": "cpp",
"bit": "cpp",
"cctype": "cpp",
"clocale": "cpp",
"cmath": "cpp",
"compare": "cpp",
"concepts": "cpp",
"condition_variable": "cpp",
"cstdarg": "cpp",
"cstddef": "cpp",
"cstdint": "cpp",
"cstdio": "cpp",
"cstdlib": "cpp",
"cstring": "cpp",
"ctime": "cpp",
"cwchar": "cpp",
"cwctype": "cpp",
"deque": "cpp",
"map": "cpp",
"string": "cpp",
"unordered_map": "cpp",
"vector": "cpp",
"exception": "cpp",
"algorithm": "cpp",
"functional": "cpp",
"iterator": "cpp",
"memory": "cpp",
"memory_resource": "cpp",
"numeric": "cpp",
"optional": "cpp",
"random": "cpp",
"ratio": "cpp",
"string_view": "cpp",
"system_error": "cpp",
"tuple": "cpp",
"type_traits": "cpp",
"utility": "cpp",
"fstream": "cpp",
"initializer_list": "cpp",
"iomanip": "cpp",
"iosfwd": "cpp",
"iostream": "cpp",
"istream": "cpp",
"limits": "cpp",
"mutex": "cpp",
"new": "cpp",
"numbers": "cpp",
"semaphore": "cpp",
"sstream": "cpp",
"stdexcept": "cpp",
"stop_token": "cpp",
"streambuf": "cpp",
"thread": "cpp",
"typeinfo": "cpp"
}
}

View File

@ -38,6 +38,13 @@ VmbErrorType ApiController::StartContinuousImageAcquisition(const std::string &r
VmbAccessModeFull,
m_pCamera);
if (VmbErrorSuccess == res) {
std::cerr << "StartContinuousImageAcquisition failed with error code: " << res << std::endl;
// 可以添加更多错误信息
if (res == VmbErrorApiNotStarted) {
std::cerr << "Vimba API not started" << std::endl;
} else if (res == VmbErrorInvalidAccess) {
std::cerr << "Invalid access to camera" << std::endl;
}
FeaturePtr pFormatFeature;
res = m_pCamera->GetFeatureByName("PixelFormat", pFormatFeature);
if (VmbErrorSuccess == res) {

View File

@ -13,7 +13,7 @@ static int v4l2_fd = -1;
* V4L2虚拟设备
*/
bool init_v4l2_device(int width, int height) {
v4l2_fd = open("/dev/video0", O_RDWR);
v4l2_fd = open("/dev/video62", O_RDWR);
if (v4l2_fd < 0) {
fprintf(stderr, "Failed to open V4L2 device\n");
return false;