From: Hans Verkuil Date: Sun, 10 Mar 2013 09:31:50 +0000 (+0100) Subject: v4l2-compliance: add support for the new 'COPY' timestamp type. X-Git-Tag: v4l-utils-0.9.4~41 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5f80f696869dab0659708b5825749e8a93ab2809;p=platform%2Fupstream%2Fv4l-utils.git v4l2-compliance: add support for the new 'COPY' timestamp type. Signed-off-by: Hans Verkuil --- diff --git a/utils/v4l2-compliance/v4l2-test-buffers.cpp b/utils/v4l2-compliance/v4l2-test-buffers.cpp index 2cda9a9..b93279b 100644 --- a/utils/v4l2-compliance/v4l2-test-buffers.cpp +++ b/utils/v4l2-compliance/v4l2-test-buffers.cpp @@ -40,15 +40,18 @@ static int testQueryBuf(struct node *node, unsigned type, unsigned count) memset(&buf, 0, sizeof(buf)); buf.type = type; for (i = 0; i < count; i++) { + unsigned timestamp; + buf.index = i; fail_on_test(doioctl(node, VIDIOC_QUERYBUF, &buf)); + timestamp = buf.flags & V4L2_BUF_FLAG_TIMESTAMP_MASK; fail_on_test(buf.index != i); fail_on_test(buf.type != type); fail_on_test(buf.flags & (V4L2_BUF_FLAG_QUEUED | V4L2_BUF_FLAG_DONE | V4L2_BUF_FLAG_ERROR)); - fail_on_test((buf.flags & V4L2_BUF_FLAG_TIMESTAMP_MASK) != - V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC); + fail_on_test(timestamp != V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC && + timestamp != V4L2_BUF_FLAG_TIMESTAMP_COPY); } buf.index = count; ret = doioctl(node, VIDIOC_QUERYBUF, &buf);