diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2011-12-12 00:51:25 +0100 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2012-01-06 14:02:54 +0100 |
commit | 38591700b3a570861c4fc4223cd7bc05d4cf7e21 (patch) | |
tree | 20c1f305af416bca30ebbcc86a7dd4bdac0422a6 /live.c | |
parent | 0bf93fa12e7a1a022bd71fea607061b8d6669751 (diff) |
videoout: Take pixel format as a parameter to vo_init()
Pass a struct v4l2_pix_format * instead of width and height.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'live.c')
-rw-r--r-- | live.c | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -385,6 +385,7 @@ int main(int argc __attribute__((__unused__)), char *argv[] __attribute__((__unu { struct v4l2_mbus_framefmt view_format; struct v4l2_buffers_pool *pool = NULL; + struct v4l2_pix_format format; struct timespec start, end; unsigned int buffers = 3; struct v4l2_rect rect; @@ -455,7 +456,11 @@ int main(int argc __attribute__((__unused__)), char *argv[] __attribute__((__unu goto cleanup; } - vo = vo_init(vo_devname, &vo_ops, buffers, rect.width, rect.height); + memset(&format, 0, sizeof format); + format.pixelformat = V4L2_PIX_FMT_YUYV; + format.width = rect.width; + format.height = rect.height; + vo = vo_init(vo_devname, &vo_ops, buffers, &format); if (vo == NULL) { printf("error: unable to initialize video output\n"); goto cleanup; |