From 59866172501d1844de889a031cf8359e9cd7b9a6 Mon Sep 17 00:00:00 2001 From: xtkuang <87661715@qq.com> Date: Mon, 7 Sep 2026 14:39:14 +0800 Subject: [PATCH] update --- .../common/media/ffmpeg/camera_capture.cpp | 8 +-- cmvr-es/config/devices/camera/camera.pb.txt | 68 +++++++++++++------ .../devices/microphone/microphone.pb.txt | 2 +- 3 files changed, 48 insertions(+), 30 deletions(-) diff --git a/cmvr-es/common/media/ffmpeg/camera_capture.cpp b/cmvr-es/common/media/ffmpeg/camera_capture.cpp index d8f2c61a..fe0511c9 100644 --- a/cmvr-es/common/media/ffmpeg/camera_capture.cpp +++ b/cmvr-es/common/media/ffmpeg/camera_capture.cpp @@ -62,16 +62,10 @@ int CameraCapture::initialize(const Config& config) { } int CameraCapture::init_device() { - AVInputFormat* input_fmt = nullptr; std::string device_path; -#ifdef _WIN32 - input_fmt = av_find_input_format("dshow"); - device_path = "video=" + config_.device_name; -#else - input_fmt = av_find_input_format("v4l2"); + auto input_fmt = av_find_input_format("v4l2"); device_path = config_.device_name; -#endif if (!input_fmt) { CMVR_LOG(ERROR) << "找不到输入格式"; diff --git a/cmvr-es/config/devices/camera/camera.pb.txt b/cmvr-es/config/devices/camera/camera.pb.txt index 25d29ab9..129ddb8d 100644 --- a/cmvr-es/config/devices/camera/camera.pb.txt +++ b/cmvr-es/config/devices/camera/camera.pb.txt @@ -101,28 +101,6 @@ camera { } } - cameras { - id: "left_eye_cam" - uvc { - usb: "/dev/uvc_left_camera" - camera_mode: CAMERA_MODE_VIDEO - capture { - width: 640 - height: 480 - fps: 30 - stream_mode: STREAM_MODE_RGB - } - encoder { - width: 640 - height: 480 - fps: 30 - codec: "H265" - enable_stream_timestamp: true - buffer_size: 30 - } - } - } - cameras { id: "cam5" realsense { @@ -185,4 +163,50 @@ camera { buffer_size: 30 } } + + cameras { + id: "real_cam1" + realsense { + serialNumber: "332522076896" + camera_mode: CAMERA_MODE_VIDEO + capture { + width: 640 + height: 480 + fps: 30 + stream_mode: STREAM_MODE_RGBD + } + encoder { + width: 640 + height: 480 + fps: 30 + codec: "h265_qsv" + enable_stream_timestamp: true + buffer_size: 30 + } + align_mode: ALIGN_MODE_COLOR + sync: false + } + } + + cameras { + id: "usb_cam1" + uvc { + usb: "/dev/video0" + camera_mode: CAMERA_MODE_VIDEO + capture { + width: 640 + height: 480 + fps: 30 + stream_mode: STREAM_MODE_RGB + } + encoder { + width: 640 + height: 480 + fps: 30 + codec: "h265_qsv" + enable_stream_timestamp: true + buffer_size: 30 + } + } + } } diff --git a/cmvr-es/config/devices/microphone/microphone.pb.txt b/cmvr-es/config/devices/microphone/microphone.pb.txt index 9ceba156..e4a2f372 100644 --- a/cmvr-es/config/devices/microphone/microphone.pb.txt +++ b/cmvr-es/config/devices/microphone/microphone.pb.txt @@ -5,7 +5,7 @@ microphone { channels: 2 sampleRate: 48000 volume: 100 - input_device: "default" + input_device: "pulse" } } }