libcamera: v4l2_device: Add support for META_OUTPUT

Add support for output devices that expose the META_OUTPUT capabilities.

Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
This commit is contained in:
Jacopo Mondi
2019-05-24 08:47:51 +02:00
parent 74a56fe51a
commit 81e004e0ff
2 changed files with 17 additions and 2 deletions

View File

@@ -59,7 +59,8 @@ struct V4L2Capability final : v4l2_capability {
bool isOutput() const
{
return device_caps() & (V4L2_CAP_VIDEO_OUTPUT |
V4L2_CAP_VIDEO_OUTPUT_MPLANE);
V4L2_CAP_VIDEO_OUTPUT_MPLANE |
V4L2_CAP_META_OUTPUT);
}
bool isVideo() const
{
@@ -70,7 +71,8 @@ struct V4L2Capability final : v4l2_capability {
}
bool isMeta() const
{
return device_caps() & V4L2_CAP_META_CAPTURE;
return device_caps() & (V4L2_CAP_META_CAPTURE |
V4L2_CAP_META_OUTPUT);
}
bool isVideoCapture() const
{
@@ -84,6 +86,10 @@ struct V4L2Capability final : v4l2_capability {
{
return isMeta() && isCapture();
}
bool isMetaOutput() const
{
return isMeta() && isOutput();
}
bool hasStreaming() const
{
return device_caps() & V4L2_CAP_STREAMING;