From: Hans Verkuil Date: Sun, 13 Jul 2014 00:15:45 +0000 (+0200) Subject: v4l2-compliance: only discrete framesizes are not allowed for output X-Git-Tag: v4l-utils-1.3.90~116 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d8a631bfb396ba3762082b841a3b311a140c7444;p=platform%2Fupstream%2Fv4l-utils.git v4l2-compliance: only discrete framesizes are not allowed for output Stepwise/continuous framesizes can be valid for output as well, so relax this test. Signed-off-by: Hans Verkuil --- diff --git a/utils/v4l2-compliance/v4l2-test-formats.cpp b/utils/v4l2-compliance/v4l2-test-formats.cpp index 9bb6b3e..166495d 100644 --- a/utils/v4l2-compliance/v4l2-test-formats.cpp +++ b/utils/v4l2-compliance/v4l2-test-formats.cpp @@ -165,6 +165,8 @@ static int testEnumFrameSizes(struct node *node, __u32 pixfmt) frmsize.discrete.width + 1, frmsize.discrete.height, 0); if (ret && ret != ENOTTY) return ret; + if (ret == 0 && !(node->caps & (V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_VIDEO_CAPTURE_MPLANE))) + return fail("found discrete framesizes when no video capture is supported\n"); break; case V4L2_FRMSIZE_TYPE_CONTINUOUS: if (frmsize.stepwise.step_width != 1 || frmsize.stepwise.step_height != 1) @@ -248,8 +250,6 @@ static int testEnumFormatsType(struct node *node, unsigned type) ret = testEnumFrameSizes(node, fmtdesc.pixelformat); if (ret && ret != ENOTTY) return ret; - if (ret == 0 && !(node->caps & (V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_VIDEO_CAPTURE_MPLANE))) - return fail("found framesizes when no video capture is supported\n"); f++; if (type == V4L2_BUF_TYPE_PRIVATE) continue;