Re: Re: v4l2 + select() + read()

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



Gerd Knorr wrote:

It's a tradeoff.  I have two choices to implement that:

(1) dma to userspace.  This is what the current devel bttv versions
    (0.8.x) do.  It's the most efficient way to do it, but the drawback
    is that neither non-blocking reads nor partial reads can be handled
this way.
This is the problem with V4L read(), as I see it. The most efficient read() / select() implementations end up being a lot like mmap() / VIDIOCSYNC, which makes me want to drop support for one or the other. (That cannot be done without breaking a lot of apps, though).

The current v4l2 specs says drivers should support non-blocking reads but
may refuse partial reads if it is "inefficient to implement".
"Ineffective to implement" is the reason why ov511 doesn't support partial reads. It has no way to know whether the frame is error-free until the camera has sent the whole thing, making partial reads a pointless complexity.

Won't this discussion become irrelevant when the user-space format conversion library becomes "mandatory"anyway? In other words, the library will effectively dictate which kind of read()/select()/mmap() interface is used.

Or, will this library support mmap() and potentially both kinds of read() on both the driver side and the app side? If the library could convert one call to another, then I could support the best one in my driver and not worry about the rest.

Sorry, just had to put in my 1 cent :)

--
Mark McClelland
mmcclell@xxxxxxxxxxx








[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