Re: v4l2 api

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



Hi Gerd and Michael,

On Wed, 2002-10-09 at 16:21, Gerd Knorr wrote:
> We came to the conclusion that it there are good reasons to do some
> incompatible changes before submitting v4l2 to the standard kernel:

Nice to see that there's discussion going on to get it into the kernel!

>  * new field handling, the current v4l2 spec a bit confusing about
>    this.  There is now:
> 
>    enum v4l2_field {
> 	V4L2_FIELD_ANY        = 0, /* driver can choose from none,
> 				      top, bottom, interlaced
> 				      depending on whatever it thinks
> 				      is approximate ... */
> 	V4L2_FIELD_NONE       = 1, /* this device has no fields ... */
> 	V4L2_FIELD_TOP        = 2, /* top field only */
> 	V4L2_FIELD_BOTTOM     = 3, /* bottom field only */
> 	V4L2_FIELD_INTERLACED = 4, /* both fields interlaced */
> 	V4L2_FIELD_SEQUENTIAL = 5, /* both fields sequential into one
> 				      buffer */
> 	V4L2_FIELD_ALTERNATE  = 6, /* both fields alternating into
> 				      separate buffers */
>    };
> 
>    Both v4l2_pix_format and v4l2_buffer have this, for v4l2_pix_format
>    this field is r/w, for v4l2_buffer it is read-only (for the
>    application).

This is not complete. V4L2_FIELD_INTERLACED means what? top-field-first?
bottom-field-first? I'd rather see one extra flag being added,
V4L2_FIELD_INTERLACED_TOP_FIELD_FIRST and _BOTTOM_FIELD_FIRST, or
whatever... For quite some devices (such as the ones supported by the
zoran driver), the field order is programmable, and applications can use
this.

>  * drop open flags
>    obsolete

I remember some discussion that we could support O_NONBLOCK to make
capturing (syncing on a buffer, VIDEO_DQBUF) blocking or nonblocking
depending on this flag... Is that idea still pending, or is it discarded
as well?

>    what about the video output stuff btw.  Does anybody use that?

Yes, the zoran stuff uses it for output... There's one problem, though,
the 'capture' formats (MJPEG and several uncompressed formats) aren't
the same as the playback formats (MJPEG only), and this isn't
programmeable in v4l2 (yet)... Could an extra flag for this be added in
the format enumeration struct?

>  * drop zoom stuff
>    use crop_* instead (whilch needs some review + exact specification)

Yes please! :-).

> Comments?  Anything else we should change?

Well, apart from the question stated above (add input/output flag to
format enumeration) and the field order information for interlaced
capture, not really. v4l2 is pretty good already.

Ronald





[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