enum_image_framesizes not working
This commit is contained in:
parent
144498d68e
commit
7abdf7b43e
@ -19,6 +19,38 @@
|
|||||||
|
|
||||||
int verbosity;
|
int verbosity;
|
||||||
|
|
||||||
|
/* --------------------------------------------------------------------- */
|
||||||
|
/*
|
||||||
|
* this code was written from a strace output :)
|
||||||
|
*/
|
||||||
|
int enum_image_framesizes(int fd, char *txt, int k)
|
||||||
|
{
|
||||||
|
int foo, idx;
|
||||||
|
struct v4l2_frmsizeenum fmtsz;
|
||||||
|
|
||||||
|
printf("-- image framesizes enumeration (%s)\n", txt);
|
||||||
|
|
||||||
|
for (idx=0; ; idx++) {
|
||||||
|
memset(&fmtsz, 0, sizeof(fmtsz));
|
||||||
|
fmtsz.index = idx;
|
||||||
|
foo = ioctl(fd, VIDIOC_ENUM_FRAMESIZES, &fmtsz);
|
||||||
|
|
||||||
|
if (foo) {
|
||||||
|
if (EINVAL==errno) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
perror(__func__);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
printf("%4d %4d %4d\n", idx, fmtsz.pixel_format, fmtsz.type);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
/* --------------------------------------------------------------------- */
|
/* --------------------------------------------------------------------- */
|
||||||
int enum_image_formats(int fd, char *txt, int k)
|
int enum_image_formats(int fd, char *txt, int k)
|
||||||
{
|
{
|
||||||
@ -61,7 +93,7 @@ int index, foo;
|
|||||||
struct v4l2_input input;
|
struct v4l2_input input;
|
||||||
char ligne[50];
|
char ligne[50];
|
||||||
|
|
||||||
printf("-- inputs enumeration '%s'\n", txt);
|
printf("-- inputs enumeration (%s)\n", txt);
|
||||||
|
|
||||||
index = 0;
|
index = 0;
|
||||||
for(;;) {
|
for(;;) {
|
||||||
@ -219,6 +251,7 @@ foo = enum_controls(vfd, "is that working ?", 0);
|
|||||||
|
|
||||||
foo = enum_extended_controls(vfd, "looking for extended", 0);
|
foo = enum_extended_controls(vfd, "looking for extended", 0);
|
||||||
|
|
||||||
|
enum_image_framesizes(vfd, "code pas fini", 0);
|
||||||
|
|
||||||
close(vfd);
|
close(vfd);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user