summaryrefslogtreecommitdiff
path: root/v4l2-apps/test
diff options
context:
space:
mode:
Diffstat (limited to 'v4l2-apps/test')
-rw-r--r--v4l2-apps/test/v4l2grab.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/v4l2-apps/test/v4l2grab.c b/v4l2-apps/test/v4l2grab.c
index 20692117e..153a0dd30 100644
--- a/v4l2-apps/test/v4l2grab.c
+++ b/v4l2-apps/test/v4l2grab.c
@@ -72,6 +72,13 @@ int main(int argc, char **argv)
fmt.fmt.pix.pixelformat = V4L2_PIX_FMT_RGB24;
fmt.fmt.pix.field = V4L2_FIELD_INTERLACED;
xioctl(fd, VIDIOC_S_FMT, &fmt);
+ if (fmt.fmt.pix.pixelformat != V4L2_PIX_FMT_RGB24) {
+ printf("Libv4l didn't accept RGB24 format. Can't proceed.\n");
+ exit(EXIT_FAILURE);
+ }
+ if ((fmt.fmt.pix.width != 640) || (fmt.fmt.pix.height != 480))
+ printf("Warning: driver is sending image at %dx%d\n",
+ fmt.fmt.pix.width, fmt.fmt.pix.height);
CLEAR(req);
req.count = 2;