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>
This commit is contained in:
David Plowman
2021-12-10 14:44:21 +00:00
committed by Laurent Pinchart
parent 3e520cadf1
commit c8a4b52e3a
5 changed files with 28 additions and 6 deletions

View File

@@ -642,6 +642,7 @@ V4L2SubdeviceFormat CameraSensor::getFormat(const std::vector<unsigned int> &mbu
V4L2SubdeviceFormat format{
.mbus_code = bestCode,
.size = *bestSize,
.colorSpace = ColorSpace::Raw,
};
return format;