path: root/src/libcamera
diff options
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2022-08-28 04:42:12 +0300
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2022-09-01 22:41:01 +0300
commit6b3f8a78750fb6ad87f15fdecba5c5a49ceaf6e5 (patch)
treedb7050eb81e34a37292fa2ac0aa2137f498fb324 /src/libcamera
parentfc9783acc6083a59fae8bca1ce49635e59afa355 (diff)
pipeline: uvcvideo: Add color space support
Add support for color space to the uvcvideo pipeline handler. UVC devices have a fixed color space per format, so only the validate() function needs to be extended to retrieve the color space from the kernel. There is no need to pass the value back to the driver in configure(). Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Umang Jain <umang.jain@ideasonboard.com>
Diffstat (limited to 'src/libcamera')
1 files changed, 5 insertions, 0 deletions
diff --git a/src/libcamera/pipeline/uvcvideo/uvcvideo.cpp b/src/libcamera/pipeline/uvcvideo/uvcvideo.cpp
index 9cbf126a..2ae640a3 100644
--- a/src/libcamera/pipeline/uvcvideo/uvcvideo.cpp
+++ b/src/libcamera/pipeline/uvcvideo/uvcvideo.cpp
@@ -159,6 +159,11 @@ CameraConfiguration::Status UVCCameraConfiguration::validate()
cfg.stride = format.planes[0].bpl;
cfg.frameSize = format.planes[0].size;
+ if (cfg.colorSpace != format.colorSpace) {
+ cfg.colorSpace = format.colorSpace;
+ status = Adjusted;
+ }
return status;

Privacy Policy