aboutsummaryrefslogtreecommitdiffstats
path: root/utils/v4l2-compliance
diff options
context:
space:
mode:
Diffstat (limited to 'utils/v4l2-compliance')
-rw-r--r--utils/v4l2-compliance/v4l2-compliance.cpp2
-rw-r--r--utils/v4l2-compliance/v4l2-compliance.h1
-rw-r--r--utils/v4l2-compliance/v4l2-test-codecs.cpp4
3 files changed, 6 insertions, 1 deletions
diff --git a/utils/v4l2-compliance/v4l2-compliance.cpp b/utils/v4l2-compliance/v4l2-compliance.cpp
index 89923191..798c4221 100644
--- a/utils/v4l2-compliance/v4l2-compliance.cpp
+++ b/utils/v4l2-compliance/v4l2-compliance.cpp
@@ -1056,7 +1056,7 @@ void testNode(struct node &node, struct node &node_m2m_cap, struct node &expbuf_
if (node.is_media())
mi_media_info_for_fd(node.g_fd(), -1, &is_invalid);
else if (media_fd >= 0)
- ent_id = mi_media_info_for_fd(media_fd, node.g_fd(), &is_invalid);
+ ent_id = mi_media_info_for_fd(media_fd, node.g_fd(), &is_invalid, &node.function);
if (ent_id != MEDIA_ENT_F_UNKNOWN) {
memset(&node.entity, 0, sizeof(node.entity));
diff --git a/utils/v4l2-compliance/v4l2-compliance.h b/utils/v4l2-compliance/v4l2-compliance.h
index 7ae7b988..419d1498 100644
--- a/utils/v4l2-compliance/v4l2-compliance.h
+++ b/utils/v4l2-compliance/v4l2-compliance.h
@@ -133,6 +133,7 @@ struct base_node {
__u32 media_version;
std::string media_bus_info;
media_entity_desc entity;
+ __u32 function;
media_pad_desc *pads;
media_link_desc *links;
media_v2_topology *topology;
diff --git a/utils/v4l2-compliance/v4l2-test-codecs.cpp b/utils/v4l2-compliance/v4l2-test-codecs.cpp
index e218f65f..22175eef 100644
--- a/utils/v4l2-compliance/v4l2-test-codecs.cpp
+++ b/utils/v4l2-compliance/v4l2-test-codecs.cpp
@@ -31,6 +31,8 @@ int testEncoder(struct node *node)
bool is_encoder = node->codec_mask & (STATEFUL_ENCODER | JPEG_ENCODER);
int ret;
+ if (IS_ENCODER(node))
+ fail_on_test(node->function != MEDIA_ENT_F_PROC_VIDEO_ENCODER);
memset(&cmd, 0xff, sizeof(cmd));
memset(&cmd.raw, 0, sizeof(cmd.raw));
ret = doioctl(node, VIDIOC_ENCODER_CMD, &cmd);
@@ -98,6 +100,8 @@ int testDecoder(struct node *node)
bool is_decoder = node->codec_mask & (STATEFUL_DECODER | JPEG_DECODER);
int ret;
+ if (IS_DECODER(node))
+ fail_on_test(node->function != MEDIA_ENT_F_PROC_VIDEO_DECODER);
memset(&cmd, 0xff, sizeof(cmd));
memset(&cmd.raw, 0, sizeof(cmd.raw));
ret = doioctl(node, VIDIOC_DECODER_CMD, &cmd);

Privacy Policy