diff options
author | Umang Jain <umang.jain@ideasonboard.com> | 2022-08-30 13:17:21 +0530 |
---|---|---|
committer | Umang Jain <umang.jain@ideasonboard.com> | 2022-09-01 16:49:59 +0530 |
commit | e52729e7ec3f735b0078b70e25e5daf2e051c429 (patch) | |
tree | 0dc1f8e9b254bc55db8143f00123da550361707d /include | |
parent | e297673e7686160bed5773ea54866f570f939feb (diff) |
libcamera: v4l2_videodevice: Improve toColorSpace() readability
Wrap V4L2Device::toColorspace() inside a private static member
function in V4L2VideoDevice class. It improves readability in
setting the colorspace for V4L2DeviceFormat.
No functional changes intended.
Signed-off-by: Umang Jain <umang.jain@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/libcamera/internal/v4l2_videodevice.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/libcamera/internal/v4l2_videodevice.h b/include/libcamera/internal/v4l2_videodevice.h index ed98a284..d157a447 100644 --- a/include/libcamera/internal/v4l2_videodevice.h +++ b/include/libcamera/internal/v4l2_videodevice.h @@ -268,6 +268,9 @@ private: void watchdogExpired(); + template<typename T> + static std::optional<ColorSpace> toColorSpace(const T &v4l2Format); + V4L2Capability caps_; V4L2DeviceFormat format_; const PixelFormatInfo *formatInfo_; |