fix: 树莓派gstreamer pipeline报错

This commit is contained in:
grabbit 2025-04-05 16:40:02 +08:00
parent fdc1b81715
commit 90f757a524

View File

@ -69,7 +69,7 @@ impl OpenCVCamera {
path_str path_str
); );
info!("Using GStreamer pipeline: {}", pipeline); info!("Using GStreamer pipeline: {}", pipeline);
return Ok(videoio::VideoCapture::from_file(&pipeline, videoio::CAP_FFMPEG)?); return Ok(videoio::VideoCapture::from_file(path_str, videoio::CAP_V4L2)?);
} else { } else {
return Err(anyhow!("Invalid device number in path: {}", path_str)); return Err(anyhow!("Invalid device number in path: {}", path_str));
} }