From fa5a44bcbf97fa6331e7f640f289c53ca7a96b4c Mon Sep 17 00:00:00 2001 From: zhangpeng Date: Wed, 25 Jun 2025 18:10:46 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BF=98=E8=AE=B0=E6=94=B9=E5=95=A5=E4=BA=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .vscode/settings.json | 58 ++++++++++++++++++- .../VirtualCamera/Source/ApiController.cpp | 7 +++ VisionSDK_C_GCC9.3.0_armv8/SampleCopy.c | 2 +- 3 files changed, 65 insertions(+), 2 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index a669ac7..83e0d3d 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -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" } } \ No newline at end of file diff --git a/Vimba_6_0/VimbaCPP/Examples/AsynchronousGrab/VirtualCamera/Source/ApiController.cpp b/Vimba_6_0/VimbaCPP/Examples/AsynchronousGrab/VirtualCamera/Source/ApiController.cpp index 493e1c1..d31c0f2 100644 --- a/Vimba_6_0/VimbaCPP/Examples/AsynchronousGrab/VirtualCamera/Source/ApiController.cpp +++ b/Vimba_6_0/VimbaCPP/Examples/AsynchronousGrab/VirtualCamera/Source/ApiController.cpp @@ -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) { diff --git a/VisionSDK_C_GCC9.3.0_armv8/SampleCopy.c b/VisionSDK_C_GCC9.3.0_armv8/SampleCopy.c index 78b44da..c772ee7 100644 --- a/VisionSDK_C_GCC9.3.0_armv8/SampleCopy.c +++ b/VisionSDK_C_GCC9.3.0_armv8/SampleCopy.c @@ -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;