On Mon, Sep 29, 2003 at 04:07:17PM +0300, Tuukka Toivonen wrote:
> 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.
I'd guess it should read as follows:
Index: Documentation/video4linux/API.html
===================================================================
RCS file: /home/cvs/linux/Documentation/video4linux/API.html,v
retrieving revision 1.4.4.1
diff -u -r1.4.4.1 API.html
--- Documentation/video4linux/API.html 26 Jun 2002 22:35:01 -0000 1.4.4.1
+++ Documentation/video4linux/API.html 29 Sep 2003 13:25:14 -0000
@@ -88,9 +88,9 @@
Setting the base address to NULL indicates there is no physical frame buffer
access.
<P>
-<H3>Capture Windows</H3>
-The capture area is described by a <b>struct video_window</b>. This defines
-a capture area and the clipping information if relevant. The
+<H3>Overlay Windows</H3>
+The overlay area is described by a <b>struct video_window</b>. This defines
+an overlay area and the clipping information if relevant. The
<b>VIDIOCGWIN</b> ioctl recovers the current settings and the
<b>VIDIOCSWIN</b> sets new values. A successful call to <b>VIDIOCSWIN</b>
indicates that a suitable set of parameters have been chosen. They do not
@@ -124,10 +124,18 @@
is activated by passing the <b>VIDIOCCAPTURE</b> ioctl a value of 1, and
disabled by passing it a value of 0.
<P>
-Some capture devices can capture a subfield of the image they actually see.
-This is indicated when VIDEO_TYPE_SUBCAPTURE is defined.
+<H3>Capture Windows</H3>
+Some capture devices can capture a subfield of the image they actually
+see. This is indicated when VIDEO_TYPE_SUBCAPTURE is defined.
The video_capture describes the time and special subfields to capture.
-The video_capture structure contains the following fields.
+The capture area is described by a <b>struct video_capture</b>. The
+<b>VIDIOCGCAPTURE</b> ioctl recovers the current settings and the
+<b>VIDIOCSCAPTURE</b> sets new values. A successful call to
+<b>VIDIOCSCAPTURE</b> indicates that a suitable set of parameters have
+been chosen. They do not indicate that exactly what was requested was
+granted. The program should call <b>VIDIOCGCAPTURE</b> to check if the
+nearest match was suitable. The video_capture structure contains the
+following fields.
<P>
<TABLE>
<TR><TD><b>x</b></TD><TD>X co-ordinate of source rectangle to grab</TD>
> 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.
better to follow documentation and add compacrapability hooks...
> 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.
V4L2 is better (of course I have to read it several times and try to work
with it for some time), but I'd like that driver to go into 2.4 kernel
series. I don't mind maintaining two versions of driver nor fixing other
stuff (I sent patches for this two years ago, but got no reply).
> >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?
VIDIOCSCAPTURE with decimation=2 to set capture
VIDIOCSWIN to set overlay.
there is no problem in API itself, but in its implementations...
[snip]
ladis
--
video4linux-list mailing list
Unsubscribe mailto:[EMAIL PROTECTED]
https://www.redhat.com/mailman/listinfo/video4linux-list