aboutsummaryrefslogtreecommitdiffstats
path: root/utils/v4l2-compliance/v4l2-test-codecs.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'utils/v4l2-compliance/v4l2-test-codecs.cpp')
-rw-r--r--utils/v4l2-compliance/v4l2-test-codecs.cpp4
1 files changed, 4 insertions, 0 deletions
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