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

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



Gerd Knorr wrote:
> So IMHO it would be useful to either:
>   - require driver do support *both* non-blocking I/O and
>     partial read()s
> or
>   - allow drivers to support only blocking, full-frame read()s.

I think I remember now why I didn't want to force partial read()
support:

1. A device may not be able to capture in the format required by the
application, so the driver is converting when it is copying to the user
buffer. A partial read() may not end at a boundary compatible with the
conversion routine, e.g. at a partial pixel. That can be worked around
by having another buffer to hold the converted data, and then doing the
partial read()s from that buffer.

2. There is no guaranteed way for the read()ing thread to know where the
frame boundaries are from the read() call alone, especially if the data
is compressed by a variable length compression.

Bill.





[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