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>
This commit is contained in:
Kieran Bingham 2021-10-27 13:03:53 +01:00
parent 4d4694cd9f
commit 0a1aaa8d55
2 changed files with 11 additions and 1 deletions

View file

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