From 0a1aaa8d55cdd2530f41e70242dc8ea9a3b46577 Mon Sep 17 00:00:00 2001 From: Kieran Bingham Date: Wed, 27 Oct 2021 13:03:53 +0100 Subject: libcamera: v4l2_videodevice: provide hasMediaController() The V4L2Capability has helpers to interogate the capabilities of a device. V4L2VideoDevice::enumPixelformats accesses the raw capabilites to check if the device is supported by a MediaController device. Provide a helper, and update the usage. Reviewed-by: Naushir Patuck Reviewed-by: Laurent Pinchart Signed-off-by: Kieran Bingham --- include/libcamera/internal/v4l2_videodevice.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include') diff --git a/include/libcamera/internal/v4l2_videodevice.h b/include/libcamera/internal/v4l2_videodevice.h index efe34d47..a1c458e4 100644 --- a/include/libcamera/internal/v4l2_videodevice.h +++ b/include/libcamera/internal/v4l2_videodevice.h @@ -109,6 +109,10 @@ struct V4L2Capability final : v4l2_capability { { return device_caps() & V4L2_CAP_STREAMING; } + bool hasMediaController() const + { + return device_caps() & V4L2_CAP_IO_MC; + } }; class V4L2BufferCache -- cgit v1.2.1