summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDavid Plowman <david.plowman@raspberrypi.com>2021-12-10 14:44:21 +0000
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2021-12-13 11:29:01 +0200
commitc8a4b52e3aa3b4724b482c42cb20c3fda7e6572c (patch)
tree904495f6dc7cdbfcf40f040aef412f2a80cdaffe /include
parent3e520cadf18ac53eed0fc98fb1d58368ef80a61d (diff)
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 <david.plowman@raspberrypi.com> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'include')
-rw-r--r--include/libcamera/internal/v4l2_subdevice.h3
1 files changed, 3 insertions, 0 deletions
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 <memory>
+#include <optional>
#include <string>
#include <vector>
#include <libcamera/base/class.h>
#include <libcamera/base/log.h>
+#include <libcamera/color_space.h>
#include <libcamera/geometry.h>
#include "libcamera/internal/formats.h"
@@ -27,6 +29,7 @@ class MediaDevice;
struct V4L2SubdeviceFormat {
uint32_t mbus_code;
Size size;
+ std::optional<ColorSpace> colorSpace;
const std::string toString() const;
uint8_t bitsPerPixel() const;