summaryrefslogtreecommitdiff
path: root/src
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 /src
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 'src')
-rw-r--r--src/libcamera/stream.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/libcamera/stream.cpp b/src/libcamera/stream.cpp
index b421e17e..686e693b 100644
--- a/src/libcamera/stream.cpp
+++ b/src/libcamera/stream.cpp
@@ -330,6 +330,26 @@ StreamConfiguration::StreamConfiguration(const StreamFormats &formats)
*/
/**
+ * \var StreamConfiguration::colorSpace
+ * \brief The ColorSpace for this stream
+ *
+ * This field allows a ColorSpace to be selected for this Stream.
+ *
+ * The field is optional and an application can choose to leave it unset.
+ * Platforms that support the use of color spaces may provide default
+ * values through the generateConfiguration() method. An application can
+ * override these when necessary.
+ *
+ * If a specific ColorSpace is requested but the Camera cannot deliver it,
+ * then the StreamConfiguration will be adjusted to a value that can be
+ * delivered. In this case the validate() method will indicate via its
+ * return value that the CameraConfiguration has been adjusted.
+ *
+ * Note that platforms will typically have different constraints on what
+ * color spaces can be supported and in what combinations.
+ */
+
+/**
* \fn StreamConfiguration::stream()
* \brief Retrieve the stream associated with the configuration
*