Ronald Bultje wrote:
> Hello,
>
> I'm currently still facing one problem with capturing video using either
> lavrec or gstreamer, sometimes (completely random, it seems), VIDIOCSYNC
> will return with an EIOERR ("input/output error"). I'm not able to find out
> why. I could of course try something like:
>
> again:
> if (ioctl(fd, VIDIOCSYNC, &num) < 0)
> {
> if (errno == EIOERR) goto again;
> printf("Sync error: %s\n", sys_errlist[errno]);
> exit(1);
> }
>
> or something like that. But is there any reason why it gives the EIOERR and
> can I prevent it?
With bttv 0.8.x this happens if the capture request timed out for some
reason, i.e. it _really_ is some I/O problem. You can't do anything
about it, your frame is lost in cyberspace ...
> One last thing, do I need to do ioctl(fd, VIDIOCMCAPTURE, &1); to capture,
> or is VIDIOCMCAPTURE only useful for enabling/disabling the video overlay
> display?
VIDIOCMCAPTURE queues requests, VIDIOCSYNC dequeues the finished ones.
> The MJPEG v4l-extensions use ioctl(fd, MJPIOC_Q_BUFS, &(-1)) for that (-1
> means dequeue all buffers) but that feature doesn't seem implemented in the
> generic v4l-API or the BTTV-driver.
You have to call SYNC for all outstanding buffers. You can't cancel the
capture for queued buffers (with v4l2 you can, VIDIOC_STREAMOFF does
that).
Gerd
--
Netscape is unable to locate the server localhost:8000.
Please check the server name and try again.
_______________________________________________
Video4linux-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/video4linux-list