Re: API spec vs API implementation

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



On Mon, 29 Sep 2003, Ladislav Michl wrote:

>Documentation/video4linux/API.html states that struct video_capture should
>be used to set capture window. This is explained in greater detail on

It also says:
"The capture area is described by a struct video_window." Confusing. But
since struct video_window takes in list of clipping rectangles, necessary
for overlay (I think), one would expect you to be right in that VIDIOCSWIN
would define overlay window instead of capture window, unlike in current
drivers.

The API documentation is confusing but I would recommend you to stay
compatible with existing applications, even if that would mean breaking the
word in the documentation.

As you can see, there's good reason for V4L2. Have you looked it, is it
better? Better to check before it's fixed in stone.

>I'm wondering how to break the circle. What I'm a supposed to do if I want
>to set full size overlay window, but capture image in 1/2 of size??

Use V4L2?

>I'd like also to know how should continuous capture work (via mmap). Using
>existing drivers as example it no longer option for me :-(

I think the example in API.html is perfectly good this time:

while (whatever) {
   VIDIOCMCAPTURE(1)
   VIDIOCSYNC(0)
   /* process frame 0 while the hardware captures frame 1 */
   VIDIOCMCAPTURE(0)
   VIDIOCSYNC(1)
   /* process frame 1 while the hardware captures frame 0 */
}

EXCEPT that you must also check if the driver supports two mmap buffers (it
might support only one).




[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