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>
This commit is contained in:
Umang Jain 2022-08-30 13:17:21 +05:30
parent e297673e76
commit e52729e7ec
2 changed files with 14 additions and 8 deletions

View file

@ -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_;