1<html><head><meta http-equiv="Content-Type" content="text/html; charset=ANSI_X3.4-1968"><title>Video Overlay Interface</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"><link rel="home" href="index.html" title="LINUX MEDIA INFRASTRUCTURE API"><link rel="up" href="devices.html" title="Chapter&#160;4.&#160;Interfaces"><link rel="prev" href="devices.html" title="Chapter&#160;4.&#160;Interfaces"><link rel="next" href="output.html" title="Video Output Interface"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Video Overlay Interface</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="devices.html">Prev</a>&#160;</td><th width="60%" align="center">Chapter&#160;4.&#160;Interfaces</th><td width="20%" align="right">&#160;<a accesskey="n" href="output.html">Next</a></td></tr></table><hr></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="overlay"></a>Video Overlay Interface</h2></div><div><h3 class="subtitle">Also known as Framebuffer Overlay or Previewing</h3></div></div></div><div class="toc"><dl class="toc"><dt><span class="section"><a href="overlay.html#idp1105202876">Querying Capabilities</a></span></dt><dt><span class="section"><a href="overlay.html#idp1105204956">Supplemental Functions</a></span></dt><dt><span class="section"><a href="overlay.html#idp1105208572">Setup</a></span></dt><dt><span class="section"><a href="overlay.html#idp1105217724">Overlay Window</a></span></dt><dt><span class="section"><a href="overlay.html#idp1105269452">Enabling Overlay</a></span></dt></dl></div><p>Video overlay devices have the ability to genlock (TV-)video
2into the (VGA-)video signal of a graphics card, or to store captured
3images directly in video memory of a graphics card, typically with
4clipping. This can be considerable more efficient than capturing
5images and displaying them by other means. In the old days when only
6nuclear power plants needed cooling towers this used to be the only
7way to put live video into a window.</p><p>Video overlay devices are accessed through the same character
8special files as <a class="link" href="devices.html#capture" title="Video Capture Interface">video capture</a> devices.
9Note the default function of a <code class="filename">/dev/video</code> device
10is video capturing. The overlay function is only available after
11calling the <a class="link" href="vidioc-g-fmt.html" title="ioctl VIDIOC_G_FMT, VIDIOC_S_FMT, VIDIOC_TRY_FMT"><code class="constant">VIDIOC_S_FMT</code></a> ioctl.</p><p>The driver may support simultaneous overlay and capturing
12using the read/write and streaming I/O methods. If so, operation at
13the nominal frame rate of the video standard is not guaranteed. Frames
14may be directed away from overlay to capture, or one field may be used
15for overlay and the other for capture if the capture parameters permit
16this.</p><p>Applications should use different file descriptors for
17capturing and overlay. This must be supported by all drivers capable
18of simultaneous capturing and overlay. Optionally these drivers may
19also permit capturing and overlay with a single file descriptor for
20compatibility with V4L and earlier versions of V4L2.<a href="#ftn.idp1105139364" class="footnote" name="idp1105139364"><sup class="footnote">[15]</sup></a></p><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="idp1105202876"></a>Querying Capabilities</h3></div></div></div><p>Devices supporting the video overlay interface set the
21<code class="constant">V4L2_CAP_VIDEO_OVERLAY</code> flag in the
22<em class="structfield"><code>capabilities</code></em> field of struct&#160;<a class="link" href="vidioc-querycap.html#v4l2-capability" title="Table&#160;A.93.&#160;struct v4l2_capability">v4l2_capability</a>
23returned by the <a class="link" href="vidioc-querycap.html" title="ioctl VIDIOC_QUERYCAP"><code class="constant">VIDIOC_QUERYCAP</code></a> ioctl. The overlay I/O method specified
24below must be supported. Tuners and audio inputs are optional.</p></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="idp1105204956"></a>Supplemental Functions</h3></div></div></div><p>Video overlay devices shall support <a class="link" href="audio.html" title="Audio Inputs and Outputs">audio input</a>, <a class="link" href="tuner.html" title="Tuners and Modulators">tuner</a>, <a class="link" href="control.html" title="User Controls">controls</a>,
25<a class="link" href="crop.html" title="Image Cropping, Insertion and Scaling">cropping and scaling</a> and <a class="link" href="streaming-par.html" title="Streaming Parameters">streaming parameter</a> ioctls as needed.
26The <a class="link" href="video.html" title="Video Inputs and Outputs">video input</a> and <a class="link" href="standard.html" title="Video Standards">video standard</a> ioctls must be supported by
27all video overlay devices.</p></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="idp1105208572"></a>Setup</h3></div></div></div><p>Before overlay can commence applications must program the
28driver with frame buffer parameters, namely the address and size of
29the frame buffer and the image format, for example RGB 5:6:5. The
30<a class="link" href="vidioc-g-fbuf.html" title="ioctl VIDIOC_G_FBUF, VIDIOC_S_FBUF"><code class="constant">VIDIOC_G_FBUF</code></a> and <a class="link" href="vidioc-g-fbuf.html" title="ioctl VIDIOC_G_FBUF, VIDIOC_S_FBUF"><code class="constant">VIDIOC_S_FBUF</code></a> ioctls are available to get
31and set these parameters, respectively. The
32<code class="constant">VIDIOC_S_FBUF</code> ioctl is privileged because it
33allows to set up DMA into physical memory, bypassing the memory
34protection mechanisms of the kernel. Only the superuser can change the
35frame buffer address and size. Users are not supposed to run TV
36applications as root or with SUID bit set. A small helper application
37with suitable privileges should query the graphics system and program
38the V4L2 driver at the appropriate time.</p><p>Some devices add the video overlay to the output signal
39of the graphics card. In this case the frame buffer is not modified by
40the video device, and the frame buffer address and pixel format are
41not needed by the driver. The <code class="constant">VIDIOC_S_FBUF</code> ioctl
42is not privileged. An application can check for this type of device by
43calling the <code class="constant">VIDIOC_G_FBUF</code> ioctl.</p><p>A driver may support any (or none) of five clipping/blending
44methods:</p><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><p>Chroma-keying displays the overlaid image only where
45pixels in the primary graphics surface assume a certain color.</p></li><li class="listitem"><p>A bitmap can be specified where each bit corresponds
46to a pixel in the overlaid image. When the bit is set, the
47corresponding video pixel is displayed, otherwise a pixel of the
48graphics surface.</p></li><li class="listitem"><p>A list of clipping rectangles can be specified. In
49these regions <span class="emphasis"><em>no</em></span> video is displayed, so the
50graphics surface can be seen here.</p></li><li class="listitem"><p>The framebuffer has an alpha channel that can be used
51to clip or blend the framebuffer with the video.</p></li><li class="listitem"><p>A global alpha value can be specified to blend the
52framebuffer contents with video images.</p></li></ol></div><p>When simultaneous capturing and overlay is supported and
53the hardware prohibits different image and frame buffer formats, the
54format requested first takes precedence. The attempt to capture
55(<a class="link" href="vidioc-g-fmt.html" title="ioctl VIDIOC_G_FMT, VIDIOC_S_FMT, VIDIOC_TRY_FMT"><code class="constant">VIDIOC_S_FMT</code></a>) or overlay (<a class="link" href="vidioc-g-fbuf.html" title="ioctl VIDIOC_G_FBUF, VIDIOC_S_FBUF"><code class="constant">VIDIOC_S_FBUF</code></a>) may fail with an
56<span class="errorcode">EBUSY</span> error code or return accordingly modified parameters..</p></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="idp1105217724"></a>Overlay Window</h3></div></div></div><p>The overlaid image is determined by cropping and overlay
57window parameters. The former select an area of the video picture to
58capture, the latter how images are overlaid and clipped. Cropping
59initialization at minimum requires to reset the parameters to
60defaults. An example is given in <a class="xref" href="crop.html" title="Image Cropping, Insertion and Scaling">the section called &#8220;Image Cropping, Insertion and Scaling&#8221;</a>.</p><p>The overlay window is described by a struct&#160;<a class="link" href="overlay.html#v4l2-window" title="Table&#160;4.1.&#160;struct v4l2_window">v4l2_window</a>. It
61defines the size of the image, its position over the graphics surface
62and the clipping to be applied. To get the current parameters
63applications set the <em class="structfield"><code>type</code></em> field of a
64struct&#160;<a class="link" href="vidioc-g-fmt.html#v4l2-format" title="Table&#160;A.72.&#160;struct v4l2_format">v4l2_format</a> to <code class="constant">V4L2_BUF_TYPE_VIDEO_OVERLAY</code> and
65call the <a class="link" href="vidioc-g-fmt.html" title="ioctl VIDIOC_G_FMT, VIDIOC_S_FMT, VIDIOC_TRY_FMT"><code class="constant">VIDIOC_G_FMT</code></a> ioctl. The driver fills the
66<span class="structname">v4l2_window</span> substructure named
67<em class="structfield"><code>win</code></em>. It is not possible to retrieve a
68previously programmed clipping list or bitmap.</p><p>To program the overlay window applications set the
69<em class="structfield"><code>type</code></em> field of a struct&#160;<a class="link" href="vidioc-g-fmt.html#v4l2-format" title="Table&#160;A.72.&#160;struct v4l2_format">v4l2_format</a> to
70<code class="constant">V4L2_BUF_TYPE_VIDEO_OVERLAY</code>, initialize the
71<em class="structfield"><code>win</code></em> substructure and call the
72<a class="link" href="vidioc-g-fmt.html" title="ioctl VIDIOC_G_FMT, VIDIOC_S_FMT, VIDIOC_TRY_FMT"><code class="constant">VIDIOC_S_FMT</code></a> ioctl. The driver adjusts the parameters against
73hardware limits and returns the actual parameters as
74<code class="constant">VIDIOC_G_FMT</code> does. Like
75<code class="constant">VIDIOC_S_FMT</code>, the <a class="link" href="vidioc-g-fmt.html" title="ioctl VIDIOC_G_FMT, VIDIOC_S_FMT, VIDIOC_TRY_FMT"><code class="constant">VIDIOC_TRY_FMT</code></a> ioctl can be
76used to learn about driver capabilities without actually changing
77driver state. Unlike <code class="constant">VIDIOC_S_FMT</code> this also works
78after the overlay has been enabled.</p><p>The scaling factor of the overlaid image is implied by the
79width and height given in struct&#160;<a class="link" href="overlay.html#v4l2-window" title="Table&#160;4.1.&#160;struct v4l2_window">v4l2_window</a> and the size of the cropping
80rectangle. For more information see <a class="xref" href="crop.html" title="Image Cropping, Insertion and Scaling">the section called &#8220;Image Cropping, Insertion and Scaling&#8221;</a>.</p><p>When simultaneous capturing and overlay is supported and
81the hardware prohibits different image and window sizes, the size
82requested first takes precedence. The attempt to capture or overlay as
83well (<a class="link" href="vidioc-g-fmt.html" title="ioctl VIDIOC_G_FMT, VIDIOC_S_FMT, VIDIOC_TRY_FMT"><code class="constant">VIDIOC_S_FMT</code></a>) may fail with an <span class="errorcode">EBUSY</span> error code or return accordingly
84modified parameters.</p><div class="table"><a name="v4l2-window"></a><p class="title"><b>Table&#160;4.1.&#160;struct <span class="structname">v4l2_window</span></b></p><div class="table-contents"><table summary="struct v4l2_window" width="100%" border="0"><colgroup><col class="c1"><col class="c2"><col class="c3"></colgroup><tbody valign="top"><tr><td valign="top">struct&#160;<a class="link" href="overlay.html#v4l2-rect" title="Table&#160;4.3.&#160;struct v4l2_rect">v4l2_rect</a></td><td valign="top"><em class="structfield"><code>w</code></em></td><td valign="top">Size and position of the window relative to the
85top, left corner of the frame buffer defined with <a class="link" href="vidioc-g-fbuf.html" title="ioctl VIDIOC_G_FBUF, VIDIOC_S_FBUF"><code class="constant">VIDIOC_S_FBUF</code></a>. The
86window can extend the frame buffer width and height, the
87<em class="structfield"><code>x</code></em> and <em class="structfield"><code>y</code></em>
88coordinates can be negative, and it can lie completely outside the
89frame buffer. The driver clips the window accordingly, or if that is
90not possible, modifies its size and/or position.</td></tr><tr><td valign="top">enum&#160;<a class="link" href="field-order.html#v4l2-field" title="Table&#160;3.9.&#160;enum v4l2_field">v4l2_field</a></td><td valign="top"><em class="structfield"><code>field</code></em></td><td valign="top">Applications set this field to determine which
91video field shall be overlaid, typically one of
92<code class="constant">V4L2_FIELD_ANY</code> (0),
93<code class="constant">V4L2_FIELD_TOP</code>,
94<code class="constant">V4L2_FIELD_BOTTOM</code> or
95<code class="constant">V4L2_FIELD_INTERLACED</code>. Drivers may have to choose
96a different field order and return the actual setting here.</td></tr><tr><td valign="top">__u32</td><td valign="top"><em class="structfield"><code>chromakey</code></em></td><td valign="top">When chroma-keying has been negotiated with
97<a class="link" href="vidioc-g-fbuf.html" title="ioctl VIDIOC_G_FBUF, VIDIOC_S_FBUF"><code class="constant">VIDIOC_S_FBUF</code></a> applications set this field to the desired pixel value
98for the chroma key. The format is the same as the pixel format of the
99framebuffer (struct&#160;<a class="link" href="vidioc-g-fbuf.html#v4l2-framebuffer" title="Table&#160;A.69.&#160;struct v4l2_framebuffer">v4l2_framebuffer</a>
100<em class="structfield"><code>fmt.pixelformat</code></em> field), with bytes in host
101order. E.&#160;g. for <a class="link" href="packed-rgb.html#V4L2-PIX-FMT-BGR32"><code class="constant">V4L2_PIX_FMT_BGR24</code></a>
102the value should be 0xRRGGBB on a little endian, 0xBBGGRR on a big
103endian host.</td></tr><tr><td valign="top">struct&#160;<a class="link" href="overlay.html#v4l2-clip" title="Table&#160;4.2.&#160;struct v4l2_clip">v4l2_clip</a> *</td><td valign="top"><em class="structfield"><code>clips</code></em></td><td valign="top">When chroma-keying has <span class="emphasis"><em>not</em></span>
104been negotiated and <a class="link" href="vidioc-g-fbuf.html" title="ioctl VIDIOC_G_FBUF, VIDIOC_S_FBUF"><code class="constant">VIDIOC_G_FBUF</code></a> indicated this capability,
105applications can set this field to point to an array of
106clipping rectangles.</td></tr><tr><td valign="top">&#160;</td><td valign="top">&#160;</td><td valign="top">Like the window coordinates
107<em class="structfield"><code>w</code></em>, clipping rectangles are defined relative
108to the top, left corner of the frame buffer. However clipping
109rectangles must not extend the frame buffer width and height, and they
110must not overlap. If possible applications should merge adjacent
111rectangles. Whether this must create x-y or y-x bands, or the order of
112rectangles, is not defined. When clip lists are not supported the
113driver ignores this field. Its contents after calling <a class="link" href="vidioc-g-fmt.html" title="ioctl VIDIOC_G_FMT, VIDIOC_S_FMT, VIDIOC_TRY_FMT"><code class="constant">VIDIOC_S_FMT</code></a>
114are undefined.</td></tr><tr><td valign="top">__u32</td><td valign="top"><em class="structfield"><code>clipcount</code></em></td><td valign="top">When the application set the
115<em class="structfield"><code>clips</code></em> field, this field must contain the
116number of clipping rectangles in the list. When clip lists are not
117supported the driver ignores this field, its contents after calling
118<code class="constant">VIDIOC_S_FMT</code> are undefined. When clip lists are
119supported but no clipping is desired this field must be set to
120zero.</td></tr><tr><td valign="top">void *</td><td valign="top"><em class="structfield"><code>bitmap</code></em></td><td valign="top">When chroma-keying has
121<span class="emphasis"><em>not</em></span> been negotiated and <a class="link" href="vidioc-g-fbuf.html" title="ioctl VIDIOC_G_FBUF, VIDIOC_S_FBUF"><code class="constant">VIDIOC_G_FBUF</code></a> indicated
122this capability, applications can set this field to point to a
123clipping bit mask.</td></tr><tr><td colspan="3" valign="top"><p>It must be of the same size
124as the window, <em class="structfield"><code>w.width</code></em> and
125<em class="structfield"><code>w.height</code></em>. Each bit corresponds to a pixel
126in the overlaid image, which is displayed only when the bit is
127<span class="emphasis"><em>set</em></span>. Pixel coordinates translate to bits like:
128</p><pre class="programlisting">
129((__u8 *) <em class="structfield"><code>bitmap</code></em>)[<em class="structfield"><code>w.width</code></em> * y + x / 8] &amp; (1 &lt;&lt; (x &amp; 7))</pre><p>where <em class="structfield"><code>0</code></em> &#8804; x &lt;
130<em class="structfield"><code>w.width</code></em> and <em class="structfield"><code>0</code></em> &#8804;
131y &lt;<em class="structfield"><code>w.height</code></em>.<a href="#ftn.idp1105248748" class="footnote" name="idp1105248748"><sup class="footnote">[a]</sup></a></p><p>When a clipping
132bit mask is not supported the driver ignores this field, its contents
133after calling <a class="link" href="vidioc-g-fmt.html" title="ioctl VIDIOC_G_FMT, VIDIOC_S_FMT, VIDIOC_TRY_FMT"><code class="constant">VIDIOC_S_FMT</code></a> are undefined. When a bit mask is supported
134but no clipping is desired this field must be set to
135<code class="constant">NULL</code>.</p><p>Applications need not create a
136clip list or bit mask. When they pass both, or despite negotiating
137chroma-keying, the results are undefined. Regardless of the chosen
138method, the clipping abilities of the hardware may be limited in
139quantity or quality. The results when these limits are exceeded are
140undefined.<a href="#ftn.idp1105250892" class="footnote" name="idp1105250892"><sup class="footnote">[b]</sup></a></p></td></tr><tr><td valign="top">__u8</td><td valign="top"><em class="structfield"><code>global_alpha</code></em></td><td valign="top">The global alpha value used to blend the
141framebuffer with video images, if global alpha blending has been
142negotiated (<code class="constant">V4L2_FBUF_FLAG_GLOBAL_ALPHA</code>, see
143<a class="link" href="vidioc-g-fbuf.html" title="ioctl VIDIOC_G_FBUF, VIDIOC_S_FBUF"><code class="constant">VIDIOC_S_FBUF</code></a>, <a class="xref" href="vidioc-g-fbuf.html#framebuffer-flags" title="Table&#160;A.71.&#160;Frame Buffer Flags">Table&#160;A.71, &#8220;Frame Buffer Flags&#8221;</a>).</td></tr><tr><td valign="top">&#160;</td><td valign="top">&#160;</td><td valign="top">Note this field was added in Linux 2.6.23, extending the structure. However
144the <a class="link" href="vidioc-g-fmt.html" title="ioctl VIDIOC_G_FMT, VIDIOC_S_FMT, VIDIOC_TRY_FMT">VIDIOC_G/S/TRY_FMT</a> ioctls,
145which take a pointer to a <a class="link" href="vidioc-g-fmt.html#v4l2-format" title="Table&#160;A.72.&#160;struct v4l2_format">v4l2_format</a> parent structure with padding
146bytes at the end, are not affected.</td></tr></tbody><tbody class="footnotes"><tr><td colspan="3"><div id="ftn.idp1105248748" class="footnote"><p><a href="#idp1105248748" class="para"><sup class="para">[a] </sup></a>Should we require
147	      <em class="structfield"><code>w.width</code></em> to be a multiple of
148	      eight?</p></div><div id="ftn.idp1105250892" class="footnote"><p><a href="#idp1105250892" class="para"><sup class="para">[b] </sup></a>When the image is written into frame buffer
149memory it will be undesirable if the driver clips out less pixels
150than expected, because the application and graphics system are not
151aware these regions need to be refreshed. The driver should clip out
152more pixels or not write the image at all.</p></div></td></tr></tbody></table></div></div><br class="table-break"><div class="table"><a name="v4l2-clip"></a><p class="title"><b>Table&#160;4.2.&#160;struct <span class="structname">v4l2_clip</span><a href="#ftn.idp1105256548" class="footnote" name="idp1105256548"><sup class="footnote">[a]</sup></a></b></p><div class="table-contents"><table summary='struct v4l2_clipThe X Window system defines "regions" which are
153vectors of struct BoxRec { short x1, y1, x2, y2; } with width = x2 -
154x1 and height = y2 - y1, so one cannot pass X11 clip lists
155directly.' width="100%" border="0"><colgroup><col class="c1"><col class="c2"><col class="c3"></colgroup><tbody valign="top"><tr><td valign="top">struct&#160;<a class="link" href="overlay.html#v4l2-rect" title="Table&#160;4.3.&#160;struct v4l2_rect">v4l2_rect</a></td><td valign="top"><em class="structfield"><code>c</code></em></td><td valign="top">Coordinates of the clipping rectangle, relative to
156the top, left corner of the frame buffer. Only window pixels
157<span class="emphasis"><em>outside</em></span> all clipping rectangles are
158displayed.</td></tr><tr><td valign="top">struct&#160;<a class="link" href="overlay.html#v4l2-clip" title="Table&#160;4.2.&#160;struct v4l2_clip">v4l2_clip</a> *</td><td valign="top"><em class="structfield"><code>next</code></em></td><td valign="top">Pointer to the next clipping rectangle, NULL when
159this is the last rectangle. Drivers ignore this field, it cannot be
160used to pass a linked list of clipping rectangles.</td></tr></tbody><tbody class="footnotes"><tr><td colspan="3"><div id="ftn.idp1105256548" class="footnote"><p><a href="#idp1105256548" class="para"><sup class="para">[a] </sup></a>The X Window system defines "regions" which are
161vectors of struct BoxRec { short x1, y1, x2, y2; } with width = x2 -
162x1 and height = y2 - y1, so one cannot pass X11 clip lists
163directly.</p></div></td></tr></tbody></table></div></div><br class="table-break"><div class="table"><a name="v4l2-rect"></a><p class="title"><b>Table&#160;4.3.&#160;struct <span class="structname">v4l2_rect</span></b></p><div class="table-contents"><table summary="struct v4l2_rect" width="100%" border="0"><colgroup><col class="c1"><col class="c2"><col class="c3"></colgroup><tbody valign="top"><tr><td valign="top">__s32</td><td valign="top"><em class="structfield"><code>left</code></em></td><td valign="top">Horizontal offset of the top, left corner of the
164rectangle, in pixels.</td></tr><tr><td valign="top">__s32</td><td valign="top"><em class="structfield"><code>top</code></em></td><td valign="top">Vertical offset of the top, left corner of the
165rectangle, in pixels. Offsets increase to the right and down.</td></tr><tr><td valign="top">__u32</td><td valign="top"><em class="structfield"><code>width</code></em></td><td valign="top">Width of the rectangle, in pixels.</td></tr><tr><td valign="top">__u32</td><td valign="top"><em class="structfield"><code>height</code></em></td><td valign="top">Height of the rectangle, in pixels.</td></tr></tbody></table></div></div><br class="table-break"></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="idp1105269452"></a>Enabling Overlay</h3></div></div></div><p>To start or stop the frame buffer overlay applications call
166the <a class="link" href="vidioc-overlay.html" title="ioctl VIDIOC_OVERLAY"><code class="constant">VIDIOC_OVERLAY</code></a> ioctl.</p></div><div class="footnotes"><br><hr style="width:100; text-align:left;margin-left: 0"><div id="ftn.idp1105139364" class="footnote"><p><a href="#idp1105139364" class="para"><sup class="para">[15] </sup></a>A common application of two file descriptors is the
167XFree86 <a class="link" href="hist-v4l2.html#xvideo" title="X Video Extension">Xv/V4L</a> interface driver and
168a V4L2 application. While the X server controls video overlay, the
169application can take advantage of memory mapping and DMA.</p><p>In the opinion of the designers of this API, no driver
170writer taking the efforts to support simultaneous capturing and
171overlay will restrict this ability by requiring a single file
172descriptor, as in V4L and earlier versions of V4L2. Making this
173optional means applications depending on two file descriptors need
174backup routines to be compatible with all drivers, which is
175considerable more work than using two fds in applications which do
176not. Also two fd's fit the general concept of one file descriptor for
177each logical stream. Hence as a complexity trade-off drivers
178<span class="emphasis"><em>must</em></span> support two file descriptors and
179<span class="emphasis"><em>may</em></span> support single fd operation.</p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="devices.html">Prev</a>&#160;</td><td width="20%" align="center"><a accesskey="u" href="devices.html">Up</a></td><td width="40%" align="right">&#160;<a accesskey="n" href="output.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter&#160;4.&#160;Interfaces&#160;</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">&#160;Video Output Interface</td></tr></table></div></body></html>
180