[libcamera-devel] [fixup: v2 4/8] fixup! libcamera: v4l2_videodevice: Reintroduce toV4L2PixelFormat()
Jacopo Mondi
jacopo at jmondi.org
Sat Jul 23 12:24:26 CEST 2022
Add two missing conversions.
To be fixed up in the next iteration.
---
src/libcamera/pipeline/simple/simple.cpp | 2 +-
src/libcamera/pipeline/uvcvideo/uvcvideo.cpp | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/libcamera/pipeline/simple/simple.cpp b/src/libcamera/pipeline/simple/simple.cpp
index 65a483c14379..05ae7d392603 100644
--- a/src/libcamera/pipeline/simple/simple.cpp
+++ b/src/libcamera/pipeline/simple/simple.cpp
@@ -1028,7 +1028,7 @@ int SimplePipelineHandler::configure(Camera *camera, CameraConfiguration *c)
return ret;
/* Configure the video node. */
- V4L2PixelFormat videoFormat = V4L2PixelFormat::fromPixelFormat(pipeConfig->captureFormat)[0];
+ V4L2PixelFormat videoFormat = video->toV4L2PixelFormat(pipeConfig->captureFormat);
V4L2DeviceFormat captureFormat;
captureFormat.fourcc = videoFormat;
diff --git a/src/libcamera/pipeline/uvcvideo/uvcvideo.cpp b/src/libcamera/pipeline/uvcvideo/uvcvideo.cpp
index cf870d26e3c3..fbe02cdcd520 100644
--- a/src/libcamera/pipeline/uvcvideo/uvcvideo.cpp
+++ b/src/libcamera/pipeline/uvcvideo/uvcvideo.cpp
@@ -213,7 +213,7 @@ int PipelineHandlerUVC::configure(Camera *camera, CameraConfiguration *config)
return ret;
if (format.size != cfg.size ||
- format.fourcc != V4L2PixelFormat::fromPixelFormat(cfg.pixelFormat)[0])
+ format.fourcc != data->video_->toV4L2PixelFormat(cfg.pixelFormat))
return -EINVAL;
cfg.setStream(&data->stream_);
--
2.37.1
More information about the libcamera-devel
mailing list