From 5f80f696869dab0659708b5825749e8a93ab2809 Mon Sep 17 00:00:00 2001 From: Hans Verkuil Date: Sun, 10 Mar 2013 10:31:50 +0100 Subject: [PATCH] v4l2-compliance: add support for the new 'COPY' timestamp type. Signed-off-by: Hans Verkuil --- utils/v4l2-compliance/v4l2-test-buffers.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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); -- 2.7.4