summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--yavta.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/yavta.c b/yavta.c
index c7986bd..3f4e381 100644
--- a/yavta.c
+++ b/yavta.c
@@ -92,7 +92,8 @@ static bool video_is_mplane(struct device *dev)
static bool video_is_meta(struct device *dev)
{
- return dev->type == V4L2_BUF_TYPE_META_CAPTURE;
+ return dev->type == V4L2_BUF_TYPE_META_CAPTURE ||
+ dev->type == V4L2_BUF_TYPE_META_OUTPUT;
}
static bool video_is_capture(struct device *dev)
@@ -105,7 +106,8 @@ static bool video_is_capture(struct device *dev)
static bool video_is_output(struct device *dev)
{
return dev->type == V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE ||
- dev->type == V4L2_BUF_TYPE_VIDEO_OUTPUT;
+ dev->type == V4L2_BUF_TYPE_VIDEO_OUTPUT ||
+ dev->type == V4L2_BUF_TYPE_META_OUTPUT;
}
static struct {
@@ -120,6 +122,7 @@ static struct {
{ V4L2_BUF_TYPE_VIDEO_OUTPUT, 1, "Video output mplanes", "output", },
{ V4L2_BUF_TYPE_VIDEO_OVERLAY, 0, "Video overlay", "overlay" },
{ V4L2_BUF_TYPE_META_CAPTURE, 1, "Meta-data capture", "meta-capture", },
+ { V4L2_BUF_TYPE_META_OUTPUT, 1, "Meta-data output", "meta-output", },
};
static int v4l2_buf_type_from_string(const char *str)
@@ -410,12 +413,14 @@ static int video_querycap(struct device *dev, unsigned int *capabilities)
V4L2_CAP_VIDEO_CAPTURE |
V4L2_CAP_VIDEO_OUTPUT_MPLANE |
V4L2_CAP_VIDEO_OUTPUT);
- has_meta = caps & V4L2_CAP_META_CAPTURE;
+ has_meta = caps & (V4L2_CAP_META_CAPTURE |
+ V4L2_CAP_META_OUTPUT);
has_capture = caps & (V4L2_CAP_VIDEO_CAPTURE_MPLANE |
V4L2_CAP_VIDEO_CAPTURE |
V4L2_CAP_META_CAPTURE);
has_output = caps & (V4L2_CAP_VIDEO_OUTPUT_MPLANE |
- V4L2_CAP_VIDEO_OUTPUT);
+ V4L2_CAP_VIDEO_OUTPUT |
+ V4L2_CAP_META_OUTPUT);
has_mplane = caps & (V4L2_CAP_VIDEO_CAPTURE_MPLANE |
V4L2_CAP_VIDEO_OUTPUT_MPLANE);
@@ -444,6 +449,8 @@ static int cap_get_buf_type(unsigned int capabilities)
return V4L2_BUF_TYPE_VIDEO_OUTPUT;
} else if (capabilities & V4L2_CAP_META_CAPTURE) {
return V4L2_BUF_TYPE_META_CAPTURE;
+ } else if (capabilities & V4L2_CAP_META_OUTPUT) {
+ return V4L2_BUF_TYPE_META_OUTPUT;
} else {
printf("Device supports neither capture nor output.\n");
return -EINVAL;
@@ -2195,6 +2202,7 @@ int main(int argc, char *argv[])
video_enum_formats(&dev, V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE);
video_enum_formats(&dev, V4L2_BUF_TYPE_VIDEO_OVERLAY);
video_enum_formats(&dev, V4L2_BUF_TYPE_META_CAPTURE);
+ video_enum_formats(&dev, V4L2_BUF_TYPE_META_OUTPUT);
}
if (do_enum_inputs) {