aboutsummaryrefslogtreecommitdiffstats
path: root/utils/v4l2-compliance/v4l2-test-codecs.cpp
diff options
context:
space:
mode:
authorHans Verkuil <hans.verkuil@cisco.com>2012-08-22 11:07:12 +0200
committerHans Verkuil <hans.verkuil@cisco.com>2012-08-22 11:07:12 +0200
commit468f2e6efd82dd336c40333b66d946d1cdc0ca3f (patch)
tree0e51b00be0239054034ecaa40ef335e6965f5453 /utils/v4l2-compliance/v4l2-test-codecs.cpp
parentee58aa47645cb92b82b4881c5ed2f142b20bc8db (diff)
v4l2-compliance: add VIDIOC_G_ENC_INDEX test.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Diffstat (limited to 'utils/v4l2-compliance/v4l2-test-codecs.cpp')
-rw-r--r--utils/v4l2-compliance/v4l2-test-codecs.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/utils/v4l2-compliance/v4l2-test-codecs.cpp b/utils/v4l2-compliance/v4l2-test-codecs.cpp
index 6a5efa94..5057d0ff 100644
--- a/utils/v4l2-compliance/v4l2-test-codecs.cpp
+++ b/utils/v4l2-compliance/v4l2-test-codecs.cpp
@@ -61,6 +61,23 @@ int testEncoder(struct node *node)
return 0;
}
+int testEncIndex(struct node *node)
+{
+ struct v4l2_enc_idx idx;
+ int ret;
+
+ memset(&idx, 0xff, sizeof(idx));
+ ret = doioctl(node, VIDIOC_G_ENC_INDEX, &idx);
+ if (ret == ENOTTY)
+ return ret;
+ if (check_0(idx.reserved, sizeof(idx.reserved)))
+ return fail("idx.reserved not zeroed\n");
+ fail_on_test(ret);
+ fail_on_test(idx.entries != 0);
+ fail_on_test(idx.entries_cap == 0);
+ return 0;
+}
+
int testDecoder(struct node *node)
{
struct v4l2_decoder_cmd cmd;

Privacy Policy