From 7787c8ef296807cd11e853cea7b0b92d9f9b3623 Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Fri, 26 Nov 2010 15:58:32 +0100 Subject: Add buffer error flag to information printed after VIDIOC_DQBUF Signed-off-by: Laurent Pinchart --- yavta.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/yavta.c b/yavta.c index b942801..57dfa8c 100644 --- a/yavta.c +++ b/yavta.c @@ -32,6 +32,10 @@ #include +#ifndef V4L2_BUF_FLAG_ERROR +#define V4L2_BUF_FLAG_ERROR 0x0040 +#endif + #define ARRAY_SIZE(a) (sizeof(a)/sizeof((a)[0])) struct device @@ -847,8 +851,9 @@ static int video_do_capture(struct device *dev, unsigned int nframes, size += buf.bytesused; gettimeofday(&ts, NULL); - printf("%u (%u) %u bytes %ld.%06ld %ld.%06ld\n", i, buf.index, - buf.bytesused, buf.timestamp.tv_sec, + printf("%u (%u) [%c] %u %u bytes %ld.%06ld %ld.%06ld\n", i, buf.index, + (buf.flags & V4L2_BUF_FLAG_ERROR) ? 'E' : '-', + buf.sequence, buf.bytesused, buf.timestamp.tv_sec, buf.timestamp.tv_usec, ts.tv_sec, ts.tv_usec); if (i == 0) -- cgit v1.2.3