@@ -485,7 +485,9 @@ static int video_enable(struct device *dev, int enable)
int type = dev->type;
int ret;
+ printf("+%s\n", enable ? "STREAMON" : "STREAMOFF");
ret = ioctl(dev->fd, enable ? VIDIOC_STREAMON : VIDIOC_STREAMOFF, &type);
+ printf("-%s\n", enable ? "STREAMON" : "STREAMOFF");
if (ret < 0) {
printf("Unable to %s streaming: %d.\n", enable ? "start" : "stop",
errno);
@@ -1063,6 +1065,7 @@ int main(int argc, char *argv[])
{
struct device dev;
int ret;
+ int i;
/* Options parsings */
int do_file = 0, do_capture = 0, do_pause = 0;
@@ -1259,6 +1262,9 @@ int main(int argc, char *argv[])
video_enum_inputs(&dev);
}
+ for (i=0; i<100; i++) {
+ printf("==== %d ====\n", i);
+
if (do_set_input) {
video_set_input(&dev, input);
ret = video_get_input(&dev);
@@ -1313,6 +1319,8 @@ int main(int argc, char *argv[])
return 1;
}
+ }
+
video_close(&dev);
return 0;
}