From b23ebec4a519b0226337361ed44cd6ac006115f7 Mon Sep 17 00:00:00 2001 From: tth Date: Tue, 30 Jul 2019 14:56:35 +0200 Subject: [PATCH] display all inputs --- v4l2/video-infos.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/v4l2/video-infos.c b/v4l2/video-infos.c index a2b6333..9f43b55 100644 --- a/v4l2/video-infos.c +++ b/v4l2/video-infos.c @@ -59,6 +59,7 @@ static int enum_inputs(int fd, char *txt, int k) { int index, foo; struct v4l2_input input; +char ligne[50]; printf("-- inputs enumeration '%s'\n", txt); @@ -75,8 +76,14 @@ for(;;) { } } - printf("%-32s | %-10s\n", input.name, + if (verbosity) { + sprintf(ligne, "input %d", index); + pr_v4l2_input(ligne, &input); + } + else { + printf("%-32s | %-10s\n", input.name, str_input_type(input.type)); + } index++; } @@ -191,6 +198,9 @@ if (foo < 0) { } pr_v4l2_capability(devname, &cap); +foo = enum_inputs(vfd, "on peut voir quoi ?", 0); + +/*** memset(&input, 0, sizeof(input)); input.index = 1; if (-1 == ioctl(vfd, VIDIOC_ENUMINPUT, &input)) { @@ -199,8 +209,7 @@ if (-1 == ioctl(vfd, VIDIOC_ENUMINPUT, &input)) { } sprintf(ligne, "input %d", input.index); pr_v4l2_input(ligne, &input); - -foo = enum_inputs(vfd, "on peut voir quoi ?", 0); +***/ foo = enum_image_formats(vfd, "Experimental", 0);