Re: sync: input/output error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



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.





[Index of Archives]     [Linux DVB]     [Video Disk Recorder]     [Asterisk]     [Photo]     [DCCP]     [Netdev]     [Xorg]     [Util Linux NG]     [Xfree86]     [Free Photo Albums]     [Fedora Users]     [Fedora Women]     [ALSA Users]     [ALSA Devel]     [Linux USB]

Powered by Linux