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:

> No, it doesn't:
> 
> while (true)
>   MCAPTURE(0) <- effectively null operation for driver
>   SYNC(0)     <- driver converts internal buffer into mmap buffer
>   // application processes frame directly in mmap buffer, no memcpy
>   // * hardware will continue capturing into internal buffers! *
> }

That is true for *your* driver, because it does some double buffering
which the application doesn't see.  It is *not* true in general, thus
applications can't depend on that.  If you try this with bttv for
example you will lose frames, because bttv doesn't have that kind of
internal buffering.

The v4l API should work the same way for all drivers and applications.
And the MCAPTURE/SYNC ioctls (QBUF/DQBUF in v4l2) are designed to
allow applications control the drivers buffering.  Your driver should
just support that instead of hiding the 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