grabing floatimb picz from a webcam
This commit is contained in:
@@ -175,7 +175,7 @@ char ligne[100];
|
||||
|
||||
struct v4l2_capability cap;
|
||||
struct v4l2_format fmt;
|
||||
struct v4l2_input input;
|
||||
// struct v4l2_input input;
|
||||
// int index;
|
||||
|
||||
// struct v4l2_requestbuffers reqbuf;
|
||||
@@ -202,26 +202,17 @@ 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)) {
|
||||
perror("VIDIOC_ENUMINPUT");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
sprintf(ligne, "input %d", input.index);
|
||||
pr_v4l2_input(ligne, &input);
|
||||
***/
|
||||
|
||||
memset(&fmt, 0, sizeof(fmt));
|
||||
fmt.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
|
||||
foo = ioctl(vfd, VIDIOC_G_FMT, &fmt);
|
||||
fprintf(stderr, "ioctl -> %d\n", foo);
|
||||
if (0 != foo) {
|
||||
perror("ioctl G_FMT");
|
||||
exit(1);
|
||||
// exit(1);
|
||||
}
|
||||
else {
|
||||
pr_v4l2_format("Experimental", &fmt);
|
||||
}
|
||||
pr_v4l2_format("Experimental", &fmt);
|
||||
|
||||
foo = enum_image_formats(vfd, "Experimental", 0);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user