From 7142cacc500788b20ac137504a8e5d20a202a51e Mon Sep 17 00:00:00 2001 From: Hans Verkuil Date: Fri, 21 Feb 2014 14:59:02 +0100 Subject: [PATCH] v4l2-compliance: obtain expbuf caps and fix radio/vbi bug Get the capabilities of the expbuf device for later use. Fix a bug in the assignment of the second node for radio and vbi devices: the video node was used instead which is not what was intended. Signed-off-by: Hans Verkuil --- utils/v4l2-compliance/v4l2-compliance.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/utils/v4l2-compliance/v4l2-compliance.cpp b/utils/v4l2-compliance/v4l2-compliance.cpp index 2dbd4a5..4acc943 100644 --- a/utils/v4l2-compliance/v4l2-compliance.cpp +++ b/utils/v4l2-compliance/v4l2-compliance.cpp @@ -647,6 +647,13 @@ int main(int argc, char **argv) V4L2_CAP_VIDEO_M2M | V4L2_CAP_SLICED_VBI_OUTPUT | V4L2_CAP_RDS_OUTPUT)) node.can_output = true; + if (expbuf_device) { + doioctl(&expbuf_node, VIDIOC_QUERYCAP, &vcap); + if (vcap.capabilities & V4L2_CAP_DEVICE_CAPS) + expbuf_node.caps = vcap.device_caps; + else + expbuf_node.caps = vcap.capabilities; + } /* Information Opts */ @@ -699,7 +706,7 @@ int main(int argc, char **argv) printf("\ttest VIDIOC_QUERYCAP: %s\n", ok(testCap(&radio_node2))); printf("\ttest VIDIOC_G/S_PRIORITY: %s\n", ok(testPrio(&node, &radio_node2))); - node.node2 = &video_node2; + node.node2 = &radio_node2; } } if (vbi_device) { @@ -710,7 +717,7 @@ int main(int argc, char **argv) printf("\ttest VIDIOC_QUERYCAP: %s\n", ok(testCap(&vbi_node2))); printf("\ttest VIDIOC_G/S_PRIORITY: %s\n", ok(testPrio(&node, &vbi_node2))); - node.node2 = &video_node2; + node.node2 = &vbi_node2; } } printf("\n"); -- 2.7.4