From c8a4b52e3aa3b4724b482c42cb20c3fda7e6572c Mon Sep 17 00:00:00 2001 From: David Plowman Date: Fri, 10 Dec 2021 14:44:21 +0000 Subject: libcamera: v4l2_subdevice: Add colorSpace field to V4L2SubdeviceFormat This adds a ColorSpace field to the V4L2SubdeviceFormat so that we can set and request particular color spaces from V4L2. This commit simply adds the field and fixes some occurrences of brace initializers that would otherwise be broken. A subsequent commit will pass and retrieve the value correctly to/from V4l2 itself. Signed-off-by: David Plowman Reviewed-by: Jacopo Mondi Reviewed-by: Laurent Pinchart Signed-off-by: Laurent Pinchart --- include/libcamera/internal/v4l2_subdevice.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include') diff --git a/include/libcamera/internal/v4l2_subdevice.h b/include/libcamera/internal/v4l2_subdevice.h index a6873b67..58d1e511 100644 --- a/include/libcamera/internal/v4l2_subdevice.h +++ b/include/libcamera/internal/v4l2_subdevice.h @@ -8,12 +8,14 @@ #pragma once #include +#include #include #include #include #include +#include #include #include "libcamera/internal/formats.h" @@ -27,6 +29,7 @@ class MediaDevice; struct V4L2SubdeviceFormat { uint32_t mbus_code; Size size; + std::optional colorSpace; const std::string toString() const; uint8_t bitsPerPixel() const; -- cgit v1.2.1