Re: buggy v4l apps (was: VIDIOCSYNC and bad data)

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



Tuukka Toivonen <tuukkat@xxxxxxxxxx> writes:

> >> "The number of frames supported is device dependent and may only be one"
> >> and the way my driver works, more than one buffer would be just waste of
> >> memory.
> >If the application cannot read the buffer fast enough, and at exactly the
> >proper time, it will either miss frames, or get corrupted frames.  This my
> 
> No it won't. The camera driver (qc-usb) has internal double buffering. When
> application calls VIDIOCSYNC, the mmap buffer is filled from an internal
> buffer, but the actual capture for the buffer can start much before.

That is a very bad.  You have double-buffering implemented, but
instead of letting the applications control it via CAPTURE + SYNC
ioctls you hide it.

What does trigger a frame capture within your driver?  CAPTURE ioctl?
It should work that way.  But I suspect it doesn't, otherwise the
"internal double buffering" wouldn't work as described ...

The "waste of memory" argument isn't true too.  With multiple buffers
applications can let the hardware fill buffers and process (other)
buffers in parallel.  I guess xawtv works, but prints plenty of
"waiting for a free buffer" messages.  That indicates xawtv would
perform better with more buffers.

  Gerd

-- 
sigfault




[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