This commit is contained in:
xtkuang 2026-09-07 14:39:14 +08:00
parent 98b720ec07
commit 5986617250
3 changed files with 48 additions and 30 deletions

View File

@ -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) << "找不到输入格式";

View File

@ -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
}
}
}
}

View File

@ -5,7 +5,7 @@ microphone {
channels: 2
sampleRate: 48000
volume: 100
input_device: "default"
input_device: "pulse"
}
}
}