diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2010-11-26 15:58:32 +0100 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2010-11-26 15:58:32 +0100 |
commit | 7787c8ef296807cd11e853cea7b0b92d9f9b3623 (patch) | |
tree | ba743fdd988f01ea76a532e9d31b610a8ef108aa | |
parent | 80374b89d5531a0857861358ed19ad2160559bb0 (diff) |
Add buffer error flag to information printed after VIDIOC_DQBUF
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-rw-r--r-- | yavta.c | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -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) |