libcamera: v4l2_device: Add support for META_CAPTURE devices
Add support for devices that provide video meta-data to v4l2_device.cpp and re-arrange bufferType handling in open() method. Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
This commit is contained in:
@@ -51,13 +51,37 @@ struct V4L2Capability final : v4l2_capability {
|
||||
bool isCapture() const
|
||||
{
|
||||
return device_caps() & (V4L2_CAP_VIDEO_CAPTURE |
|
||||
V4L2_CAP_VIDEO_CAPTURE_MPLANE);
|
||||
V4L2_CAP_VIDEO_CAPTURE_MPLANE |
|
||||
V4L2_CAP_META_CAPTURE);
|
||||
}
|
||||
bool isOutput() const
|
||||
{
|
||||
return device_caps() & (V4L2_CAP_VIDEO_OUTPUT |
|
||||
V4L2_CAP_VIDEO_OUTPUT_MPLANE);
|
||||
}
|
||||
bool isVideo() const
|
||||
{
|
||||
return device_caps() & (V4L2_CAP_VIDEO_CAPTURE |
|
||||
V4L2_CAP_VIDEO_CAPTURE_MPLANE |
|
||||
V4L2_CAP_VIDEO_OUTPUT |
|
||||
V4L2_CAP_VIDEO_OUTPUT_MPLANE);
|
||||
}
|
||||
bool isMeta() const
|
||||
{
|
||||
return device_caps() & V4L2_CAP_META_CAPTURE;
|
||||
}
|
||||
bool isVideoCapture() const
|
||||
{
|
||||
return isVideo() && isCapture();
|
||||
}
|
||||
bool isVideoOutput() const
|
||||
{
|
||||
return isVideo() && isOutput();
|
||||
}
|
||||
bool isMetaCapture() const
|
||||
{
|
||||
return isMeta() && isCapture();
|
||||
}
|
||||
bool hasStreaming() const
|
||||
{
|
||||
return device_caps() & V4L2_CAP_STREAMING;
|
||||
|
||||
Reference in New Issue
Block a user