Re: Re: ioctl parameters

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



On Fri, 15 Feb 2002, Joe Burks wrote:
> On Friday 15 February 2002 01:46 pm, Trent Piepho wrote:
> > A driver that blocks on VIDIOCMCAPTURE and makes VIDIOCSYNC a noop is
> > broken. It is impossible to have a queue depth greater than 1 (one) with
> > such a driver!
> 
> According to what I think Alan was saying and the API said, VIDIOCMCAPTURE 
> does two things:
> 
> 1) Returns when a grabbed frame is available.

Then how could you ever get a queue depth greater than 1?  You call
VIDIOCMCAPTURE(0) and put one buffer on the queue, then the driver blocks you
until the frame is captured, and now the queue depth is 0 (hello dropped
frames).  Now you call VIDIOCMCAPTURE(1) to put the second buffer on the
queue, which is now at depth 1 again.  The driver blocks until the frame is
captured, and the queue goes back to 0.  No matter how many buffers you have,
the queue will always have between 1 and 0 buffers in it.  You can never get
the depth of 2 or more because you always block until the depth is back to 0.

The purpose of VIDIOCMCAPTURE is to tell the driver that you are done with a
buffer, and that the driver should add it to the capture queue.  The purpose
of VIDIOCSYNC is for the driver to tell you that it is done with the buffer,
and you should process it.





[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