Re: ioctl parameters

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



Hmmm...  The API says:

"Whenever a buffer is "used" by the program it should called VIDIOCSYNC to 
free this frame up and continue. to add:VIDIOCSYNC takes the frame number you 
are freeing as its argument."

According to that, if you call VIDIOCSYNC on a frame, you are saying to the 
driver "I'm done with this frame".

I'd also be a little more confused because of the couple drivers I've looked 
at, VIDIOCMCAPTURE doesn't return until they've pulled in and decoded a 
frame.  Also the source code to the zapping program puts the call to 
VIDIOCSYNC in a function called tveng_dequeue which isn't called until it is 
done with the buffer.

On Friday 15 February 2002 01:14 am, you wrote:
> Hi!
>
> On Thu, 14 Feb 2002, Joe Burks wrote:
> > Anyway, if I read that code right the answer is that VIDIOCMCAPTURE ioctl
> > must be called once for every frame you capture.  If the frame in
> > question is not yet available because it is spooling, the ioctl will
> > block until the image is available.
>
> Yes, VIDIOCMCAPTURE must be called for every frame.
> No, VIDIOCMCAPTURE doesn't block. VIDIOCSYNC blocks.
>
> To achieve the full capture rate the application usually has to call
> VIDIOCMCAPTURE-for-frame-n+1 before frame n finishes, i.e. before the
> VIDIOCSYNC-for-frame-n. To make this possible the driver must offer more
> than one capture buffer and must be able to queue up several incoming
> VIDIOCMCAPTURE calls - and dequeue them on every beginning frame
> (interrupt-driven in case of capture cards).





[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