summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDavid Plowman <david.plowman@raspberrypi.com>2021-12-10 14:44:18 +0000
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2021-12-13 11:29:01 +0200
commit96f990ea6c8c0e3dbcb6b1c6f379fcc341529ea8 (patch)
tree7254616a721d10a85fbee49acddedf6d166613ff /include
parentddb5e9d37e05ec85da26aaf8be0442a5ca34280b (diff)
libcamera: stream: Add ColorSpace fields to StreamConfiguration
This is so that applications can choose appropriate color spaces which will then be passed down to the V4L2 devices. The ColorSpace field is actually optional. If it is not set you will get the camera's default color space. Signed-off-by: David Plowman <david.plowman@raspberrypi.com> Reviewed-by: Umang Jain <umang.jain@ideasonboard.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/stream.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/libcamera/stream.h b/include/libcamera/stream.h
index 41ec02b1..f0ae7e62 100644
--- a/include/libcamera/stream.h
+++ b/include/libcamera/stream.h
@@ -12,6 +12,7 @@
#include <string>
#include <vector>
+#include <libcamera/color_space.h>
#include <libcamera/framebuffer.h>
#include <libcamera/geometry.h>
#include <libcamera/pixel_format.h>
@@ -47,6 +48,8 @@ struct StreamConfiguration {
unsigned int bufferCount;
+ std::optional<ColorSpace> colorSpace;
+
Stream *stream() const { return stream_; }
void setStream(Stream *stream) { stream_ = stream; }
const StreamFormats &formats() const { return formats_; }