summaryrefslogtreecommitdiff
path: root/yavta.c
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2010-11-26 15:58:32 +0100
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2010-11-26 15:58:32 +0100
commit7787c8ef296807cd11e853cea7b0b92d9f9b3623 (patch)
treeba743fdd988f01ea76a532e9d31b610a8ef108aa /yavta.c
parent80374b89d5531a0857861358ed19ad2160559bb0 (diff)
Add buffer error flag to information printed after VIDIOC_DQBUF
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'yavta.c')
-rw-r--r--yavta.c9
1 files 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 <linux/videodev2.h>
+#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)