• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd">
2<HTML
3><HEAD
4><TITLE
5>Relation of V4L2 to other Linux multimedia APIs</TITLE
6><META
7NAME="GENERATOR"
8CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK
9REL="HOME"
10TITLE="Video for Linux Two API Specification"
11HREF="book1.htm"><LINK
12REL="UP"
13TITLE="Changes"
14HREF="c14595.htm"><LINK
15REL="PREVIOUS"
16TITLE="Changes of the V4L2 API"
17HREF="x15446.htm"><LINK
18REL="NEXT"
19TITLE="Experimental API Elements"
20HREF="x16453.htm"></HEAD
21><BODY
22CLASS="SECTION"
23BGCOLOR="#FFFFFF"
24TEXT="#000000"
25LINK="#0000FF"
26VLINK="#840084"
27ALINK="#0000FF"
28><DIV
29CLASS="NAVHEADER"
30><TABLE
31SUMMARY="Header navigation table"
32WIDTH="100%"
33BORDER="0"
34CELLPADDING="0"
35CELLSPACING="0"
36><TR
37><TH
38COLSPAN="3"
39ALIGN="center"
40>Video for Linux Two API Specification: Revision 0.24</TH
41></TR
42><TR
43><TD
44WIDTH="10%"
45ALIGN="left"
46VALIGN="bottom"
47><A
48HREF="x15446.htm"
49ACCESSKEY="P"
50>Prev</A
51></TD
52><TD
53WIDTH="80%"
54ALIGN="center"
55VALIGN="bottom"
56>Chapter 6. Changes</TD
57><TD
58WIDTH="10%"
59ALIGN="right"
60VALIGN="bottom"
61><A
62HREF="x16453.htm"
63ACCESSKEY="N"
64>Next</A
65></TD
66></TR
67></TABLE
68><HR
69ALIGN="LEFT"
70WIDTH="100%"></DIV
71><DIV
72CLASS="SECTION"
73><H1
74CLASS="SECTION"
75><A
76NAME="OTHER"
77>6.3. Relation of V4L2 to other Linux multimedia APIs</A
78></H1
79><DIV
80CLASS="SECTION"
81><H2
82CLASS="SECTION"
83><A
84NAME="XVIDEO"
85>6.3.1. X Video Extension</A
86></H2
87><P
88>The X Video Extension (abbreviated XVideo or just Xv) is
89an extension of the X Window system, implemented for example by the
90XFree86 project. Its scope is similar to V4L2, an API to video capture
91and output devices for X clients. Xv allows applications to display
92live video in a window, send window contents to a TV output, and
93capture or output still images in XPixmaps<A
94NAME="AEN16435"
95HREF="x16430.htm#FTN.AEN16435"
96><SPAN
97CLASS="footnote"
98>[1]</SPAN
99></A
100>. With their implementation XFree86 makes the
101extension available across many operating systems and
102architectures.</P
103><P
104>Because the driver is embedded into the X server Xv has a
105number of advantages over the V4L2 <A
106HREF="x6570.htm"
107>video
108overlay interface</A
109>. The driver can easily determine the overlay
110target, i.&nbsp;e. visible graphics memory or off-screen buffers for a
111destructive overlay. It can program the RAMDAC for a non-destructive
112overlay, scaling or color-keying, or the clipping functions of the
113video capture hardware, always in sync with drawing operations or
114windows moving or changing their stacking order.</P
115><P
116>To combine the advantages of Xv and V4L a special Xv
117driver exists in XFree86 and XOrg, just programming any overlay capable
118Video4Linux device it finds. To enable it
119<TT
120CLASS="FILENAME"
121>/etc/X11/XF86Config</TT
122> must contain these lines:</P
123><P
124><PRE
125CLASS="SCREEN"
126>Section "Module"
127    Load "v4l"
128EndSection</PRE
129></P
130><P
131>As of XFree86 4.2 this driver still supports only V4L
132ioctls, however it should work just fine with all V4L2 devices through
133the V4L2 backward-compatibility layer. Since V4L2 permits multiple
134opens it is possible (if supported by the V4L2 driver) to capture
135video while an X client requested video overlay. Restrictions of
136simultaneous capturing and overlay are discussed in <A
137HREF="x6570.htm"
138>Section 4.2</A
139> apply.</P
140><P
141>Only marginally related to V4L2, XFree86 extended Xv to
142support hardware YUV to RGB conversion and scaling for faster video
143playback, and added an interface to MPEG-2 decoding hardware. This API
144is useful to display images captured with V4L2 devices.</P
145></DIV
146><DIV
147CLASS="SECTION"
148><H2
149CLASS="SECTION"
150><A
151NAME="AEN16446"
152>6.3.2. Digital Video</A
153></H2
154><P
155>V4L2 does not support digital terrestrial, cable or
156satellite broadcast. A separate project aiming at digital receivers
157exists. You can find its homepage at <A
158HREF="http://linuxtv.org"
159TARGET="_top"
160>http://linuxtv.org</A
161>. The Linux DVB API
162has no connection to the V4L2 API except that drivers for hybrid
163hardware may support both.</P
164></DIV
165><DIV
166CLASS="SECTION"
167><H2
168CLASS="SECTION"
169><A
170NAME="AEN16450"
171>6.3.3. Audio Interfaces</A
172></H2
173><P
174>[to do - OSS/ALSA]</P
175></DIV
176></DIV
177><H3
178CLASS="FOOTNOTES"
179>Notes</H3
180><TABLE
181BORDER="0"
182CLASS="FOOTNOTES"
183WIDTH="100%"
184><TR
185><TD
186ALIGN="LEFT"
187VALIGN="TOP"
188WIDTH="5%"
189><A
190NAME="FTN.AEN16435"
191HREF="x16430.htm#AEN16435"
192><SPAN
193CLASS="footnote"
194>[1]</SPAN
195></A
196></TD
197><TD
198ALIGN="LEFT"
199VALIGN="TOP"
200WIDTH="95%"
201><P
202>This is not implemented in XFree86.</P
203></TD
204></TR
205></TABLE
206><DIV
207CLASS="NAVFOOTER"
208><HR
209ALIGN="LEFT"
210WIDTH="100%"><TABLE
211SUMMARY="Footer navigation table"
212WIDTH="100%"
213BORDER="0"
214CELLPADDING="0"
215CELLSPACING="0"
216><TR
217><TD
218WIDTH="33%"
219ALIGN="left"
220VALIGN="top"
221><A
222HREF="x15446.htm"
223ACCESSKEY="P"
224>Prev</A
225></TD
226><TD
227WIDTH="34%"
228ALIGN="center"
229VALIGN="top"
230><A
231HREF="book1.htm"
232ACCESSKEY="H"
233>Home</A
234></TD
235><TD
236WIDTH="33%"
237ALIGN="right"
238VALIGN="top"
239><A
240HREF="x16453.htm"
241ACCESSKEY="N"
242>Next</A
243></TD
244></TR
245><TR
246><TD
247WIDTH="33%"
248ALIGN="left"
249VALIGN="top"
250>Changes of the V4L2 API</TD
251><TD
252WIDTH="34%"
253ALIGN="center"
254VALIGN="top"
255><A
256HREF="c14595.htm"
257ACCESSKEY="U"
258>Up</A
259></TD
260><TD
261WIDTH="33%"
262ALIGN="right"
263VALIGN="top"
264>Experimental API Elements</TD
265></TR
266></TABLE
267></DIV
268></BODY
269></HTML
270>
271