Re: v4l2 + select() + read()

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



> >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.

IMHO ihe point of partial reads is _not_ to copy stuff to userspace while
the transfer from the hardware is still in progress.  It is fine to wait
until the frame is complete and start copying to userspace then.

The point is that you can read data in small chunks.  The stdio library
for example does some buffering and reads the data usually in small
chunks (512 bytes or 4k or something like that).  Supporting partial
reads would allow to use the stdio functions for reading data from
/dev/video.  Which in turn would allow to use tools which do not care
about the video frame size (cat for example) to access /dev/video.

  Gerd

-- 
Gerd Knorr <kraxel@xxxxxxxxxxx>  --  SuSE Labs, Außenstelle Berlin





[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