|
|
|
@ -22,8 +22,9 @@ int verbosity; |
|
|
|
|
/* --------------------------------------------------------------------- */ |
|
|
|
|
int essai(char *dev, int k) |
|
|
|
|
{ |
|
|
|
|
int vfd, foo; |
|
|
|
|
struct v4l2_format fmt; |
|
|
|
|
int vfd, foo; |
|
|
|
|
struct v4l2_format fmt; |
|
|
|
|
struct v4l2_requestbuffers reqbuf; |
|
|
|
|
|
|
|
|
|
fprintf(stderr, ">>> %s ( '%s' %d )\n", __func__, dev, k); |
|
|
|
|
|
|
|
|
@ -43,11 +44,17 @@ pr_v4l2_format("before ioctl", &fmt); |
|
|
|
|
|
|
|
|
|
foo = ioctl(vfd, VIDIOC_S_FMT, &fmt); |
|
|
|
|
fprintf(stderr, "ioctl -> %d\n", foo); |
|
|
|
|
if (foo < 0)) perror("ioctl S_FMT"); |
|
|
|
|
if (foo < 0) { |
|
|
|
|
perror("ioctl S_FMT"); |
|
|
|
|
exit(1); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
pr_v4l2_format("after ioctl", &fmt); |
|
|
|
|
|
|
|
|
|
/* todo V4L2_BUF_TYPE_VIDEO_CAPTURE */ |
|
|
|
|
memset(&reqbuf, 0, sizeof(reqbuf)); |
|
|
|
|
pr_v4l2_requestbuffers("after 0", &reqbuf); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return k; |
|
|
|
|
} |
|
|
|
@ -66,6 +73,9 @@ puts("\t-d\tselect the video device"); |
|
|
|
|
puts("\t-K\tset the K parameter"); |
|
|
|
|
puts("\t-l\tlist video devices"); |
|
|
|
|
puts("\t-v\tincrease verbosity"); |
|
|
|
|
|
|
|
|
|
if (verbosity) { puts(""); fimg_print_version(1); } |
|
|
|
|
|
|
|
|
|
exit(0); |
|
|
|
|
} |
|
|
|
|
/* --------------------------------------------------------------------- */ |
|
|
|
|