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