diff options
author | Hans Verkuil <hans.verkuil@cisco.com> | 2014-12-06 15:30:04 +0100 |
---|---|---|
committer | Hans Verkuil <hans.verkuil@cisco.com> | 2014-12-06 15:30:04 +0100 |
commit | b2137fcd423d80f2467d808e99d1655645afa6bc (patch) | |
tree | 2670e7bac727bc78458bfcb2ffc92ca5a16cb150 | |
parent | c4feaad5cb790c74d49e4e90a60920a44c264661 (diff) |
v4l2-compliance: add check for missing G_INPUT/OUTPUT
If a driver can capture video/vbi, then G/S/ENUM_INPUT must be
present. Ditto for output and G/S/ENUM_OUTPUT.
But if none of these were supported, then v4l2-compliance didn't
complain. Fix this.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
-rw-r--r-- | utils/v4l2-compliance/v4l2-test-input-output.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/utils/v4l2-compliance/v4l2-test-input-output.cpp b/utils/v4l2-compliance/v4l2-test-input-output.cpp index 49417ed4..63c90d7e 100644 --- a/utils/v4l2-compliance/v4l2-test-input-output.cpp +++ b/utils/v4l2-compliance/v4l2-test-input-output.cpp @@ -414,6 +414,8 @@ int testInput(struct node *node) int i = 0; if (ret == ENOTTY) { + if (node->has_inputs) + return fail("G_INPUT not supported for a capture device\n"); descr.index = 0; ret = doioctl(node, VIDIOC_ENUMINPUT, &descr); if (ret != ENOTTY) @@ -773,6 +775,8 @@ int testOutput(struct node *node) int o = 0; if (ret == ENOTTY) { + if (node->has_outputs) + return fail("G_OUTPUT not supported for an output device\n"); descr.index = 0; ret = doioctl(node, VIDIOC_ENUMOUTPUT, &descr); if (ret != ENOTTY) |