summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorKieran Bingham <kieran.bingham@ideasonboard.com>2021-10-27 13:03:53 +0100
committerKieran Bingham <kieran.bingham@ideasonboard.com>2021-10-27 14:31:49 +0100
commit0a1aaa8d55cdd2530f41e70242dc8ea9a3b46577 (patch)
tree5767017b8f20c61a6bd6d843782afa3b735a1c74 /include
parent4d4694cd9f4ea73586dcb75d19905a1860356d9f (diff)
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 <naush@raspberrypi.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Diffstat (limited to 'include')
-rw-r--r--include/libcamera/internal/v4l2_videodevice.h4
1 files changed, 4 insertions, 0 deletions
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