sync: input/output error

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



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?

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? Supposing that it's not necessary to do ioctl(fd,VIDIOCMCAPTURE,
&1), how do I de-queue the buffers after being done capturing? Or can I
just leave them and requeue the same buffers when I want to continue
capturing at a later time (without having unmap()'ed/mmap()'ed the memory
or in any other way restarted the process)? This is basically pretty useful
for gstreamer to switch between "paused" and "playing" state (playing =
capturing, so on pause->play, I need to queue all buffers and on
play->pause, I'd need to de-queue all buffers if that is needed at all).
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.

Thanks for any hint,

Ronald

-- 
-   .-.
-   /V\    | Ronald Bultje <rbultje@xxxxxxxxxxxxxxxxxxx>
-  // \\   | Running: Linux 2.4.4 and OpenBSD 2.8
- /(   )\  | http://ronald.bitfreak.net/
-  ^^-^^





[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