diff options
author | Naushir Patuck <naush@raspberrypi.com> | 2023-09-21 18:55:46 +0200 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2023-09-27 14:42:23 +0300 |
commit | 71bbf10a2f79d498db7e85293dd8115b87fa30aa (patch) | |
tree | 6c89370a72819edaecfaa3a9c70e0a22ee0e5351 /src/libcamera/pipeline/rpi/common/pipeline_base.h | |
parent | 0602cbc59665b3017ccc3fb9067d45840e6c1405 (diff) |
libcamera: rpi: Add some helpers to PipelineHandlerBase
Add a helper updateStreamConfig() that updates the format related fields
in a StreamConfiguration from a given V4L2DeviceFormat structure.
Add and override to the toV4L2DeviceFormat() helper that returns a
V4L2DeviceFormat structure populated from the format related fields in
a StreamConfiguration.
Both these helper functions will be used in a future commit to simplify
the Raspberry Pi pipeline handler configuration/validation code.
Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'src/libcamera/pipeline/rpi/common/pipeline_base.h')
-rw-r--r-- | src/libcamera/pipeline/rpi/common/pipeline_base.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/libcamera/pipeline/rpi/common/pipeline_base.h b/src/libcamera/pipeline/rpi/common/pipeline_base.h index 1a3a13db..491c5e98 100644 --- a/src/libcamera/pipeline/rpi/common/pipeline_base.h +++ b/src/libcamera/pipeline/rpi/common/pipeline_base.h @@ -198,6 +198,10 @@ public: static bool isYuv(const PixelFormat &pixFmt); static bool isRaw(const PixelFormat &pixFmt); + static bool updateStreamConfig(StreamConfiguration *stream, + const V4L2DeviceFormat &format); + static V4L2DeviceFormat toV4L2DeviceFormat(const V4L2VideoDevice *dev, + const StreamConfiguration *stream); static V4L2DeviceFormat toV4L2DeviceFormat(const V4L2VideoDevice *dev, const V4L2SubdeviceFormat &format, BayerFormat::Packing packingReq); |