meta-digi-dey: dey-examples-v4l2: Add YUYV pixel format as argument.

Signed-off-by: Alex Gonzalez <alex.gonzalez@digi.com>
This commit is contained in:
Alex Gonzalez 2014-05-19 12:24:59 +02:00
parent 0e4a6616e7
commit e98d5d826a
1 changed files with 5 additions and 1 deletions

View File

@ -61,6 +61,7 @@ static void printUsage(FILE * fd)
" Setting '-x' discards the output device option '-o' and\n" " Setting '-x' discards the output device option '-o' and\n"
" uses the overlay background framebuffer.\n" " uses the overlay background framebuffer.\n"
" -r RGB565 (default is UYVY)\n" " -r RGB565 (default is UYVY)\n"
" -u YUYV (default is UYVY)\n"
" -v Verbose mode\n" " -v Verbose mode\n"
" -? This help\n\n"); " -? This help\n\n");
} }
@ -365,7 +366,7 @@ int main(int argc, char **argv)
strcpy(args.v4l2_device, "/dev/video0"); strcpy(args.v4l2_device, "/dev/video0");
/* Input processing */ /* Input processing */
while ((opt = getopt(argc, argv, "w:d:h:l:t:o:xvr?")) != -1) { while ((opt = getopt(argc, argv, "w:d:h:l:t:o:xvru?")) != -1) {
switch (opt) { switch (opt) {
case '?': case '?':
printUsage(stderr); printUsage(stderr);
@ -394,6 +395,9 @@ int main(int argc, char **argv)
case 'r': case 'r':
args.options.format = V4L2_PIX_FMT_RGB565; args.options.format = V4L2_PIX_FMT_RGB565;
break; break;
case 'u':
args.options.format = V4L2_PIX_FMT_YUYV;
break;
case 'x': case 'x':
args.options.non_destructive = 1; args.options.non_destructive = 1;
break; break;