On 15 Feb 2002, Gerd Knorr wrote: > > Nonsense. The description of VIDIOCMCAPTURE and VIDIOCSYNC in API.html is > > unclear, unexact, doubtful. > > I'm talking about the API itself, not the text on the API.html page. Where is this API? > > The application resp. its author *must* know at what moment VIDIOCMCAPTURE > > returns. With a > > VIDIOCMCAPTURE(0) > > VIDIOCMCAPTURE(1) > > sequence the second request is generally lost if it doesn't return before > > the first frame has finished. Resp. only the next but one frame is > > captured. > > If this happens it is a bug in the driver. It might happen that one frame > from the video source is skipped if the second VIDIOCMCAPTURE is too late. > But if VIDIOCMCAPTURE is called twice the driver must capture two frames. I don't think you understand. If first VIDIOCMCAPTURE blocks until the end of the frame, then the second VIDIOCMCAPTURE will always* be too late and a frame will be skipped. The driver may well capture two frames, but it will have dropped one between the two it captured. This is because it you are limited to queue depth of 1, which isn't enough. You NEED to at least double buffer to capture every frame without depending on luck. * for some hardware, it might not _always_ drop the next frame, if the application is able to start capture during the VBI interval, AND the hardware is able to start a capture during this time. But even so, you have introduced a race condition that will cause frame loss.