compat.xml 94 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457
  1. <title>Changes</title>
  2. <para>The following chapters document the evolution of the V4L2 API,
  3. errata or extensions. They are also intended to help application and
  4. driver writers to port or update their code.</para>
  5. <section id="diff-v4l">
  6. <title>Differences between V4L and V4L2</title>
  7. <para>The Video For Linux API was first introduced in Linux 2.1 to
  8. unify and replace various TV and radio device related interfaces,
  9. developed independently by driver writers in prior years. Starting
  10. with Linux 2.5 the much improved V4L2 API replaces the V4L API,
  11. although existing drivers will continue to support V4L applications in
  12. the future, either directly or through the V4L2 compatibility layer in
  13. the <filename>videodev</filename> kernel module translating ioctls on
  14. the fly. For a transition period not all drivers will support the V4L2
  15. API.</para>
  16. <section>
  17. <title>Opening and Closing Devices</title>
  18. <para>For compatibility reasons the character device file names
  19. recommended for V4L2 video capture, overlay, radio, teletext and raw
  20. vbi capture devices did not change from those used by V4L. They are
  21. listed in <xref linkend="devices" /> and below in <xref
  22. linkend="v4l-dev" />.</para>
  23. <para>The V4L <filename>videodev</filename> module automatically
  24. assigns minor numbers to drivers in load order, depending on the
  25. registered device type. We recommend that V4L2 drivers by default
  26. register devices with the same numbers, but the system administrator
  27. can assign arbitrary minor numbers using driver module options. The
  28. major device number remains 81.</para>
  29. <table id="v4l-dev">
  30. <title>V4L Device Types, Names and Numbers</title>
  31. <tgroup cols="3">
  32. <thead>
  33. <row>
  34. <entry>Device Type</entry>
  35. <entry>File Name</entry>
  36. <entry>Minor Numbers</entry>
  37. </row>
  38. </thead>
  39. <tbody valign="top">
  40. <row>
  41. <entry>Video capture and overlay</entry>
  42. <entry><para><filename>/dev/video</filename> and
  43. <filename>/dev/bttv0</filename><footnote> <para>According to
  44. Documentation/devices.txt these should be symbolic links to
  45. <filename>/dev/video0</filename>. Note the original bttv interface is
  46. not compatible with V4L or V4L2.</para> </footnote>,
  47. <filename>/dev/video0</filename> to
  48. <filename>/dev/video63</filename></para></entry>
  49. <entry>0-63</entry>
  50. </row>
  51. <row>
  52. <entry>Radio receiver</entry>
  53. <entry><para><filename>/dev/radio</filename><footnote>
  54. <para>According to
  55. <filename>Documentation/devices.txt</filename> a symbolic link to
  56. <filename>/dev/radio0</filename>.</para>
  57. </footnote>, <filename>/dev/radio0</filename> to
  58. <filename>/dev/radio63</filename></para></entry>
  59. <entry>64-127</entry>
  60. </row>
  61. <row>
  62. <entry>Teletext decoder</entry>
  63. <entry><para><filename>/dev/vtx</filename>,
  64. <filename>/dev/vtx0</filename> to
  65. <filename>/dev/vtx31</filename></para></entry>
  66. <entry>192-223</entry>
  67. </row>
  68. <row>
  69. <entry>Raw VBI capture</entry>
  70. <entry><para><filename>/dev/vbi</filename>,
  71. <filename>/dev/vbi0</filename> to
  72. <filename>/dev/vbi31</filename></para></entry>
  73. <entry>224-255</entry>
  74. </row>
  75. </tbody>
  76. </tgroup>
  77. </table>
  78. <para>V4L prohibits (or used to prohibit) multiple opens of a
  79. device file. V4L2 drivers <emphasis>may</emphasis> support multiple
  80. opens, see <xref linkend="open" /> for details and consequences.</para>
  81. <para>V4L drivers respond to V4L2 ioctls with an &EINVAL;. The
  82. compatibility layer in the V4L2 <filename>videodev</filename> module
  83. can translate V4L ioctl requests to their V4L2 counterpart, however a
  84. V4L2 driver usually needs more preparation to become fully V4L
  85. compatible. This is covered in more detail in <xref
  86. linkend="driver" />.</para>
  87. </section>
  88. <section>
  89. <title>Querying Capabilities</title>
  90. <para>The V4L <constant>VIDIOCGCAP</constant> ioctl is
  91. equivalent to V4L2's &VIDIOC-QUERYCAP;.</para>
  92. <para>The <structfield>name</structfield> field in struct
  93. <structname>video_capability</structname> became
  94. <structfield>card</structfield> in &v4l2-capability;,
  95. <structfield>type</structfield> was replaced by
  96. <structfield>capabilities</structfield>. Note V4L2 does not
  97. distinguish between device types like this, better think of basic
  98. video input, video output and radio devices supporting a set of
  99. related functions like video capturing, video overlay and VBI
  100. capturing. See <xref linkend="open" /> for an
  101. introduction.<informaltable>
  102. <tgroup cols="3">
  103. <thead>
  104. <row>
  105. <entry>struct
  106. <structname>video_capability</structname>
  107. <structfield>type</structfield></entry>
  108. <entry>&v4l2-capability;
  109. <structfield>capabilities</structfield> flags</entry>
  110. <entry>Purpose</entry>
  111. </row>
  112. </thead>
  113. <tbody valign="top">
  114. <row>
  115. <entry><constant>VID_TYPE_CAPTURE</constant></entry>
  116. <entry><constant>V4L2_CAP_VIDEO_CAPTURE</constant></entry>
  117. <entry>The <link linkend="capture">video
  118. capture</link> interface is supported.</entry>
  119. </row>
  120. <row>
  121. <entry><constant>VID_TYPE_TUNER</constant></entry>
  122. <entry><constant>V4L2_CAP_TUNER</constant></entry>
  123. <entry>The device has a <link linkend="tuner">tuner or
  124. modulator</link>.</entry>
  125. </row>
  126. <row>
  127. <entry><constant>VID_TYPE_TELETEXT</constant></entry>
  128. <entry><constant>V4L2_CAP_VBI_CAPTURE</constant></entry>
  129. <entry>The <link linkend="raw-vbi">raw VBI
  130. capture</link> interface is supported.</entry>
  131. </row>
  132. <row>
  133. <entry><constant>VID_TYPE_OVERLAY</constant></entry>
  134. <entry><constant>V4L2_CAP_VIDEO_OVERLAY</constant></entry>
  135. <entry>The <link linkend="overlay">video
  136. overlay</link> interface is supported.</entry>
  137. </row>
  138. <row>
  139. <entry><constant>VID_TYPE_CHROMAKEY</constant></entry>
  140. <entry><constant>V4L2_FBUF_CAP_CHROMAKEY</constant> in
  141. field <structfield>capability</structfield> of
  142. &v4l2-framebuffer;</entry>
  143. <entry>Whether chromakey overlay is supported. For
  144. more information on overlay see
  145. <xref linkend="overlay" />.</entry>
  146. </row>
  147. <row>
  148. <entry><constant>VID_TYPE_CLIPPING</constant></entry>
  149. <entry><constant>V4L2_FBUF_CAP_LIST_CLIPPING</constant>
  150. and <constant>V4L2_FBUF_CAP_BITMAP_CLIPPING</constant> in field
  151. <structfield>capability</structfield> of &v4l2-framebuffer;</entry>
  152. <entry>Whether clipping the overlaid image is
  153. supported, see <xref linkend="overlay" />.</entry>
  154. </row>
  155. <row>
  156. <entry><constant>VID_TYPE_FRAMERAM</constant></entry>
  157. <entry><constant>V4L2_FBUF_CAP_EXTERNOVERLAY</constant>
  158. <emphasis>not set</emphasis> in field
  159. <structfield>capability</structfield> of &v4l2-framebuffer;</entry>
  160. <entry>Whether overlay overwrites frame buffer memory,
  161. see <xref linkend="overlay" />.</entry>
  162. </row>
  163. <row>
  164. <entry><constant>VID_TYPE_SCALES</constant></entry>
  165. <entry><constant>-</constant></entry>
  166. <entry>This flag indicates if the hardware can scale
  167. images. The V4L2 API implies the scale factor by setting the cropping
  168. dimensions and image size with the &VIDIOC-S-CROP; and &VIDIOC-S-FMT;
  169. ioctl, respectively. The driver returns the closest sizes possible.
  170. For more information on cropping and scaling see <xref
  171. linkend="crop" />.</entry>
  172. </row>
  173. <row>
  174. <entry><constant>VID_TYPE_MONOCHROME</constant></entry>
  175. <entry><constant>-</constant></entry>
  176. <entry>Applications can enumerate the supported image
  177. formats with the &VIDIOC-ENUM-FMT; ioctl to determine if the device
  178. supports grey scale capturing only. For more information on image
  179. formats see <xref linkend="pixfmt" />.</entry>
  180. </row>
  181. <row>
  182. <entry><constant>VID_TYPE_SUBCAPTURE</constant></entry>
  183. <entry><constant>-</constant></entry>
  184. <entry>Applications can call the &VIDIOC-G-CROP; ioctl
  185. to determine if the device supports capturing a subsection of the full
  186. picture ("cropping" in V4L2). If not, the ioctl returns the &EINVAL;.
  187. For more information on cropping and scaling see <xref
  188. linkend="crop" />.</entry>
  189. </row>
  190. <row>
  191. <entry><constant>VID_TYPE_MPEG_DECODER</constant></entry>
  192. <entry><constant>-</constant></entry>
  193. <entry>Applications can enumerate the supported image
  194. formats with the &VIDIOC-ENUM-FMT; ioctl to determine if the device
  195. supports MPEG streams.</entry>
  196. </row>
  197. <row>
  198. <entry><constant>VID_TYPE_MPEG_ENCODER</constant></entry>
  199. <entry><constant>-</constant></entry>
  200. <entry>See above.</entry>
  201. </row>
  202. <row>
  203. <entry><constant>VID_TYPE_MJPEG_DECODER</constant></entry>
  204. <entry><constant>-</constant></entry>
  205. <entry>See above.</entry>
  206. </row>
  207. <row>
  208. <entry><constant>VID_TYPE_MJPEG_ENCODER</constant></entry>
  209. <entry><constant>-</constant></entry>
  210. <entry>See above.</entry>
  211. </row>
  212. </tbody>
  213. </tgroup>
  214. </informaltable></para>
  215. <para>The <structfield>audios</structfield> field was replaced
  216. by <structfield>capabilities</structfield> flag
  217. <constant>V4L2_CAP_AUDIO</constant>, indicating
  218. <emphasis>if</emphasis> the device has any audio inputs or outputs. To
  219. determine their number applications can enumerate audio inputs with
  220. the &VIDIOC-G-AUDIO; ioctl. The audio ioctls are described in <xref
  221. linkend="audio" />.</para>
  222. <para>The <structfield>maxwidth</structfield>,
  223. <structfield>maxheight</structfield>,
  224. <structfield>minwidth</structfield> and
  225. <structfield>minheight</structfield> fields were removed. Calling the
  226. &VIDIOC-S-FMT; or &VIDIOC-TRY-FMT; ioctl with the desired dimensions
  227. returns the closest size possible, taking into account the current
  228. video standard, cropping and scaling limitations.</para>
  229. </section>
  230. <section>
  231. <title>Video Sources</title>
  232. <para>V4L provides the <constant>VIDIOCGCHAN</constant> and
  233. <constant>VIDIOCSCHAN</constant> ioctl using struct
  234. <structname>video_channel</structname> to enumerate
  235. the video inputs of a V4L device. The equivalent V4L2 ioctls
  236. are &VIDIOC-ENUMINPUT;, &VIDIOC-G-INPUT; and &VIDIOC-S-INPUT;
  237. using &v4l2-input; as discussed in <xref linkend="video" />.</para>
  238. <para>The <structfield>channel</structfield> field counting
  239. inputs was renamed to <structfield>index</structfield>, the video
  240. input types were renamed as follows: <informaltable>
  241. <tgroup cols="2">
  242. <thead>
  243. <row>
  244. <entry>struct <structname>video_channel</structname>
  245. <structfield>type</structfield></entry>
  246. <entry>&v4l2-input;
  247. <structfield>type</structfield></entry>
  248. </row>
  249. </thead>
  250. <tbody valign="top">
  251. <row>
  252. <entry><constant>VIDEO_TYPE_TV</constant></entry>
  253. <entry><constant>V4L2_INPUT_TYPE_TUNER</constant></entry>
  254. </row>
  255. <row>
  256. <entry><constant>VIDEO_TYPE_CAMERA</constant></entry>
  257. <entry><constant>V4L2_INPUT_TYPE_CAMERA</constant></entry>
  258. </row>
  259. </tbody>
  260. </tgroup>
  261. </informaltable></para>
  262. <para>Unlike the <structfield>tuners</structfield> field
  263. expressing the number of tuners of this input, V4L2 assumes each video
  264. input is connected to at most one tuner. However a tuner can have more
  265. than one input, &ie; RF connectors, and a device can have multiple
  266. tuners. The index number of the tuner associated with the input, if
  267. any, is stored in field <structfield>tuner</structfield> of
  268. &v4l2-input;. Enumeration of tuners is discussed in <xref
  269. linkend="tuner" />.</para>
  270. <para>The redundant <constant>VIDEO_VC_TUNER</constant> flag was
  271. dropped. Video inputs associated with a tuner are of type
  272. <constant>V4L2_INPUT_TYPE_TUNER</constant>. The
  273. <constant>VIDEO_VC_AUDIO</constant> flag was replaced by the
  274. <structfield>audioset</structfield> field. V4L2 considers devices with
  275. up to 32 audio inputs. Each set bit in the
  276. <structfield>audioset</structfield> field represents one audio input
  277. this video input combines with. For information about audio inputs and
  278. how to switch between them see <xref linkend="audio" />.</para>
  279. <para>The <structfield>norm</structfield> field describing the
  280. supported video standards was replaced by
  281. <structfield>std</structfield>. The V4L specification mentions a flag
  282. <constant>VIDEO_VC_NORM</constant> indicating whether the standard can
  283. be changed. This flag was a later addition together with the
  284. <structfield>norm</structfield> field and has been removed in the
  285. meantime. V4L2 has a similar, albeit more comprehensive approach
  286. to video standards, see <xref linkend="standard" /> for more
  287. information.</para>
  288. </section>
  289. <section>
  290. <title>Tuning</title>
  291. <para>The V4L <constant>VIDIOCGTUNER</constant> and
  292. <constant>VIDIOCSTUNER</constant> ioctl and struct
  293. <structname>video_tuner</structname> can be used to enumerate the
  294. tuners of a V4L TV or radio device. The equivalent V4L2 ioctls are
  295. &VIDIOC-G-TUNER; and &VIDIOC-S-TUNER; using &v4l2-tuner;. Tuners are
  296. covered in <xref linkend="tuner" />.</para>
  297. <para>The <structfield>tuner</structfield> field counting tuners
  298. was renamed to <structfield>index</structfield>. The fields
  299. <structfield>name</structfield>, <structfield>rangelow</structfield>
  300. and <structfield>rangehigh</structfield> remained unchanged.</para>
  301. <para>The <constant>VIDEO_TUNER_PAL</constant>,
  302. <constant>VIDEO_TUNER_NTSC</constant> and
  303. <constant>VIDEO_TUNER_SECAM</constant> flags indicating the supported
  304. video standards were dropped. This information is now contained in the
  305. associated &v4l2-input;. No replacement exists for the
  306. <constant>VIDEO_TUNER_NORM</constant> flag indicating whether the
  307. video standard can be switched. The <structfield>mode</structfield>
  308. field to select a different video standard was replaced by a whole new
  309. set of ioctls and structures described in <xref linkend="standard" />.
  310. Due to its ubiquity it should be mentioned the BTTV driver supports
  311. several standards in addition to the regular
  312. <constant>VIDEO_MODE_PAL</constant> (0),
  313. <constant>VIDEO_MODE_NTSC</constant>,
  314. <constant>VIDEO_MODE_SECAM</constant> and
  315. <constant>VIDEO_MODE_AUTO</constant> (3). Namely N/PAL Argentina,
  316. M/PAL, N/PAL, and NTSC Japan with numbers 3-6 (sic).</para>
  317. <para>The <constant>VIDEO_TUNER_STEREO_ON</constant> flag
  318. indicating stereo reception became
  319. <constant>V4L2_TUNER_SUB_STEREO</constant> in field
  320. <structfield>rxsubchans</structfield>. This field also permits the
  321. detection of monaural and bilingual audio, see the definition of
  322. &v4l2-tuner; for details. Presently no replacement exists for the
  323. <constant>VIDEO_TUNER_RDS_ON</constant> and
  324. <constant>VIDEO_TUNER_MBS_ON</constant> flags.</para>
  325. <para> The <constant>VIDEO_TUNER_LOW</constant> flag was renamed
  326. to <constant>V4L2_TUNER_CAP_LOW</constant> in the &v4l2-tuner;
  327. <structfield>capability</structfield> field.</para>
  328. <para>The <constant>VIDIOCGFREQ</constant> and
  329. <constant>VIDIOCSFREQ</constant> ioctl to change the tuner frequency
  330. where renamed to &VIDIOC-G-FREQUENCY; and &VIDIOC-S-FREQUENCY;. They
  331. take a pointer to a &v4l2-frequency; instead of an unsigned long
  332. integer.</para>
  333. </section>
  334. <section id="v4l-image-properties">
  335. <title>Image Properties</title>
  336. <para>V4L2 has no equivalent of the
  337. <constant>VIDIOCGPICT</constant> and <constant>VIDIOCSPICT</constant>
  338. ioctl and struct <structname>video_picture</structname>. The following
  339. fields where replaced by V4L2 controls accessible with the
  340. &VIDIOC-QUERYCTRL;, &VIDIOC-G-CTRL; and &VIDIOC-S-CTRL; ioctls:<informaltable>
  341. <tgroup cols="2">
  342. <thead>
  343. <row>
  344. <entry>struct <structname>video_picture</structname></entry>
  345. <entry>V4L2 Control ID</entry>
  346. </row>
  347. </thead>
  348. <tbody valign="top">
  349. <row>
  350. <entry><structfield>brightness</structfield></entry>
  351. <entry><constant>V4L2_CID_BRIGHTNESS</constant></entry>
  352. </row>
  353. <row>
  354. <entry><structfield>hue</structfield></entry>
  355. <entry><constant>V4L2_CID_HUE</constant></entry>
  356. </row>
  357. <row>
  358. <entry><structfield>colour</structfield></entry>
  359. <entry><constant>V4L2_CID_SATURATION</constant></entry>
  360. </row>
  361. <row>
  362. <entry><structfield>contrast</structfield></entry>
  363. <entry><constant>V4L2_CID_CONTRAST</constant></entry>
  364. </row>
  365. <row>
  366. <entry><structfield>whiteness</structfield></entry>
  367. <entry><constant>V4L2_CID_WHITENESS</constant></entry>
  368. </row>
  369. </tbody>
  370. </tgroup>
  371. </informaltable></para>
  372. <para>The V4L picture controls are assumed to range from 0 to
  373. 65535 with no particular reset value. The V4L2 API permits arbitrary
  374. limits and defaults which can be queried with the &VIDIOC-QUERYCTRL;
  375. ioctl. For general information about controls see <xref
  376. linkend="control" />.</para>
  377. <para>The <structfield>depth</structfield> (average number of
  378. bits per pixel) of a video image is implied by the selected image
  379. format. V4L2 does not explicitely provide such information assuming
  380. applications recognizing the format are aware of the image depth and
  381. others need not know. The <structfield>palette</structfield> field
  382. moved into the &v4l2-pix-format;:<informaltable>
  383. <tgroup cols="2">
  384. <thead>
  385. <row>
  386. <entry>struct <structname>video_picture</structname>
  387. <structfield>palette</structfield></entry>
  388. <entry>&v4l2-pix-format;
  389. <structfield>pixfmt</structfield></entry>
  390. </row>
  391. </thead>
  392. <tbody valign="top">
  393. <row>
  394. <entry><constant>VIDEO_PALETTE_GREY</constant></entry>
  395. <entry><para><link
  396. linkend="V4L2-PIX-FMT-GREY"><constant>V4L2_PIX_FMT_GREY</constant></link></para></entry>
  397. </row>
  398. <row>
  399. <entry><constant>VIDEO_PALETTE_HI240</constant></entry>
  400. <entry><para><link
  401. linkend="pixfmt-reserved"><constant>V4L2_PIX_FMT_HI240</constant></link><footnote>
  402. <para>This is a custom format used by the BTTV
  403. driver, not one of the V4L2 standard formats.</para>
  404. </footnote></para></entry>
  405. </row>
  406. <row>
  407. <entry><constant>VIDEO_PALETTE_RGB565</constant></entry>
  408. <entry><para><link
  409. linkend="pixfmt-rgb"><constant>V4L2_PIX_FMT_RGB565</constant></link></para></entry>
  410. </row>
  411. <row>
  412. <entry><constant>VIDEO_PALETTE_RGB555</constant></entry>
  413. <entry><para><link
  414. linkend="pixfmt-rgb"><constant>V4L2_PIX_FMT_RGB555</constant></link></para></entry>
  415. </row>
  416. <row>
  417. <entry><constant>VIDEO_PALETTE_RGB24</constant></entry>
  418. <entry><para><link
  419. linkend="pixfmt-rgb"><constant>V4L2_PIX_FMT_BGR24</constant></link></para></entry>
  420. </row>
  421. <row>
  422. <entry><constant>VIDEO_PALETTE_RGB32</constant></entry>
  423. <entry><para><link
  424. linkend="pixfmt-rgb"><constant>V4L2_PIX_FMT_BGR32</constant></link><footnote>
  425. <para>Presumably all V4L RGB formats are
  426. little-endian, although some drivers might interpret them according to machine endianess. V4L2 defines little-endian, big-endian and red/blue
  427. swapped variants. For details see <xref linkend="pixfmt-rgb" />.</para>
  428. </footnote></para></entry>
  429. </row>
  430. <row>
  431. <entry><constant>VIDEO_PALETTE_YUV422</constant></entry>
  432. <entry><para><link
  433. linkend="V4L2-PIX-FMT-YUYV"><constant>V4L2_PIX_FMT_YUYV</constant></link></para></entry>
  434. </row>
  435. <row>
  436. <entry><para><constant>VIDEO_PALETTE_YUYV</constant><footnote>
  437. <para><constant>VIDEO_PALETTE_YUV422</constant>
  438. and <constant>VIDEO_PALETTE_YUYV</constant> are the same formats. Some
  439. V4L drivers respond to one, some to the other.</para>
  440. </footnote></para></entry>
  441. <entry><para><link
  442. linkend="V4L2-PIX-FMT-YUYV"><constant>V4L2_PIX_FMT_YUYV</constant></link></para></entry>
  443. </row>
  444. <row>
  445. <entry><constant>VIDEO_PALETTE_UYVY</constant></entry>
  446. <entry><para><link
  447. linkend="V4L2-PIX-FMT-UYVY"><constant>V4L2_PIX_FMT_UYVY</constant></link></para></entry>
  448. </row>
  449. <row>
  450. <entry><constant>VIDEO_PALETTE_YUV420</constant></entry>
  451. <entry>None</entry>
  452. </row>
  453. <row>
  454. <entry><constant>VIDEO_PALETTE_YUV411</constant></entry>
  455. <entry><para><link
  456. linkend="V4L2-PIX-FMT-Y41P"><constant>V4L2_PIX_FMT_Y41P</constant></link><footnote>
  457. <para>Not to be confused with
  458. <constant>V4L2_PIX_FMT_YUV411P</constant>, which is a planar
  459. format.</para> </footnote></para></entry>
  460. </row>
  461. <row>
  462. <entry><constant>VIDEO_PALETTE_RAW</constant></entry>
  463. <entry><para>None<footnote> <para>V4L explains this
  464. as: "RAW capture (BT848)"</para> </footnote></para></entry>
  465. </row>
  466. <row>
  467. <entry><constant>VIDEO_PALETTE_YUV422P</constant></entry>
  468. <entry><para><link
  469. linkend="V4L2-PIX-FMT-YUV422P"><constant>V4L2_PIX_FMT_YUV422P</constant></link></para></entry>
  470. </row>
  471. <row>
  472. <entry><constant>VIDEO_PALETTE_YUV411P</constant></entry>
  473. <entry><para><link
  474. linkend="V4L2-PIX-FMT-YUV411P"><constant>V4L2_PIX_FMT_YUV411P</constant></link><footnote>
  475. <para>Not to be confused with
  476. <constant>V4L2_PIX_FMT_Y41P</constant>, which is a packed
  477. format.</para> </footnote></para></entry>
  478. </row>
  479. <row>
  480. <entry><constant>VIDEO_PALETTE_YUV420P</constant></entry>
  481. <entry><para><link
  482. linkend="V4L2-PIX-FMT-YVU420"><constant>V4L2_PIX_FMT_YVU420</constant></link></para></entry>
  483. </row>
  484. <row>
  485. <entry><constant>VIDEO_PALETTE_YUV410P</constant></entry>
  486. <entry><para><link
  487. linkend="V4L2-PIX-FMT-YVU410"><constant>V4L2_PIX_FMT_YVU410</constant></link></para></entry>
  488. </row>
  489. </tbody>
  490. </tgroup>
  491. </informaltable></para>
  492. <para>V4L2 image formats are defined in <xref
  493. linkend="pixfmt" />. The image format can be selected with the
  494. &VIDIOC-S-FMT; ioctl.</para>
  495. </section>
  496. <section>
  497. <title>Audio</title>
  498. <para>The <constant>VIDIOCGAUDIO</constant> and
  499. <constant>VIDIOCSAUDIO</constant> ioctl and struct
  500. <structname>video_audio</structname> are used to enumerate the
  501. audio inputs of a V4L device. The equivalent V4L2 ioctls are
  502. &VIDIOC-G-AUDIO; and &VIDIOC-S-AUDIO; using &v4l2-audio; as
  503. discussed in <xref linkend="audio" />.</para>
  504. <para>The <structfield>audio</structfield> "channel number"
  505. field counting audio inputs was renamed to
  506. <structfield>index</structfield>.</para>
  507. <para>On <constant>VIDIOCSAUDIO</constant> the
  508. <structfield>mode</structfield> field selects <emphasis>one</emphasis>
  509. of the <constant>VIDEO_SOUND_MONO</constant>,
  510. <constant>VIDEO_SOUND_STEREO</constant>,
  511. <constant>VIDEO_SOUND_LANG1</constant> or
  512. <constant>VIDEO_SOUND_LANG2</constant> audio demodulation modes. When
  513. the current audio standard is BTSC
  514. <constant>VIDEO_SOUND_LANG2</constant> refers to SAP and
  515. <constant>VIDEO_SOUND_LANG1</constant> is meaningless. Also
  516. undocumented in the V4L specification, there is no way to query the
  517. selected mode. On <constant>VIDIOCGAUDIO</constant> the driver returns
  518. the <emphasis>actually received</emphasis> audio programmes in this
  519. field. In the V4L2 API this information is stored in the &v4l2-tuner;
  520. <structfield>rxsubchans</structfield> and
  521. <structfield>audmode</structfield> fields, respectively. See <xref
  522. linkend="tuner" /> for more information on tuners. Related to audio
  523. modes &v4l2-audio; also reports if this is a mono or stereo
  524. input, regardless if the source is a tuner.</para>
  525. <para>The following fields where replaced by V4L2 controls
  526. accessible with the &VIDIOC-QUERYCTRL;, &VIDIOC-G-CTRL; and
  527. &VIDIOC-S-CTRL; ioctls:<informaltable>
  528. <tgroup cols="2">
  529. <thead>
  530. <row>
  531. <entry>struct
  532. <structname>video_audio</structname></entry>
  533. <entry>V4L2 Control ID</entry>
  534. </row>
  535. </thead>
  536. <tbody valign="top">
  537. <row>
  538. <entry><structfield>volume</structfield></entry>
  539. <entry><constant>V4L2_CID_AUDIO_VOLUME</constant></entry>
  540. </row>
  541. <row>
  542. <entry><structfield>bass</structfield></entry>
  543. <entry><constant>V4L2_CID_AUDIO_BASS</constant></entry>
  544. </row>
  545. <row>
  546. <entry><structfield>treble</structfield></entry>
  547. <entry><constant>V4L2_CID_AUDIO_TREBLE</constant></entry>
  548. </row>
  549. <row>
  550. <entry><structfield>balance</structfield></entry>
  551. <entry><constant>V4L2_CID_AUDIO_BALANCE</constant></entry>
  552. </row>
  553. </tbody>
  554. </tgroup>
  555. </informaltable></para>
  556. <para>To determine which of these controls are supported by a
  557. driver V4L provides the <structfield>flags</structfield>
  558. <constant>VIDEO_AUDIO_VOLUME</constant>,
  559. <constant>VIDEO_AUDIO_BASS</constant>,
  560. <constant>VIDEO_AUDIO_TREBLE</constant> and
  561. <constant>VIDEO_AUDIO_BALANCE</constant>. In the V4L2 API the
  562. &VIDIOC-QUERYCTRL; ioctl reports if the respective control is
  563. supported. Accordingly the <constant>VIDEO_AUDIO_MUTABLE</constant>
  564. and <constant>VIDEO_AUDIO_MUTE</constant> flags where replaced by the
  565. boolean <constant>V4L2_CID_AUDIO_MUTE</constant> control.</para>
  566. <para>All V4L2 controls have a <structfield>step</structfield>
  567. attribute replacing the struct <structname>video_audio</structname>
  568. <structfield>step</structfield> field. The V4L audio controls are
  569. assumed to range from 0 to 65535 with no particular reset value. The
  570. V4L2 API permits arbitrary limits and defaults which can be queried
  571. with the &VIDIOC-QUERYCTRL; ioctl. For general information about
  572. controls see <xref linkend="control" />.</para>
  573. </section>
  574. <section>
  575. <title>Frame Buffer Overlay</title>
  576. <para>The V4L2 ioctls equivalent to
  577. <constant>VIDIOCGFBUF</constant> and <constant>VIDIOCSFBUF</constant>
  578. are &VIDIOC-G-FBUF; and &VIDIOC-S-FBUF;. The
  579. <structfield>base</structfield> field of struct
  580. <structname>video_buffer</structname> remained unchanged, except V4L2
  581. defines a flag to indicate non-destructive overlays instead of a
  582. <constant>NULL</constant> pointer. All other fields moved into the
  583. &v4l2-pix-format; <structfield>fmt</structfield> substructure of
  584. &v4l2-framebuffer;. The <structfield>depth</structfield> field was
  585. replaced by <structfield>pixelformat</structfield>. See <xref
  586. linkend="pixfmt-rgb" /> for a list of RGB formats and their
  587. respective color depths.</para>
  588. <para>Instead of the special ioctls
  589. <constant>VIDIOCGWIN</constant> and <constant>VIDIOCSWIN</constant>
  590. V4L2 uses the general-purpose data format negotiation ioctls
  591. &VIDIOC-G-FMT; and &VIDIOC-S-FMT;. They take a pointer to a
  592. &v4l2-format; as argument. Here the <structfield>win</structfield>
  593. member of the <structfield>fmt</structfield> union is used, a
  594. &v4l2-window;.</para>
  595. <para>The <structfield>x</structfield>,
  596. <structfield>y</structfield>, <structfield>width</structfield> and
  597. <structfield>height</structfield> fields of struct
  598. <structname>video_window</structname> moved into &v4l2-rect;
  599. substructure <structfield>w</structfield> of struct
  600. <structname>v4l2_window</structname>. The
  601. <structfield>chromakey</structfield>,
  602. <structfield>clips</structfield>, and
  603. <structfield>clipcount</structfield> fields remained unchanged. Struct
  604. <structname>video_clip</structname> was renamed to &v4l2-clip;, also
  605. containing a struct <structname>v4l2_rect</structname>, but the
  606. semantics are still the same.</para>
  607. <para>The <constant>VIDEO_WINDOW_INTERLACE</constant> flag was
  608. dropped. Instead applications must set the
  609. <structfield>field</structfield> field to
  610. <constant>V4L2_FIELD_ANY</constant> or
  611. <constant>V4L2_FIELD_INTERLACED</constant>. The
  612. <constant>VIDEO_WINDOW_CHROMAKEY</constant> flag moved into
  613. &v4l2-framebuffer;, under the new name
  614. <constant>V4L2_FBUF_FLAG_CHROMAKEY</constant>.</para>
  615. <para>In V4L, storing a bitmap pointer in
  616. <structfield>clips</structfield> and setting
  617. <structfield>clipcount</structfield> to
  618. <constant>VIDEO_CLIP_BITMAP</constant> (-1) requests bitmap
  619. clipping, using a fixed size bitmap of 1024 &times; 625 bits. Struct
  620. <structname>v4l2_window</structname> has a separate
  621. <structfield>bitmap</structfield> pointer field for this purpose and
  622. the bitmap size is determined by <structfield>w.width</structfield> and
  623. <structfield>w.height</structfield>.</para>
  624. <para>The <constant>VIDIOCCAPTURE</constant> ioctl to enable or
  625. disable overlay was renamed to &VIDIOC-OVERLAY;.</para>
  626. </section>
  627. <section>
  628. <title>Cropping</title>
  629. <para>To capture only a subsection of the full picture V4L
  630. defines the <constant>VIDIOCGCAPTURE</constant> and
  631. <constant>VIDIOCSCAPTURE</constant> ioctls using struct
  632. <structname>video_capture</structname>. The equivalent V4L2 ioctls are
  633. &VIDIOC-G-CROP; and &VIDIOC-S-CROP; using &v4l2-crop;, and the related
  634. &VIDIOC-CROPCAP; ioctl. This is a rather complex matter, see
  635. <xref linkend="crop" /> for details.</para>
  636. <para>The <structfield>x</structfield>,
  637. <structfield>y</structfield>, <structfield>width</structfield> and
  638. <structfield>height</structfield> fields moved into &v4l2-rect;
  639. substructure <structfield>c</structfield> of struct
  640. <structname>v4l2_crop</structname>. The
  641. <structfield>decimation</structfield> field was dropped. In the V4L2
  642. API the scaling factor is implied by the size of the cropping
  643. rectangle and the size of the captured or overlaid image.</para>
  644. <para>The <constant>VIDEO_CAPTURE_ODD</constant>
  645. and <constant>VIDEO_CAPTURE_EVEN</constant> flags to capture only the
  646. odd or even field, respectively, were replaced by
  647. <constant>V4L2_FIELD_TOP</constant> and
  648. <constant>V4L2_FIELD_BOTTOM</constant> in the field named
  649. <structfield>field</structfield> of &v4l2-pix-format; and
  650. &v4l2-window;. These structures are used to select a capture or
  651. overlay format with the &VIDIOC-S-FMT; ioctl.</para>
  652. </section>
  653. <section>
  654. <title>Reading Images, Memory Mapping</title>
  655. <section>
  656. <title>Capturing using the read method</title>
  657. <para>There is no essential difference between reading images
  658. from a V4L or V4L2 device using the &func-read; function, however V4L2
  659. drivers are not required to support this I/O method. Applications can
  660. determine if the function is available with the &VIDIOC-QUERYCAP;
  661. ioctl. All V4L2 devices exchanging data with applications must support
  662. the &func-select; and &func-poll; functions.</para>
  663. <para>To select an image format and size, V4L provides the
  664. <constant>VIDIOCSPICT</constant> and <constant>VIDIOCSWIN</constant>
  665. ioctls. V4L2 uses the general-purpose data format negotiation ioctls
  666. &VIDIOC-G-FMT; and &VIDIOC-S-FMT;. They take a pointer to a
  667. &v4l2-format; as argument, here the &v4l2-pix-format; named
  668. <structfield>pix</structfield> of its <structfield>fmt</structfield>
  669. union is used.</para>
  670. <para>For more information about the V4L2 read interface see
  671. <xref linkend="rw" />.</para>
  672. </section>
  673. <section>
  674. <title>Capturing using memory mapping</title>
  675. <para>Applications can read from V4L devices by mapping
  676. buffers in device memory, or more often just buffers allocated in
  677. DMA-able system memory, into their address space. This avoids the data
  678. copying overhead of the read method. V4L2 supports memory mapping as
  679. well, with a few differences.</para>
  680. <informaltable>
  681. <tgroup cols="2">
  682. <thead>
  683. <row>
  684. <entry>V4L</entry>
  685. <entry>V4L2</entry>
  686. </row>
  687. </thead>
  688. <tbody valign="top">
  689. <row>
  690. <entry></entry>
  691. <entry>The image format must be selected before
  692. buffers are allocated, with the &VIDIOC-S-FMT; ioctl. When no format
  693. is selected the driver may use the last, possibly by another
  694. application requested format.</entry>
  695. </row>
  696. <row>
  697. <entry><para>Applications cannot change the number of
  698. buffers. The it is built into the driver, unless it has a module
  699. option to change the number when the driver module is
  700. loaded.</para></entry>
  701. <entry><para>The &VIDIOC-REQBUFS; ioctl allocates the
  702. desired number of buffers, this is a required step in the initialization
  703. sequence.</para></entry>
  704. </row>
  705. <row>
  706. <entry><para>Drivers map all buffers as one contiguous
  707. range of memory. The <constant>VIDIOCGMBUF</constant> ioctl is
  708. available to query the number of buffers, the offset of each buffer
  709. from the start of the virtual file, and the overall amount of memory
  710. used, which can be used as arguments for the &func-mmap;
  711. function.</para></entry>
  712. <entry><para>Buffers are individually mapped. The
  713. offset and size of each buffer can be determined with the
  714. &VIDIOC-QUERYBUF; ioctl.</para></entry>
  715. </row>
  716. <row>
  717. <entry><para>The <constant>VIDIOCMCAPTURE</constant>
  718. ioctl prepares a buffer for capturing. It also determines the image
  719. format for this buffer. The ioctl returns immediately, eventually with
  720. an &EAGAIN; if no video signal had been detected. When the driver
  721. supports more than one buffer applications can call the ioctl multiple
  722. times and thus have multiple outstanding capture
  723. requests.</para><para>The <constant>VIDIOCSYNC</constant> ioctl
  724. suspends execution until a particular buffer has been
  725. filled.</para></entry>
  726. <entry><para>Drivers maintain an incoming and outgoing
  727. queue. &VIDIOC-QBUF; enqueues any empty buffer into the incoming
  728. queue. Filled buffers are dequeued from the outgoing queue with the
  729. &VIDIOC-DQBUF; ioctl. To wait until filled buffers become available this
  730. function, &func-select; or &func-poll; can be used. The
  731. &VIDIOC-STREAMON; ioctl must be called once after enqueuing one or
  732. more buffers to start capturing. Its counterpart
  733. &VIDIOC-STREAMOFF; stops capturing and dequeues all buffers from both
  734. queues. Applications can query the signal status, if known, with the
  735. &VIDIOC-ENUMINPUT; ioctl.</para></entry>
  736. </row>
  737. </tbody>
  738. </tgroup>
  739. </informaltable>
  740. <para>For a more in-depth discussion of memory mapping and
  741. examples, see <xref linkend="mmap" />.</para>
  742. </section>
  743. </section>
  744. <section>
  745. <title>Reading Raw VBI Data</title>
  746. <para>Originally the V4L API did not specify a raw VBI capture
  747. interface, only the device file <filename>/dev/vbi</filename> was
  748. reserved for this purpose. The only driver supporting this interface
  749. was the BTTV driver, de-facto defining the V4L VBI interface. Reading
  750. from the device yields a raw VBI image with the following
  751. parameters:<informaltable>
  752. <tgroup cols="2">
  753. <thead>
  754. <row>
  755. <entry>&v4l2-vbi-format;</entry>
  756. <entry>V4L, BTTV driver</entry>
  757. </row>
  758. </thead>
  759. <tbody valign="top">
  760. <row>
  761. <entry>sampling_rate</entry>
  762. <entry>28636363&nbsp;Hz NTSC (or any other 525-line
  763. standard); 35468950&nbsp;Hz PAL and SECAM (625-line standards)</entry>
  764. </row>
  765. <row>
  766. <entry>offset</entry>
  767. <entry>?</entry>
  768. </row>
  769. <row>
  770. <entry>samples_per_line</entry>
  771. <entry>2048</entry>
  772. </row>
  773. <row>
  774. <entry>sample_format</entry>
  775. <entry>V4L2_PIX_FMT_GREY. The last four bytes (a
  776. machine endianess integer) contain a frame counter.</entry>
  777. </row>
  778. <row>
  779. <entry>start[]</entry>
  780. <entry>10, 273 NTSC; 22, 335 PAL and SECAM</entry>
  781. </row>
  782. <row>
  783. <entry>count[]</entry>
  784. <entry><para>16, 16<footnote><para>Old driver
  785. versions used different values, eventually the custom
  786. <constant>BTTV_VBISIZE</constant> ioctl was added to query the
  787. correct values.</para></footnote></para></entry>
  788. </row>
  789. <row>
  790. <entry>flags</entry>
  791. <entry>0</entry>
  792. </row>
  793. </tbody>
  794. </tgroup>
  795. </informaltable></para>
  796. <para>Undocumented in the V4L specification, in Linux 2.3 the
  797. <constant>VIDIOCGVBIFMT</constant> and
  798. <constant>VIDIOCSVBIFMT</constant> ioctls using struct
  799. <structname>vbi_format</structname> were added to determine the VBI
  800. image parameters. These ioctls are only partially compatible with the
  801. V4L2 VBI interface specified in <xref linkend="raw-vbi" />.</para>
  802. <para>An <structfield>offset</structfield> field does not
  803. exist, <structfield>sample_format</structfield> is supposed to be
  804. <constant>VIDEO_PALETTE_RAW</constant>, equivalent to
  805. <constant>V4L2_PIX_FMT_GREY</constant>. The remaining fields are
  806. probably equivalent to &v4l2-vbi-format;.</para>
  807. <para>Apparently only the Zoran (ZR 36120) driver implements
  808. these ioctls. The semantics differ from those specified for V4L2 in two
  809. ways. The parameters are reset on &func-open; and
  810. <constant>VIDIOCSVBIFMT</constant> always returns an &EINVAL; if the
  811. parameters are invalid.</para>
  812. </section>
  813. <section>
  814. <title>Miscellaneous</title>
  815. <para>V4L2 has no equivalent of the
  816. <constant>VIDIOCGUNIT</constant> ioctl. Applications can find the VBI
  817. device associated with a video capture device (or vice versa) by
  818. reopening the device and requesting VBI data. For details see
  819. <xref linkend="open" />.</para>
  820. <para>No replacement exists for <constant>VIDIOCKEY</constant>,
  821. and the V4L functions for microcode programming. A new interface for
  822. MPEG compression and playback devices is documented in <xref
  823. linkend="extended-controls" />.</para>
  824. </section>
  825. </section>
  826. <section id="hist-v4l2">
  827. <title>Changes of the V4L2 API</title>
  828. <para>Soon after the V4L API was added to the kernel it was
  829. criticised as too inflexible. In August 1998 Bill Dirks proposed a
  830. number of improvements and began to work on documentation, example
  831. drivers and applications. With the help of other volunteers this
  832. eventually became the V4L2 API, not just an extension but a
  833. replacement for the V4L API. However it took another four years and
  834. two stable kernel releases until the new API was finally accepted for
  835. inclusion into the kernel in its present form.</para>
  836. <section>
  837. <title>Early Versions</title>
  838. <para>1998-08-20: First version.</para>
  839. <para>1998-08-27: The &func-select; function was introduced.</para>
  840. <para>1998-09-10: New video standard interface.</para>
  841. <para>1998-09-18: The <constant>VIDIOC_NONCAP</constant> ioctl
  842. was replaced by the otherwise meaningless <constant>O_TRUNC</constant>
  843. &func-open; flag, and the aliases <constant>O_NONCAP</constant> and
  844. <constant>O_NOIO</constant> were defined. Applications can set this
  845. flag if they intend to access controls only, as opposed to capture
  846. applications which need exclusive access. The
  847. <constant>VIDEO_STD_XXX</constant> identifiers are now ordinals
  848. instead of flags, and the <function>video_std_construct()</function>
  849. helper function takes id and transmission arguments.</para>
  850. <para>1998-09-28: Revamped video standard. Made video controls
  851. individually enumerable.</para>
  852. <para>1998-10-02: The <structfield>id</structfield> field was
  853. removed from struct <structname>video_standard</structname> and the
  854. color subcarrier fields were renamed. The &VIDIOC-QUERYSTD; ioctl was
  855. renamed to &VIDIOC-ENUMSTD;, &VIDIOC-G-INPUT; to &VIDIOC-ENUMINPUT;. A
  856. first draft of the Codec API was released.</para>
  857. <para>1998-11-08: Many minor changes. Most symbols have been
  858. renamed. Some material changes to &v4l2-capability;.</para>
  859. <para>1998-11-12: The read/write directon of some ioctls was misdefined.</para>
  860. <para>1998-11-14: <constant>V4L2_PIX_FMT_RGB24</constant>
  861. changed to <constant>V4L2_PIX_FMT_BGR24</constant>, and
  862. <constant>V4L2_PIX_FMT_RGB32</constant> changed to
  863. <constant>V4L2_PIX_FMT_BGR32</constant>. Audio controls are now
  864. accessible with the &VIDIOC-G-CTRL; and &VIDIOC-S-CTRL; ioctls under
  865. names starting with <constant>V4L2_CID_AUDIO</constant>. The
  866. <constant>V4L2_MAJOR</constant> define was removed from
  867. <filename>videodev.h</filename> since it was only used once in the
  868. <filename>videodev</filename> kernel module. The
  869. <constant>YUV422</constant> and <constant>YUV411</constant> planar
  870. image formats were added.</para>
  871. <para>1998-11-28: A few ioctl symbols changed. Interfaces for codecs and
  872. video output devices were added.</para>
  873. <para>1999-01-14: A raw VBI capture interface was added.</para>
  874. <para>1999-01-19: The <constant>VIDIOC_NEXTBUF</constant> ioctl
  875. was removed.</para>
  876. </section>
  877. <section>
  878. <title>V4L2 Version 0.16 1999-01-31</title>
  879. <para>1999-01-27: There is now one QBUF ioctl, VIDIOC_QWBUF and VIDIOC_QRBUF
  880. are gone. VIDIOC_QBUF takes a v4l2_buffer as a parameter. Added
  881. digital zoom (cropping) controls.</para>
  882. </section>
  883. <!-- Where's 0.17? mhs couldn't find that videodev.h, perhaps Bill
  884. forgot to bump the version number or never released it. -->
  885. <section>
  886. <title>V4L2 Version 0.18 1999-03-16</title>
  887. <para>Added a v4l to V4L2 ioctl compatibility layer to
  888. videodev.c. Driver writers, this changes how you implement your ioctl
  889. handler. See the Driver Writer's Guide. Added some more control id
  890. codes.</para>
  891. </section>
  892. <section>
  893. <title>V4L2 Version 0.19 1999-06-05</title>
  894. <para>1999-03-18: Fill in the category and catname fields of
  895. v4l2_queryctrl objects before passing them to the driver. Required a
  896. minor change to the VIDIOC_QUERYCTRL handlers in the sample
  897. drivers.</para>
  898. <para>1999-03-31: Better compatibility for v4l memory capture
  899. ioctls. Requires changes to drivers to fully support new compatibility
  900. features, see Driver Writer's Guide and v4l2cap.c. Added new control
  901. IDs: V4L2_CID_HFLIP, _VFLIP. Changed V4L2_PIX_FMT_YUV422P to _YUV422P,
  902. and _YUV411P to _YUV411P.</para>
  903. <para>1999-04-04: Added a few more control IDs.</para>
  904. <para>1999-04-07: Added the button control type.</para>
  905. <para>1999-05-02: Fixed a typo in videodev.h, and added the
  906. V4L2_CTRL_FLAG_GRAYED (later V4L2_CTRL_FLAG_GRABBED) flag.</para>
  907. <para>1999-05-20: Definition of VIDIOC_G_CTRL was wrong causing
  908. a malfunction of this ioctl.</para>
  909. <para>1999-06-05: Changed the value of
  910. V4L2_CID_WHITENESS.</para>
  911. </section>
  912. <section>
  913. <title>V4L2 Version 0.20 (1999-09-10)</title>
  914. <para>Version 0.20 introduced a number of changes which were
  915. <emphasis>not backward compatible</emphasis> with 0.19 and earlier
  916. versions. Purpose of these changes was to simplify the API, while
  917. making it more extensible and following common Linux driver API
  918. conventions.</para>
  919. <orderedlist>
  920. <listitem>
  921. <para>Some typos in <constant>V4L2_FMT_FLAG</constant>
  922. symbols were fixed. &v4l2-clip; was changed for compatibility with
  923. v4l. (1999-08-30)</para>
  924. </listitem>
  925. <listitem>
  926. <para><constant>V4L2_TUNER_SUB_LANG1</constant> was added.
  927. (1999-09-05)</para>
  928. </listitem>
  929. <listitem>
  930. <para>All ioctl() commands that used an integer argument now
  931. take a pointer to an integer. Where it makes sense, ioctls will return
  932. the actual new value in the integer pointed to by the argument, a
  933. common convention in the V4L2 API. The affected ioctls are:
  934. VIDIOC_PREVIEW, VIDIOC_STREAMON, VIDIOC_STREAMOFF, VIDIOC_S_FREQ,
  935. VIDIOC_S_INPUT, VIDIOC_S_OUTPUT, VIDIOC_S_EFFECT. For example
  936. <programlisting>
  937. err = ioctl (fd, VIDIOC_XXX, V4L2_XXX);
  938. </programlisting> becomes <programlisting>
  939. int a = V4L2_XXX; err = ioctl(fd, VIDIOC_XXX, &amp;a);
  940. </programlisting>
  941. </para>
  942. </listitem>
  943. <listitem>
  944. <para>All the different get- and set-format commands were
  945. swept into one &VIDIOC-G-FMT; and &VIDIOC-S-FMT; ioctl taking a union
  946. and a type field selecting the union member as parameter. Purpose is to
  947. simplify the API by eliminating several ioctls and to allow new and
  948. driver private data streams without adding new ioctls.</para>
  949. <para>This change obsoletes the following ioctls:
  950. <constant>VIDIOC_S_INFMT</constant>,
  951. <constant>VIDIOC_G_INFMT</constant>,
  952. <constant>VIDIOC_S_OUTFMT</constant>,
  953. <constant>VIDIOC_G_OUTFMT</constant>,
  954. <constant>VIDIOC_S_VBIFMT</constant> and
  955. <constant>VIDIOC_G_VBIFMT</constant>. The image format structure
  956. <structname>v4l2_format</structname> was renamed to &v4l2-pix-format;,
  957. while &v4l2-format; is now the envelopping structure for all format
  958. negotiations.</para>
  959. </listitem>
  960. <listitem>
  961. <para>Similar to the changes above, the
  962. <constant>VIDIOC_G_PARM</constant> and
  963. <constant>VIDIOC_S_PARM</constant> ioctls were merged with
  964. <constant>VIDIOC_G_OUTPARM</constant> and
  965. <constant>VIDIOC_S_OUTPARM</constant>. A
  966. <structfield>type</structfield> field in the new &v4l2-streamparm;
  967. selects the respective union member.</para>
  968. <para>This change obsoletes the
  969. <constant>VIDIOC_G_OUTPARM</constant> and
  970. <constant>VIDIOC_S_OUTPARM</constant> ioctls.</para>
  971. </listitem>
  972. <listitem>
  973. <para>Control enumeration was simplified, and two new
  974. control flags were introduced and one dropped. The
  975. <structfield>catname</structfield> field was replaced by a
  976. <structfield>group</structfield> field.</para>
  977. <para>Drivers can now flag unsupported and temporarily
  978. unavailable controls with <constant>V4L2_CTRL_FLAG_DISABLED</constant>
  979. and <constant>V4L2_CTRL_FLAG_GRABBED</constant> respectively. The
  980. <structfield>group</structfield> name indicates a possibly narrower
  981. classification than the <structfield>category</structfield>. In other
  982. words, there may be multiple groups within a category. Controls within
  983. a group would typically be drawn within a group box. Controls in
  984. different categories might have a greater separation, or may even
  985. appear in separate windows.</para>
  986. </listitem>
  987. <listitem>
  988. <para>The &v4l2-buffer; <structfield>timestamp</structfield>
  989. was changed to a 64 bit integer, containing the sampling or output
  990. time of the frame in nanoseconds. Additionally timestamps will be in
  991. absolute system time, not starting from zero at the beginning of a
  992. stream. The data type name for timestamps is stamp_t, defined as a
  993. signed 64-bit integer. Output devices should not send a buffer out
  994. until the time in the timestamp field has arrived. I would like to
  995. follow SGI's lead, and adopt a multimedia timestamping system like
  996. their UST (Unadjusted System Time). See
  997. http://reality.sgi.com/cpirazzi_engr/lg/time/intro.html. [This link is
  998. no longer valid.] UST uses timestamps that are 64-bit signed integers
  999. (not struct timeval's) and given in nanosecond units. The UST clock
  1000. starts at zero when the system is booted and runs continuously and
  1001. uniformly. It takes a little over 292 years for UST to overflow. There
  1002. is no way to set the UST clock. The regular Linux time-of-day clock
  1003. can be changed periodically, which would cause errors if it were being
  1004. used for timestamping a multimedia stream. A real UST style clock will
  1005. require some support in the kernel that is not there yet. But in
  1006. anticipation, I will change the timestamp field to a 64-bit integer,
  1007. and I will change the v4l2_masterclock_gettime() function (used only
  1008. by drivers) to return a 64-bit integer.</para>
  1009. </listitem>
  1010. <listitem>
  1011. <para>A <structfield>sequence</structfield> field was added
  1012. to &v4l2-buffer;. The <structfield>sequence</structfield> field counts
  1013. captured frames, it is ignored by output devices. When a capture
  1014. driver drops a frame, the sequence number of that frame is
  1015. skipped.</para>
  1016. </listitem>
  1017. </orderedlist>
  1018. </section>
  1019. <section>
  1020. <title>V4L2 Version 0.20 incremental changes</title>
  1021. <!-- Version number didn't change anymore, reason unknown. -->
  1022. <para>1999-12-23: In &v4l2-vbi-format; the
  1023. <structfield>reserved1</structfield> field became
  1024. <structfield>offset</structfield>. Previously drivers were required to
  1025. clear the <structfield>reserved1</structfield> field.</para>
  1026. <para>2000-01-13: The
  1027. <constant>V4L2_FMT_FLAG_NOT_INTERLACED</constant> flag was added.</para>
  1028. <para>2000-07-31: The <filename>linux/poll.h</filename> header
  1029. is now included by <filename>videodev.h</filename> for compatibility
  1030. with the original <filename>videodev.h</filename> file.</para>
  1031. <para>2000-11-20: <constant>V4L2_TYPE_VBI_OUTPUT</constant> and
  1032. <constant>V4L2_PIX_FMT_Y41P</constant> were added.</para>
  1033. <para>2000-11-25: <constant>V4L2_TYPE_VBI_INPUT</constant> was
  1034. added.</para>
  1035. <para>2000-12-04: A couple typos in symbol names were fixed.</para>
  1036. <para>2001-01-18: To avoid namespace conflicts the
  1037. <constant>fourcc</constant> macro defined in the
  1038. <filename>videodev.h</filename> header file was renamed to
  1039. <constant>v4l2_fourcc</constant>.</para>
  1040. <para>2001-01-25: A possible driver-level compatibility problem
  1041. between the <filename>videodev.h</filename> file in Linux 2.4.0 and
  1042. the <filename>videodev.h</filename> file included in the
  1043. <filename>videodevX</filename> patch was fixed. Users of an earlier
  1044. version of <filename>videodevX</filename> on Linux 2.4.0 should
  1045. recompile their V4L and V4L2 drivers.</para>
  1046. <para>2001-01-26: A possible kernel-level incompatibility
  1047. between the <filename>videodev.h</filename> file in the
  1048. <filename>videodevX</filename> patch and the
  1049. <filename>videodev.h</filename> file in Linux 2.2.x with devfs patches
  1050. applied was fixed.</para>
  1051. <para>2001-03-02: Certain V4L ioctls which pass data in both
  1052. direction although they are defined with read-only parameter, did not
  1053. work correctly through the backward compatibility layer.
  1054. [Solution?]</para>
  1055. <para>2001-04-13: Big endian 16-bit RGB formats were added.</para>
  1056. <para>2001-09-17: New YUV formats and the &VIDIOC-G-FREQUENCY; and
  1057. &VIDIOC-S-FREQUENCY; ioctls were added. (The old
  1058. <constant>VIDIOC_G_FREQ</constant> and
  1059. <constant>VIDIOC_S_FREQ</constant> ioctls did not take multiple tuners
  1060. into account.)</para>
  1061. <para>2000-09-18: <constant>V4L2_BUF_TYPE_VBI</constant> was
  1062. added. This may <emphasis>break compatibility</emphasis> as the
  1063. &VIDIOC-G-FMT; and &VIDIOC-S-FMT; ioctls may fail now if the struct
  1064. <structname>v4l2_fmt</structname> <structfield>type</structfield>
  1065. field does not contain <constant>V4L2_BUF_TYPE_VBI</constant>. In the
  1066. documentation of the &v4l2-vbi-format;
  1067. <structfield>offset</structfield> field the ambiguous phrase "rising
  1068. edge" was changed to "leading edge".</para>
  1069. </section>
  1070. <section>
  1071. <title>V4L2 Version 0.20 2000-11-23</title>
  1072. <para>A number of changes were made to the raw VBI
  1073. interface.</para>
  1074. <orderedlist>
  1075. <listitem>
  1076. <para>Figures clarifying the line numbering scheme were
  1077. added to the V4L2 API specification. The
  1078. <structfield>start</structfield>[0] and
  1079. <structfield>start</structfield>[1] fields no longer count line
  1080. numbers beginning at zero. Rationale: a) The previous definition was
  1081. unclear. b) The <structfield>start</structfield>[] values are ordinal
  1082. numbers. c) There is no point in inventing a new line numbering
  1083. scheme. We now use line number as defined by ITU-R, period.
  1084. Compatibility: Add one to the start values. Applications depending on
  1085. the previous semantics may not function correctly.</para>
  1086. </listitem>
  1087. <listitem>
  1088. <para>The restriction "count[0] &gt; 0 and count[1] &gt; 0"
  1089. has been relaxed to "(count[0] + count[1]) &gt; 0". Rationale:
  1090. Drivers may allocate resources at scan line granularity and some data
  1091. services are transmitted only on the first field. The comment that
  1092. both <structfield>count</structfield> values will usually be equal is
  1093. misleading and pointless and has been removed. This change
  1094. <emphasis>breaks compatibility</emphasis> with earlier versions:
  1095. Drivers may return EINVAL, applications may not function
  1096. correctly.</para>
  1097. </listitem>
  1098. <listitem>
  1099. <para>Drivers are again permitted to return negative
  1100. (unknown) start values as proposed earlier. Why this feature was
  1101. dropped is unclear. This change may <emphasis>break
  1102. compatibility</emphasis> with applications depending on the start
  1103. values being positive. The use of <constant>EBUSY</constant> and
  1104. <constant>EINVAL</constant> error codes with the &VIDIOC-S-FMT; ioctl
  1105. was clarified. The &EBUSY; was finally documented, and the
  1106. <structfield>reserved2</structfield> field which was previously
  1107. mentioned only in the <filename>videodev.h</filename> header
  1108. file.</para>
  1109. </listitem>
  1110. <listitem>
  1111. <para>New buffer types
  1112. <constant>V4L2_TYPE_VBI_INPUT</constant> and
  1113. <constant>V4L2_TYPE_VBI_OUTPUT</constant> were added. The former is an
  1114. alias for the old <constant>V4L2_TYPE_VBI</constant>, the latter was
  1115. missing in the <filename>videodev.h</filename> file.</para>
  1116. </listitem>
  1117. </orderedlist>
  1118. </section>
  1119. <section>
  1120. <title>V4L2 Version 0.20 2002-07-25</title>
  1121. <para>Added sliced VBI interface proposal.</para>
  1122. </section>
  1123. <section>
  1124. <title>V4L2 in Linux 2.5.46, 2002-10</title>
  1125. <para>Around October-November 2002, prior to an announced
  1126. feature freeze of Linux 2.5, the API was revised, drawing from
  1127. experience with V4L2 0.20. This unnamed version was finally merged
  1128. into Linux 2.5.46.</para>
  1129. <orderedlist>
  1130. <listitem>
  1131. <para>As specified in <xref linkend="related" />, drivers
  1132. must make related device functions available under all minor device
  1133. numbers.</para>
  1134. </listitem>
  1135. <listitem>
  1136. <para>The &func-open; function requires access mode
  1137. <constant>O_RDWR</constant> regardless of the device type. All V4L2
  1138. drivers exchanging data with applications must support the
  1139. <constant>O_NONBLOCK</constant> flag. The <constant>O_NOIO</constant>
  1140. flag, a V4L2 symbol which aliased the meaningless
  1141. <constant>O_TRUNC</constant> to indicate accesses without data
  1142. exchange (panel applications) was dropped. Drivers must stay in "panel
  1143. mode" until the application attempts to initiate a data exchange, see
  1144. <xref linkend="open" />.</para>
  1145. </listitem>
  1146. <listitem>
  1147. <para>The &v4l2-capability; changed dramatically. Note that
  1148. also the size of the structure changed, which is encoded in the ioctl
  1149. request code, thus older V4L2 devices will respond with an &EINVAL; to
  1150. the new &VIDIOC-QUERYCAP; ioctl.</para>
  1151. <para>There are new fields to identify the driver, a new RDS
  1152. device function <constant>V4L2_CAP_RDS_CAPTURE</constant>, the
  1153. <constant>V4L2_CAP_AUDIO</constant> flag indicates if the device has
  1154. any audio connectors, another I/O capability
  1155. <constant>V4L2_CAP_ASYNCIO</constant> can be flagged. In response to
  1156. these changes the <structfield>type</structfield> field became a bit
  1157. set and was merged into the <structfield>flags</structfield> field.
  1158. <constant>V4L2_FLAG_TUNER</constant> was renamed to
  1159. <constant>V4L2_CAP_TUNER</constant>,
  1160. <constant>V4L2_CAP_VIDEO_OVERLAY</constant> replaced
  1161. <constant>V4L2_FLAG_PREVIEW</constant> and
  1162. <constant>V4L2_CAP_VBI_CAPTURE</constant> and
  1163. <constant>V4L2_CAP_VBI_OUTPUT</constant> replaced
  1164. <constant>V4L2_FLAG_DATA_SERVICE</constant>.
  1165. <constant>V4L2_FLAG_READ</constant> and
  1166. <constant>V4L2_FLAG_WRITE</constant> were merged into
  1167. <constant>V4L2_CAP_READWRITE</constant>.</para>
  1168. <para>The redundant fields
  1169. <structfield>inputs</structfield>, <structfield>outputs</structfield>
  1170. and <structfield>audios</structfield> were removed. These properties
  1171. can be determined as described in <xref linkend="video" /> and <xref
  1172. linkend="audio" />.</para>
  1173. <para>The somewhat volatile and therefore barely useful
  1174. fields <structfield>maxwidth</structfield>,
  1175. <structfield>maxheight</structfield>,
  1176. <structfield>minwidth</structfield>,
  1177. <structfield>minheight</structfield>,
  1178. <structfield>maxframerate</structfield> were removed. This information
  1179. is available as described in <xref linkend="format" /> and
  1180. <xref linkend="standard" />.</para>
  1181. <para><constant>V4L2_FLAG_SELECT</constant> was removed. We
  1182. believe the select() function is important enough to require support
  1183. of it in all V4L2 drivers exchanging data with applications. The
  1184. redundant <constant>V4L2_FLAG_MONOCHROME</constant> flag was removed,
  1185. this information is available as described in <xref
  1186. linkend="format" />.</para>
  1187. </listitem>
  1188. <listitem>
  1189. <para>In &v4l2-input; the
  1190. <structfield>assoc_audio</structfield> field and the
  1191. <structfield>capability</structfield> field and its only flag
  1192. <constant>V4L2_INPUT_CAP_AUDIO</constant> was replaced by the new
  1193. <structfield>audioset</structfield> field. Instead of linking one
  1194. video input to one audio input this field reports all audio inputs
  1195. this video input combines with.</para>
  1196. <para>New fields are <structfield>tuner</structfield>
  1197. (reversing the former link from tuners to video inputs),
  1198. <structfield>std</structfield> and
  1199. <structfield>status</structfield>.</para>
  1200. <para>Accordingly &v4l2-output; lost its
  1201. <structfield>capability</structfield> and
  1202. <structfield>assoc_audio</structfield> fields.
  1203. <structfield>audioset</structfield>,
  1204. <structfield>modulator</structfield> and
  1205. <structfield>std</structfield> where added instead.</para>
  1206. </listitem>
  1207. <listitem>
  1208. <para>The &v4l2-audio; field
  1209. <structfield>audio</structfield> was renamed to
  1210. <structfield>index</structfield>, for consistency with other
  1211. structures. A new capability flag
  1212. <constant>V4L2_AUDCAP_STEREO</constant> was added to indicated if the
  1213. audio input in question supports stereo sound.
  1214. <constant>V4L2_AUDCAP_EFFECTS</constant> and the corresponding
  1215. <constant>V4L2_AUDMODE</constant> flags where removed. This can be
  1216. easily implemented using controls. (However the same applies to AVL
  1217. which is still there.)</para>
  1218. <para>Again for consistency the &v4l2-audioout; field
  1219. <structfield>audio</structfield> was renamed to
  1220. <structfield>index</structfield>.</para>
  1221. </listitem>
  1222. <listitem>
  1223. <para>The &v4l2-tuner;
  1224. <structfield>input</structfield> field was replaced by an
  1225. <structfield>index</structfield> field, permitting devices with
  1226. multiple tuners. The link between video inputs and tuners is now
  1227. reversed, inputs point to their tuner. The
  1228. <structfield>std</structfield> substructure became a
  1229. simple set (more about this below) and moved into &v4l2-input;. A
  1230. <structfield>type</structfield> field was added.</para>
  1231. <para>Accordingly in &v4l2-modulator; the
  1232. <structfield>output</structfield> was replaced by an
  1233. <structfield>index</structfield> field.</para>
  1234. <para>In &v4l2-frequency; the
  1235. <structfield>port</structfield> field was replaced by a
  1236. <structfield>tuner</structfield> field containing the respective tuner
  1237. or modulator index number. A tuner <structfield>type</structfield>
  1238. field was added and the <structfield>reserved</structfield> field
  1239. became larger for future extensions (satellite tuners in
  1240. particular).</para>
  1241. </listitem>
  1242. <listitem>
  1243. <para>The idea of completely transparent video standards was
  1244. dropped. Experience showed that applications must be able to work with
  1245. video standards beyond presenting the user a menu. Instead of
  1246. enumerating supported standards with an ioctl applications can now
  1247. refer to standards by &v4l2-std-id; and symbols defined in the
  1248. <filename>videodev2.h</filename> header file. For details see <xref
  1249. linkend="standard" />. The &VIDIOC-G-STD; and
  1250. &VIDIOC-S-STD; now take a pointer to this type as argument.
  1251. &VIDIOC-QUERYSTD; was added to autodetect the received standard, if
  1252. the hardware has this capability. In &v4l2-standard; an
  1253. <structfield>index</structfield> field was added for &VIDIOC-ENUMSTD;.
  1254. A &v4l2-std-id; field named <structfield>id</structfield> was added as
  1255. machine readable identifier, also replacing the
  1256. <structfield>transmission</structfield> field. The misleading
  1257. <structfield>framerate</structfield> field was renamed
  1258. to <structfield>frameperiod</structfield>. The now obsolete
  1259. <structfield>colorstandard</structfield> information, originally
  1260. needed to distguish between variations of standards, were
  1261. removed.</para>
  1262. <para>Struct <structname>v4l2_enumstd</structname> ceased to
  1263. be. &VIDIOC-ENUMSTD; now takes a pointer to a &v4l2-standard;
  1264. directly. The information which standards are supported by a
  1265. particular video input or output moved into &v4l2-input; and
  1266. &v4l2-output; fields named <structfield>std</structfield>,
  1267. respectively.</para>
  1268. </listitem>
  1269. <listitem>
  1270. <para>The &v4l2-queryctrl; fields
  1271. <structfield>category</structfield> and
  1272. <structfield>group</structfield> did not catch on and/or were not
  1273. implemented as expected and therefore removed.</para>
  1274. </listitem>
  1275. <listitem>
  1276. <para>The &VIDIOC-TRY-FMT; ioctl was added to negotiate data
  1277. formats as with &VIDIOC-S-FMT;, but without the overhead of
  1278. programming the hardware and regardless of I/O in progress.</para>
  1279. <para>In &v4l2-format; the <structfield>fmt</structfield>
  1280. union was extended to contain &v4l2-window;. All image format
  1281. negotiations are now possible with <constant>VIDIOC_G_FMT</constant>,
  1282. <constant>VIDIOC_S_FMT</constant> and
  1283. <constant>VIDIOC_TRY_FMT</constant>; ioctl. The
  1284. <constant>VIDIOC_G_WIN</constant> and
  1285. <constant>VIDIOC_S_WIN</constant> ioctls to prepare for a video
  1286. overlay were removed. The <structfield>type</structfield> field
  1287. changed to type &v4l2-buf-type; and the buffer type names changed as
  1288. follows.<informaltable>
  1289. <tgroup cols="2">
  1290. <thead>
  1291. <row>
  1292. <entry>Old defines</entry>
  1293. <entry>&v4l2-buf-type;</entry>
  1294. </row>
  1295. </thead>
  1296. <tbody valign="top">
  1297. <row>
  1298. <entry><constant>V4L2_BUF_TYPE_CAPTURE</constant></entry>
  1299. <entry><constant>V4L2_BUF_TYPE_VIDEO_CAPTURE</constant></entry>
  1300. </row>
  1301. <row>
  1302. <entry><constant>V4L2_BUF_TYPE_CODECIN</constant></entry>
  1303. <entry>Omitted for now</entry>
  1304. </row>
  1305. <row>
  1306. <entry><constant>V4L2_BUF_TYPE_CODECOUT</constant></entry>
  1307. <entry>Omitted for now</entry>
  1308. </row>
  1309. <row>
  1310. <entry><constant>V4L2_BUF_TYPE_EFFECTSIN</constant></entry>
  1311. <entry>Omitted for now</entry>
  1312. </row>
  1313. <row>
  1314. <entry><constant>V4L2_BUF_TYPE_EFFECTSIN2</constant></entry>
  1315. <entry>Omitted for now</entry>
  1316. </row>
  1317. <row>
  1318. <entry><constant>V4L2_BUF_TYPE_EFFECTSOUT</constant></entry>
  1319. <entry>Omitted for now</entry>
  1320. </row>
  1321. <row>
  1322. <entry><constant>V4L2_BUF_TYPE_VIDEOOUT</constant></entry>
  1323. <entry><constant>V4L2_BUF_TYPE_VIDEO_OUTPUT</constant></entry>
  1324. </row>
  1325. <row>
  1326. <entry><constant>-</constant></entry>
  1327. <entry><constant>V4L2_BUF_TYPE_VIDEO_OVERLAY</constant></entry>
  1328. </row>
  1329. <row>
  1330. <entry><constant>-</constant></entry>
  1331. <entry><constant>V4L2_BUF_TYPE_VBI_CAPTURE</constant></entry>
  1332. </row>
  1333. <row>
  1334. <entry><constant>-</constant></entry>
  1335. <entry><constant>V4L2_BUF_TYPE_VBI_OUTPUT</constant></entry>
  1336. </row>
  1337. <row>
  1338. <entry><constant>-</constant></entry>
  1339. <entry><constant>V4L2_BUF_TYPE_SLICED_VBI_CAPTURE</constant></entry>
  1340. </row>
  1341. <row>
  1342. <entry><constant>-</constant></entry>
  1343. <entry><constant>V4L2_BUF_TYPE_SLICED_VBI_OUTPUT</constant></entry>
  1344. </row>
  1345. <row>
  1346. <entry><constant>V4L2_BUF_TYPE_PRIVATE_BASE</constant></entry>
  1347. <entry><constant>V4L2_BUF_TYPE_PRIVATE</constant></entry>
  1348. </row>
  1349. </tbody>
  1350. </tgroup>
  1351. </informaltable></para>
  1352. </listitem>
  1353. <listitem>
  1354. <para>In &v4l2-fmtdesc; a &v4l2-buf-type; field named
  1355. <structfield>type</structfield> was added as in &v4l2-format;. The
  1356. <constant>VIDIOC_ENUM_FBUFFMT</constant> ioctl is no longer needed and
  1357. was removed. These calls can be replaced by &VIDIOC-ENUM-FMT; with
  1358. type <constant>V4L2_BUF_TYPE_VIDEO_OVERLAY</constant>.</para>
  1359. </listitem>
  1360. <listitem>
  1361. <para>In &v4l2-pix-format; the
  1362. <structfield>depth</structfield> field was removed, assuming
  1363. applications which recognize the format by its four-character-code
  1364. already know the color depth, and others do not care about it. The
  1365. same rationale lead to the removal of the
  1366. <constant>V4L2_FMT_FLAG_COMPRESSED</constant> flag. The
  1367. <constant>V4L2_FMT_FLAG_SWCONVECOMPRESSED</constant> flag was removed
  1368. because drivers are not supposed to convert images in kernel space. A
  1369. user library of conversion functions should be provided instead. The
  1370. <constant>V4L2_FMT_FLAG_BYTESPERLINE</constant> flag was redundant.
  1371. Applications can set the <structfield>bytesperline</structfield> field
  1372. to zero to get a reasonable default. Since the remaining flags were
  1373. replaced as well, the <structfield>flags</structfield> field itself
  1374. was removed.</para>
  1375. <para>The interlace flags were replaced by a &v4l2-field;
  1376. value in a newly added <structfield>field</structfield>
  1377. field.<informaltable>
  1378. <tgroup cols="2">
  1379. <thead>
  1380. <row>
  1381. <entry>Old flag</entry>
  1382. <entry>&v4l2-field;</entry>
  1383. </row>
  1384. </thead>
  1385. <tbody valign="top">
  1386. <row>
  1387. <entry><constant>V4L2_FMT_FLAG_NOT_INTERLACED</constant></entry>
  1388. <entry>?</entry>
  1389. </row>
  1390. <row>
  1391. <entry><constant>V4L2_FMT_FLAG_INTERLACED</constant>
  1392. = <constant>V4L2_FMT_FLAG_COMBINED</constant></entry>
  1393. <entry><constant>V4L2_FIELD_INTERLACED</constant></entry>
  1394. </row>
  1395. <row>
  1396. <entry><constant>V4L2_FMT_FLAG_TOPFIELD</constant>
  1397. = <constant>V4L2_FMT_FLAG_ODDFIELD</constant></entry>
  1398. <entry><constant>V4L2_FIELD_TOP</constant></entry>
  1399. </row>
  1400. <row>
  1401. <entry><constant>V4L2_FMT_FLAG_BOTFIELD</constant>
  1402. = <constant>V4L2_FMT_FLAG_EVENFIELD</constant></entry>
  1403. <entry><constant>V4L2_FIELD_BOTTOM</constant></entry>
  1404. </row>
  1405. <row>
  1406. <entry><constant>-</constant></entry>
  1407. <entry><constant>V4L2_FIELD_SEQ_TB</constant></entry>
  1408. </row>
  1409. <row>
  1410. <entry><constant>-</constant></entry>
  1411. <entry><constant>V4L2_FIELD_SEQ_BT</constant></entry>
  1412. </row>
  1413. <row>
  1414. <entry><constant>-</constant></entry>
  1415. <entry><constant>V4L2_FIELD_ALTERNATE</constant></entry>
  1416. </row>
  1417. </tbody>
  1418. </tgroup>
  1419. </informaltable></para>
  1420. <para>The color space flags were replaced by a
  1421. &v4l2-colorspace; value in a newly added
  1422. <structfield>colorspace</structfield> field, where one of
  1423. <constant>V4L2_COLORSPACE_SMPTE170M</constant>,
  1424. <constant>V4L2_COLORSPACE_BT878</constant>,
  1425. <constant>V4L2_COLORSPACE_470_SYSTEM_M</constant> or
  1426. <constant>V4L2_COLORSPACE_470_SYSTEM_BG</constant> replaces
  1427. <constant>V4L2_FMT_CS_601YUV</constant>.</para>
  1428. </listitem>
  1429. <listitem>
  1430. <para>In &v4l2-requestbuffers; the
  1431. <structfield>type</structfield> field was properly defined as
  1432. &v4l2-buf-type;. Buffer types changed as mentioned above. A new
  1433. <structfield>memory</structfield> field of type &v4l2-memory; was
  1434. added to distinguish between I/O methods using buffers allocated
  1435. by the driver or the application. See <xref linkend="io" /> for
  1436. details.</para>
  1437. </listitem>
  1438. <listitem>
  1439. <para>In &v4l2-buffer; the <structfield>type</structfield>
  1440. field was properly defined as &v4l2-buf-type;. Buffer types changed as
  1441. mentioned above. A <structfield>field</structfield> field of type
  1442. &v4l2-field; was added to indicate if a buffer contains a top or
  1443. bottom field. The old field flags were removed. Since no unadjusted
  1444. system time clock was added to the kernel as planned, the
  1445. <structfield>timestamp</structfield> field changed back from type
  1446. stamp_t, an unsigned 64 bit integer expressing the sample time in
  1447. nanoseconds, to struct <structname>timeval</structname>. With the
  1448. addition of a second memory mapping method the
  1449. <structfield>offset</structfield> field moved into union
  1450. <structfield>m</structfield>, and a new
  1451. <structfield>memory</structfield> field of type &v4l2-memory; was
  1452. added to distinguish between I/O methods. See <xref linkend="io" />
  1453. for details.</para>
  1454. <para>The <constant>V4L2_BUF_REQ_CONTIG</constant>
  1455. flag was used by the V4L compatibility layer, after changes to this
  1456. code it was no longer needed. The
  1457. <constant>V4L2_BUF_ATTR_DEVICEMEM</constant> flag would indicate if
  1458. the buffer was indeed allocated in device memory rather than DMA-able
  1459. system memory. It was barely useful and so was removed.</para>
  1460. </listitem>
  1461. <listitem>
  1462. <para>In &v4l2-framebuffer; the
  1463. <structfield>base[3]</structfield> array anticipating double- and
  1464. triple-buffering in off-screen video memory, however without defining
  1465. a synchronization mechanism, was replaced by a single pointer. The
  1466. <constant>V4L2_FBUF_CAP_SCALEUP</constant> and
  1467. <constant>V4L2_FBUF_CAP_SCALEDOWN</constant> flags were removed.
  1468. Applications can determine this capability more accurately using the
  1469. new cropping and scaling interface. The
  1470. <constant>V4L2_FBUF_CAP_CLIPPING</constant> flag was replaced by
  1471. <constant>V4L2_FBUF_CAP_LIST_CLIPPING</constant> and
  1472. <constant>V4L2_FBUF_CAP_BITMAP_CLIPPING</constant>.</para>
  1473. </listitem>
  1474. <listitem>
  1475. <para>In &v4l2-clip; the <structfield>x</structfield>,
  1476. <structfield>y</structfield>, <structfield>width</structfield> and
  1477. <structfield>height</structfield> field moved into a
  1478. <structfield>c</structfield> substructure of type &v4l2-rect;. The
  1479. <structfield>x</structfield> and <structfield>y</structfield> fields
  1480. were renamed to <structfield>left</structfield> and
  1481. <structfield>top</structfield>, &ie; offsets to a context dependent
  1482. origin.</para>
  1483. </listitem>
  1484. <listitem>
  1485. <para>In &v4l2-window; the <structfield>x</structfield>,
  1486. <structfield>y</structfield>, <structfield>width</structfield> and
  1487. <structfield>height</structfield> field moved into a
  1488. <structfield>w</structfield> substructure as above. A
  1489. <structfield>field</structfield> field of type %v4l2-field; was added
  1490. to distinguish between field and frame (interlaced) overlay.</para>
  1491. </listitem>
  1492. <listitem>
  1493. <para>The digital zoom interface, including struct
  1494. <structname>v4l2_zoomcap</structname>, struct
  1495. <structname>v4l2_zoom</structname>,
  1496. <constant>V4L2_ZOOM_NONCAP</constant> and
  1497. <constant>V4L2_ZOOM_WHILESTREAMING</constant> was replaced by a new
  1498. cropping and scaling interface. The previously unused struct
  1499. <structname>v4l2_cropcap</structname> and
  1500. <structname>v4l2_crop</structname> where redefined for this purpose.
  1501. See <xref linkend="crop" /> for details.</para>
  1502. </listitem>
  1503. <listitem>
  1504. <para>In &v4l2-vbi-format; the
  1505. <structfield>SAMPLE_FORMAT</structfield> field now contains a
  1506. four-character-code as used to identify video image formats and
  1507. <constant>V4L2_PIX_FMT_GREY</constant> replaces the
  1508. <constant>V4L2_VBI_SF_UBYTE</constant> define. The
  1509. <structfield>reserved</structfield> field was extended.</para>
  1510. </listitem>
  1511. <listitem>
  1512. <para>In &v4l2-captureparm; the type of the
  1513. <structfield>timeperframe</structfield> field changed from unsigned
  1514. long to &v4l2-fract;. This allows the accurate expression of multiples
  1515. of the NTSC-M frame rate 30000 / 1001. A new field
  1516. <structfield>readbuffers</structfield> was added to control the driver
  1517. behaviour in read I/O mode.</para>
  1518. <para>Similar changes were made to &v4l2-outputparm;.</para>
  1519. </listitem>
  1520. <listitem>
  1521. <para>The struct <structname>v4l2_performance</structname>
  1522. and <constant>VIDIOC_G_PERF</constant> ioctl were dropped. Except when
  1523. using the <link linkend="rw">read/write I/O method</link>, which is
  1524. limited anyway, this information is already available to
  1525. applications.</para>
  1526. </listitem>
  1527. <listitem>
  1528. <para>The example transformation from RGB to YCbCr color
  1529. space in the old V4L2 documentation was inaccurate, this has been
  1530. corrected in <xref linkend="pixfmt" />.<!-- 0.5670G should be
  1531. 0.587, and 127/112 != 255/224 --></para>
  1532. </listitem>
  1533. </orderedlist>
  1534. </section>
  1535. <section>
  1536. <title>V4L2 2003-06-19</title>
  1537. <orderedlist>
  1538. <listitem>
  1539. <para>A new capability flag
  1540. <constant>V4L2_CAP_RADIO</constant> was added for radio devices. Prior
  1541. to this change radio devices would identify solely by having exactly one
  1542. tuner whose type field reads <constant>V4L2_TUNER_RADIO</constant>.</para>
  1543. </listitem>
  1544. <listitem>
  1545. <para>An optional driver access priority mechanism was
  1546. added, see <xref linkend="app-pri" /> for details.</para>
  1547. </listitem>
  1548. <listitem>
  1549. <para>The audio input and output interface was found to be
  1550. incomplete.</para>
  1551. <para>Previously the &VIDIOC-G-AUDIO;
  1552. ioctl would enumerate the available audio inputs. An ioctl to
  1553. determine the current audio input, if more than one combines with the
  1554. current video input, did not exist. So
  1555. <constant>VIDIOC_G_AUDIO</constant> was renamed to
  1556. <constant>VIDIOC_G_AUDIO_OLD</constant>, this ioctl will be removed in
  1557. the future. The &VIDIOC-ENUMAUDIO; ioctl was added to enumerate
  1558. audio inputs, while &VIDIOC-G-AUDIO; now reports the current audio
  1559. input.</para>
  1560. <para>The same changes were made to &VIDIOC-G-AUDOUT; and
  1561. &VIDIOC-ENUMAUDOUT;.</para>
  1562. <para>Until further the "videodev" module will automatically
  1563. translate between the old and new ioctls, but drivers and applications
  1564. must be updated to successfully compile again.</para>
  1565. </listitem>
  1566. <listitem>
  1567. <para>The &VIDIOC-OVERLAY; ioctl was incorrectly defined with
  1568. write-read parameter. It was changed to write-only, while the write-read
  1569. version was renamed to <constant>VIDIOC_OVERLAY_OLD</constant>. The old
  1570. ioctl will be removed in the future. Until further the "videodev"
  1571. kernel module will automatically translate to the new version, so drivers
  1572. must be recompiled, but not applications.</para>
  1573. </listitem>
  1574. <listitem>
  1575. <para><xref linkend="overlay" /> incorrectly stated that
  1576. clipping rectangles define regions where the video can be seen.
  1577. Correct is that clipping rectangles define regions where
  1578. <emphasis>no</emphasis> video shall be displayed and so the graphics
  1579. surface can be seen.</para>
  1580. </listitem>
  1581. <listitem>
  1582. <para>The &VIDIOC-S-PARM; and &VIDIOC-S-CTRL; ioctls were
  1583. defined with write-only parameter, inconsistent with other ioctls
  1584. modifying their argument. They were changed to write-read, while a
  1585. <constant>_OLD</constant> suffix was added to the write-only versions.
  1586. The old ioctls will be removed in the future. Drivers and
  1587. applications assuming a constant parameter need an update.</para>
  1588. </listitem>
  1589. </orderedlist>
  1590. </section>
  1591. <section>
  1592. <title>V4L2 2003-11-05</title>
  1593. <orderedlist>
  1594. <listitem>
  1595. <para>In <xref linkend="pixfmt-rgb" /> the following pixel
  1596. formats were incorrectly transferred from Bill Dirks' V4L2
  1597. specification. Descriptions below refer to bytes in memory, in
  1598. ascending address order.<informaltable>
  1599. <tgroup cols="3">
  1600. <thead>
  1601. <row>
  1602. <entry>Symbol</entry>
  1603. <entry>In this document prior to revision
  1604. 0.5</entry>
  1605. <entry>Corrected</entry>
  1606. </row>
  1607. </thead>
  1608. <tbody valign="top">
  1609. <row>
  1610. <entry><constant>V4L2_PIX_FMT_RGB24</constant></entry>
  1611. <entry>B, G, R</entry>
  1612. <entry>R, G, B</entry>
  1613. </row>
  1614. <row>
  1615. <entry><constant>V4L2_PIX_FMT_BGR24</constant></entry>
  1616. <entry>R, G, B</entry>
  1617. <entry>B, G, R</entry>
  1618. </row>
  1619. <row>
  1620. <entry><constant>V4L2_PIX_FMT_RGB32</constant></entry>
  1621. <entry>B, G, R, X</entry>
  1622. <entry>R, G, B, X</entry>
  1623. </row>
  1624. <row>
  1625. <entry><constant>V4L2_PIX_FMT_BGR32</constant></entry>
  1626. <entry>R, G, B, X</entry>
  1627. <entry>B, G, R, X</entry>
  1628. </row>
  1629. </tbody>
  1630. </tgroup>
  1631. </informaltable> The
  1632. <constant>V4L2_PIX_FMT_BGR24</constant> example was always
  1633. correct.</para>
  1634. <para>In <xref linkend="v4l-image-properties" /> the mapping
  1635. of the V4L <constant>VIDEO_PALETTE_RGB24</constant> and
  1636. <constant>VIDEO_PALETTE_RGB32</constant> formats to V4L2 pixel formats
  1637. was accordingly corrected.</para>
  1638. </listitem>
  1639. <listitem>
  1640. <para>Unrelated to the fixes above, drivers may still
  1641. interpret some V4L2 RGB pixel formats differently. These issues have
  1642. yet to be addressed, for details see <xref
  1643. linkend="pixfmt-rgb" />.</para>
  1644. </listitem>
  1645. </orderedlist>
  1646. </section>
  1647. <section>
  1648. <title>V4L2 in Linux 2.6.6, 2004-05-09</title>
  1649. <orderedlist>
  1650. <listitem>
  1651. <para>The &VIDIOC-CROPCAP; ioctl was incorrectly defined
  1652. with read-only parameter. It is now defined as write-read ioctl, while
  1653. the read-only version was renamed to
  1654. <constant>VIDIOC_CROPCAP_OLD</constant>. The old ioctl will be removed
  1655. in the future.</para>
  1656. </listitem>
  1657. </orderedlist>
  1658. </section>
  1659. <section>
  1660. <title>V4L2 in Linux 2.6.8</title>
  1661. <orderedlist>
  1662. <listitem>
  1663. <para>A new field <structfield>input</structfield> (former
  1664. <structfield>reserved[0]</structfield>) was added to the &v4l2-buffer;
  1665. structure. Purpose of this field is to alternate between video inputs
  1666. (&eg; cameras) in step with the video capturing process. This function
  1667. must be enabled with the new <constant>V4L2_BUF_FLAG_INPUT</constant>
  1668. flag. The <structfield>flags</structfield> field is no longer
  1669. read-only.</para>
  1670. </listitem>
  1671. </orderedlist>
  1672. </section>
  1673. <section>
  1674. <title>V4L2 spec erratum 2004-08-01</title>
  1675. <orderedlist>
  1676. <listitem>
  1677. <para>The return value of the
  1678. <xref linkend="func-open" /> function was incorrectly documented.</para>
  1679. </listitem>
  1680. <listitem>
  1681. <para>Audio output ioctls end in -AUDOUT, not -AUDIOOUT.</para>
  1682. </listitem>
  1683. <listitem>
  1684. <para>In the Current Audio Input example the
  1685. <constant>VIDIOC_G_AUDIO</constant> ioctl took the wrong
  1686. argument.</para>
  1687. </listitem>
  1688. <listitem>
  1689. <para>The documentation of the &VIDIOC-QBUF; and
  1690. &VIDIOC-DQBUF; ioctls did not mention the &v4l2-buffer;
  1691. <structfield>memory</structfield> field. It was also missing from
  1692. examples. Also on the <constant>VIDIOC_DQBUF</constant> page the &EIO;
  1693. was not documented.</para>
  1694. </listitem>
  1695. </orderedlist>
  1696. </section>
  1697. <section>
  1698. <title>V4L2 in Linux 2.6.14</title>
  1699. <orderedlist>
  1700. <listitem>
  1701. <para>A new sliced VBI interface was added. It is documented
  1702. in <xref linkend="sliced" /> and replaces the interface first
  1703. proposed in V4L2 specification 0.8.</para>
  1704. </listitem>
  1705. </orderedlist>
  1706. </section>
  1707. <section>
  1708. <title>V4L2 in Linux 2.6.15</title>
  1709. <orderedlist>
  1710. <listitem>
  1711. <para>The &VIDIOC-LOG-STATUS; ioctl was added.</para>
  1712. </listitem>
  1713. <listitem>
  1714. <para>New video standards
  1715. <constant>V4L2_STD_NTSC_443</constant>,
  1716. <constant>V4L2_STD_SECAM_LC</constant>,
  1717. <constant>V4L2_STD_SECAM_DK</constant> (a set of SECAM D, K and K1),
  1718. and <constant>V4L2_STD_ATSC</constant> (a set of
  1719. <constant>V4L2_STD_ATSC_8_VSB</constant> and
  1720. <constant>V4L2_STD_ATSC_16_VSB</constant>) were defined. Note the
  1721. <constant>V4L2_STD_525_60</constant> set now includes
  1722. <constant>V4L2_STD_NTSC_443</constant>. See also <xref
  1723. linkend="v4l2-std-id" />.</para>
  1724. </listitem>
  1725. <listitem>
  1726. <para>The <constant>VIDIOC_G_COMP</constant> and
  1727. <constant>VIDIOC_S_COMP</constant> ioctl were renamed to
  1728. <constant>VIDIOC_G_MPEGCOMP</constant> and
  1729. <constant>VIDIOC_S_MPEGCOMP</constant> respectively. Their argument
  1730. was replaced by a struct
  1731. <structname>v4l2_mpeg_compression</structname> pointer. (The
  1732. <constant>VIDIOC_G_MPEGCOMP</constant> and
  1733. <constant>VIDIOC_S_MPEGCOMP</constant> ioctls where removed in Linux
  1734. 2.6.25.)</para>
  1735. </listitem>
  1736. </orderedlist>
  1737. </section>
  1738. <section>
  1739. <title>V4L2 spec erratum 2005-11-27</title>
  1740. <para>The capture example in <xref linkend="capture-example" />
  1741. called the &VIDIOC-S-CROP; ioctl without checking if cropping is
  1742. supported. In the video standard selection example in
  1743. <xref linkend="standard" /> the &VIDIOC-S-STD; call used the wrong
  1744. argument type.</para>
  1745. </section>
  1746. <section>
  1747. <title>V4L2 spec erratum 2006-01-10</title>
  1748. <orderedlist>
  1749. <listitem>
  1750. <para>The <constant>V4L2_IN_ST_COLOR_KILL</constant> flag in
  1751. &v4l2-input; not only indicates if the color killer is enabled, but
  1752. also if it is active. (The color killer disables color decoding when
  1753. it detects no color in the video signal to improve the image
  1754. quality.)</para>
  1755. </listitem>
  1756. <listitem>
  1757. <para>&VIDIOC-S-PARM; is a write-read ioctl, not write-only as
  1758. stated on its reference page. The ioctl changed in 2003 as noted above.</para>
  1759. </listitem>
  1760. </orderedlist>
  1761. </section>
  1762. <section>
  1763. <title>V4L2 spec erratum 2006-02-03</title>
  1764. <orderedlist>
  1765. <listitem>
  1766. <para>In &v4l2-captureparm; and &v4l2-outputparm; the
  1767. <structfield>timeperframe</structfield> field gives the time in
  1768. seconds, not microseconds.</para>
  1769. </listitem>
  1770. </orderedlist>
  1771. </section>
  1772. <section>
  1773. <title>V4L2 spec erratum 2006-02-04</title>
  1774. <orderedlist>
  1775. <listitem>
  1776. <para>The <structfield>clips</structfield> field in
  1777. &v4l2-window; must point to an array of &v4l2-clip;, not a linked
  1778. list, because drivers ignore the struct
  1779. <structname>v4l2_clip</structname>.<structfield>next</structfield>
  1780. pointer.</para>
  1781. </listitem>
  1782. </orderedlist>
  1783. </section>
  1784. <section>
  1785. <title>V4L2 in Linux 2.6.17</title>
  1786. <orderedlist>
  1787. <listitem>
  1788. <para>New video standard macros were added:
  1789. <constant>V4L2_STD_NTSC_M_KR</constant> (NTSC M South Korea), and the
  1790. sets <constant>V4L2_STD_MN</constant>,
  1791. <constant>V4L2_STD_B</constant>, <constant>V4L2_STD_GH</constant> and
  1792. <constant>V4L2_STD_DK</constant>. The
  1793. <constant>V4L2_STD_NTSC</constant> and
  1794. <constant>V4L2_STD_SECAM</constant> sets now include
  1795. <constant>V4L2_STD_NTSC_M_KR</constant> and
  1796. <constant>V4L2_STD_SECAM_LC</constant> respectively.</para>
  1797. </listitem>
  1798. <listitem>
  1799. <para>A new <constant>V4L2_TUNER_MODE_LANG1_LANG2</constant>
  1800. was defined to record both languages of a bilingual program. The
  1801. use of <constant>V4L2_TUNER_MODE_STEREO</constant> for this purpose
  1802. is deprecated now. See the &VIDIOC-G-TUNER; section for
  1803. details.</para>
  1804. </listitem>
  1805. </orderedlist>
  1806. </section>
  1807. <section>
  1808. <title>V4L2 spec erratum 2006-09-23 (Draft 0.15)</title>
  1809. <orderedlist>
  1810. <listitem>
  1811. <para>In various places
  1812. <constant>V4L2_BUF_TYPE_SLICED_VBI_CAPTURE</constant> and
  1813. <constant>V4L2_BUF_TYPE_SLICED_VBI_OUTPUT</constant> of the sliced VBI
  1814. interface were not mentioned along with other buffer types.</para>
  1815. </listitem>
  1816. <listitem>
  1817. <para>In <xref linkend="vidioc-g-audio" /> it was clarified
  1818. that the &v4l2-audio; <structfield>mode</structfield> field is a flags
  1819. field.</para>
  1820. </listitem>
  1821. <listitem>
  1822. <para><xref linkend="vidioc-querycap" /> did not mention the
  1823. sliced VBI and radio capability flags.</para>
  1824. </listitem>
  1825. <listitem>
  1826. <para>In <xref linkend="vidioc-g-frequency" /> it was
  1827. clarified that applications must initialize the tuner
  1828. <structfield>type</structfield> field of &v4l2-frequency; before
  1829. calling &VIDIOC-S-FREQUENCY;.</para>
  1830. </listitem>
  1831. <listitem>
  1832. <para>The <structfield>reserved</structfield> array
  1833. in &v4l2-requestbuffers; has 2 elements, not 32.</para>
  1834. </listitem>
  1835. <listitem>
  1836. <para>In <xref linkend="output" /> and <xref
  1837. linkend="raw-vbi" /> the device file names
  1838. <filename>/dev/vout</filename> which never caught on were replaced
  1839. by <filename>/dev/video</filename>.</para>
  1840. </listitem>
  1841. <listitem>
  1842. <para>With Linux 2.6.15 the possible range for VBI device minor
  1843. numbers was extended from 224-239 to 224-255. Accordingly device file names
  1844. <filename>/dev/vbi0</filename> to <filename>/dev/vbi31</filename> are
  1845. possible now.</para>
  1846. </listitem>
  1847. </orderedlist>
  1848. </section>
  1849. <section>
  1850. <title>V4L2 in Linux 2.6.18</title>
  1851. <orderedlist>
  1852. <listitem>
  1853. <para>New ioctls &VIDIOC-G-EXT-CTRLS;, &VIDIOC-S-EXT-CTRLS;
  1854. and &VIDIOC-TRY-EXT-CTRLS; were added, a flag to skip unsupported
  1855. controls with &VIDIOC-QUERYCTRL;, new control types
  1856. <constant>V4L2_CTRL_TYPE_INTEGER64</constant> and
  1857. <constant>V4L2_CTRL_TYPE_CTRL_CLASS</constant> (<xref
  1858. linkend="v4l2-ctrl-type" />), and new control flags
  1859. <constant>V4L2_CTRL_FLAG_READ_ONLY</constant>,
  1860. <constant>V4L2_CTRL_FLAG_UPDATE</constant>,
  1861. <constant>V4L2_CTRL_FLAG_INACTIVE</constant> and
  1862. <constant>V4L2_CTRL_FLAG_SLIDER</constant> (<xref
  1863. linkend="control-flags" />). See <xref
  1864. linkend="extended-controls" /> for details.</para>
  1865. </listitem>
  1866. </orderedlist>
  1867. </section>
  1868. <section>
  1869. <title>V4L2 in Linux 2.6.19</title>
  1870. <orderedlist>
  1871. <listitem>
  1872. <para>In &v4l2-sliced-vbi-cap; a buffer type field was added
  1873. replacing a reserved field. Note on architectures where the size of
  1874. enum types differs from int types the size of the structure changed.
  1875. The &VIDIOC-G-SLICED-VBI-CAP; ioctl was redefined from being read-only
  1876. to write-read. Applications must initialize the type field and clear
  1877. the reserved fields now. These changes may <emphasis>break the
  1878. compatibility</emphasis> with older drivers and applications.</para>
  1879. </listitem>
  1880. <listitem>
  1881. <para>The ioctls &VIDIOC-ENUM-FRAMESIZES; and
  1882. &VIDIOC-ENUM-FRAMEINTERVALS; were added.</para>
  1883. </listitem>
  1884. <listitem>
  1885. <para>A new pixel format <constant>V4L2_PIX_FMT_RGB444</constant> (<xref
  1886. linkend="rgb-formats" />) was added.</para>
  1887. </listitem>
  1888. </orderedlist>
  1889. </section>
  1890. <section>
  1891. <title>V4L2 spec erratum 2006-10-12 (Draft 0.17)</title>
  1892. <orderedlist>
  1893. <listitem>
  1894. <para><constant>V4L2_PIX_FMT_HM12</constant> (<xref
  1895. linkend="reserved-formats" />) is a YUV 4:2:0, not 4:2:2 format.</para>
  1896. </listitem>
  1897. </orderedlist>
  1898. </section>
  1899. <section>
  1900. <title>V4L2 in Linux 2.6.21</title>
  1901. <orderedlist>
  1902. <listitem>
  1903. <para>The <filename>videodev2.h</filename> header file is
  1904. now dual licensed under GNU General Public License version two or
  1905. later, and under a 3-clause BSD-style license.</para>
  1906. </listitem>
  1907. </orderedlist>
  1908. </section>
  1909. <section>
  1910. <title>V4L2 in Linux 2.6.22</title>
  1911. <orderedlist>
  1912. <listitem>
  1913. <para>Two new field orders
  1914. <constant>V4L2_FIELD_INTERLACED_TB</constant> and
  1915. <constant>V4L2_FIELD_INTERLACED_BT</constant> were
  1916. added. See <xref linkend="v4l2-field" /> for details.</para>
  1917. </listitem>
  1918. <listitem>
  1919. <para>Three new clipping/blending methods with a global or
  1920. straight or inverted local alpha value were added to the video overlay
  1921. interface. See the description of the &VIDIOC-G-FBUF; and
  1922. &VIDIOC-S-FBUF; ioctls for details.</para>
  1923. <para>A new <structfield>global_alpha</structfield> field
  1924. was added to <link
  1925. linkend="v4l2-window"><structname>v4l2_window</structname></link>,
  1926. extending the structure. This may <emphasis>break
  1927. compatibility</emphasis> with applications using a struct
  1928. <structname>v4l2_window</structname> directly. However the <link
  1929. linkend="vidioc-g-fmt">VIDIOC_G/S/TRY_FMT</link> ioctls, which take a
  1930. pointer to a <link linkend="v4l2-format">v4l2_format</link> parent
  1931. structure with padding bytes at the end, are not affected.</para>
  1932. </listitem>
  1933. <listitem>
  1934. <para>The format of the <structfield>chromakey</structfield>
  1935. field in &v4l2-window; changed from "host order RGB32" to a pixel
  1936. value in the same format as the framebuffer. This may <emphasis>break
  1937. compatibility</emphasis> with existing applications. Drivers
  1938. supporting the "host order RGB32" format are not known.</para>
  1939. </listitem>
  1940. </orderedlist>
  1941. </section>
  1942. <section>
  1943. <title>V4L2 in Linux 2.6.24</title>
  1944. <orderedlist>
  1945. <listitem>
  1946. <para>The pixel formats
  1947. <constant>V4L2_PIX_FMT_PAL8</constant>,
  1948. <constant>V4L2_PIX_FMT_YUV444</constant>,
  1949. <constant>V4L2_PIX_FMT_YUV555</constant>,
  1950. <constant>V4L2_PIX_FMT_YUV565</constant> and
  1951. <constant>V4L2_PIX_FMT_YUV32</constant> were added.</para>
  1952. </listitem>
  1953. </orderedlist>
  1954. </section>
  1955. <section>
  1956. <title>V4L2 in Linux 2.6.25</title>
  1957. <orderedlist>
  1958. <listitem>
  1959. <para>The pixel formats <link linkend="V4L2-PIX-FMT-Y16">
  1960. <constant>V4L2_PIX_FMT_Y16</constant></link> and <link
  1961. linkend="V4L2-PIX-FMT-SBGGR16">
  1962. <constant>V4L2_PIX_FMT_SBGGR16</constant></link> were added.</para>
  1963. </listitem>
  1964. <listitem>
  1965. <para>New <link linkend="control">controls</link>
  1966. <constant>V4L2_CID_POWER_LINE_FREQUENCY</constant>,
  1967. <constant>V4L2_CID_HUE_AUTO</constant>,
  1968. <constant>V4L2_CID_WHITE_BALANCE_TEMPERATURE</constant>,
  1969. <constant>V4L2_CID_SHARPNESS</constant> and
  1970. <constant>V4L2_CID_BACKLIGHT_COMPENSATION</constant> were added. The
  1971. controls <constant>V4L2_CID_BLACK_LEVEL</constant>,
  1972. <constant>V4L2_CID_WHITENESS</constant>,
  1973. <constant>V4L2_CID_HCENTER</constant> and
  1974. <constant>V4L2_CID_VCENTER</constant> were deprecated.
  1975. </para>
  1976. </listitem>
  1977. <listitem>
  1978. <para>A <link linkend="camera-controls">Camera controls
  1979. class</link> was added, with the new controls
  1980. <constant>V4L2_CID_EXPOSURE_AUTO</constant>,
  1981. <constant>V4L2_CID_EXPOSURE_ABSOLUTE</constant>,
  1982. <constant>V4L2_CID_EXPOSURE_AUTO_PRIORITY</constant>,
  1983. <constant>V4L2_CID_PAN_RELATIVE</constant>,
  1984. <constant>V4L2_CID_TILT_RELATIVE</constant>,
  1985. <constant>V4L2_CID_PAN_RESET</constant>,
  1986. <constant>V4L2_CID_TILT_RESET</constant>,
  1987. <constant>V4L2_CID_PAN_ABSOLUTE</constant>,
  1988. <constant>V4L2_CID_TILT_ABSOLUTE</constant>,
  1989. <constant>V4L2_CID_FOCUS_ABSOLUTE</constant>,
  1990. <constant>V4L2_CID_FOCUS_RELATIVE</constant> and
  1991. <constant>V4L2_CID_FOCUS_AUTO</constant>.</para>
  1992. </listitem>
  1993. <listitem>
  1994. <para>The <constant>VIDIOC_G_MPEGCOMP</constant> and
  1995. <constant>VIDIOC_S_MPEGCOMP</constant> ioctls, which were superseded
  1996. by the <link linkend="extended-controls">extended controls</link>
  1997. interface in Linux 2.6.18, where finally removed from the
  1998. <filename>videodev2.h</filename> header file.</para>
  1999. </listitem>
  2000. </orderedlist>
  2001. </section>
  2002. <section>
  2003. <title>V4L2 in Linux 2.6.26</title>
  2004. <orderedlist>
  2005. <listitem>
  2006. <para>The pixel formats
  2007. <constant>V4L2_PIX_FMT_Y16</constant> and
  2008. <constant>V4L2_PIX_FMT_SBGGR16</constant> were added.</para>
  2009. </listitem>
  2010. <listitem>
  2011. <para>Added user controls
  2012. <constant>V4L2_CID_CHROMA_AGC</constant> and
  2013. <constant>V4L2_CID_COLOR_KILLER</constant>.</para>
  2014. </listitem>
  2015. </orderedlist>
  2016. </section>
  2017. <section>
  2018. <title>V4L2 in Linux 2.6.27</title>
  2019. <orderedlist>
  2020. <listitem>
  2021. <para>The &VIDIOC-S-HW-FREQ-SEEK; ioctl and the
  2022. <constant>V4L2_CAP_HW_FREQ_SEEK</constant> capability were added.</para>
  2023. </listitem>
  2024. <listitem>
  2025. <para>The pixel formats
  2026. <constant>V4L2_PIX_FMT_YVYU</constant>,
  2027. <constant>V4L2_PIX_FMT_PCA501</constant>,
  2028. <constant>V4L2_PIX_FMT_PCA505</constant>,
  2029. <constant>V4L2_PIX_FMT_PCA508</constant>,
  2030. <constant>V4L2_PIX_FMT_PCA561</constant>,
  2031. <constant>V4L2_PIX_FMT_SGBRG8</constant>,
  2032. <constant>V4L2_PIX_FMT_PAC207</constant> and
  2033. <constant>V4L2_PIX_FMT_PJPG</constant> were added.</para>
  2034. </listitem>
  2035. </orderedlist>
  2036. </section>
  2037. <section>
  2038. <title>V4L2 in Linux 2.6.28</title>
  2039. <orderedlist>
  2040. <listitem>
  2041. <para>Added <constant>V4L2_MPEG_AUDIO_ENCODING_AAC</constant> and
  2042. <constant>V4L2_MPEG_AUDIO_ENCODING_AC3</constant> MPEG audio encodings.</para>
  2043. </listitem>
  2044. <listitem>
  2045. <para>Added <constant>V4L2_MPEG_VIDEO_ENCODING_MPEG_4_AVC</constant> MPEG
  2046. video encoding.</para>
  2047. </listitem>
  2048. <listitem>
  2049. <para>The pixel formats
  2050. <constant>V4L2_PIX_FMT_SGRBG10</constant> and
  2051. <constant>V4L2_PIX_FMT_SGRBG10DPCM8</constant> were added.</para>
  2052. </listitem>
  2053. </orderedlist>
  2054. </section>
  2055. <section>
  2056. <title>V4L2 in Linux 2.6.29</title>
  2057. <orderedlist>
  2058. <listitem>
  2059. <para>The <constant>VIDIOC_G_CHIP_IDENT</constant> ioctl was renamed
  2060. to <constant>VIDIOC_G_CHIP_IDENT_OLD</constant> and &VIDIOC-DBG-G-CHIP-IDENT;
  2061. was introduced in its place. The old struct <structname>v4l2_chip_ident</structname>
  2062. was renamed to <structname id="v4l2-chip-ident-old">v4l2_chip_ident_old</structname>.</para>
  2063. </listitem>
  2064. <listitem>
  2065. <para>The pixel formats
  2066. <constant>V4L2_PIX_FMT_VYUY</constant>,
  2067. <constant>V4L2_PIX_FMT_NV16</constant> and
  2068. <constant>V4L2_PIX_FMT_NV61</constant> were added.</para>
  2069. </listitem>
  2070. <listitem>
  2071. <para>Added camera controls
  2072. <constant>V4L2_CID_ZOOM_ABSOLUTE</constant>,
  2073. <constant>V4L2_CID_ZOOM_RELATIVE</constant>,
  2074. <constant>V4L2_CID_ZOOM_CONTINUOUS</constant> and
  2075. <constant>V4L2_CID_PRIVACY</constant>.</para>
  2076. </listitem>
  2077. </orderedlist>
  2078. </section>
  2079. <section>
  2080. <title>V4L2 in Linux 2.6.30</title>
  2081. <orderedlist>
  2082. <listitem>
  2083. <para>New control flag <constant>V4L2_CTRL_FLAG_WRITE_ONLY</constant> was added.</para>
  2084. </listitem>
  2085. <listitem>
  2086. <para>New control <constant>V4L2_CID_COLORFX</constant> was added.</para>
  2087. </listitem>
  2088. </orderedlist>
  2089. </section>
  2090. <section>
  2091. <title>V4L2 in Linux 2.6.32</title>
  2092. <orderedlist>
  2093. <listitem>
  2094. <para>In order to be easier to compare a V4L2 API and a kernel
  2095. version, now V4L2 API is numbered using the Linux Kernel version numeration.</para>
  2096. </listitem>
  2097. <listitem>
  2098. <para>Finalized the RDS capture API. See <xref linkend="rds" /> for
  2099. more information.</para>
  2100. </listitem>
  2101. <listitem>
  2102. <para>Added new capabilities for modulators and RDS encoders.</para>
  2103. </listitem>
  2104. <listitem>
  2105. <para>Add description for libv4l API.</para>
  2106. </listitem>
  2107. <listitem>
  2108. <para>Added support for string controls via new type <constant>V4L2_CTRL_TYPE_STRING</constant>.</para>
  2109. </listitem>
  2110. <listitem>
  2111. <para>Added <constant>V4L2_CID_BAND_STOP_FILTER</constant> documentation.</para>
  2112. </listitem>
  2113. <listitem>
  2114. <para>Added FM Modulator (FM TX) Extended Control Class: <constant>V4L2_CTRL_CLASS_FM_TX</constant> and their Control IDs.</para>
  2115. </listitem>
  2116. <listitem>
  2117. <para>Added Remote Controller chapter, describing the default Remote Controller mapping for media devices.</para>
  2118. </listitem>
  2119. </orderedlist>
  2120. </section>
  2121. </section>
  2122. <section id="other">
  2123. <title>Relation of V4L2 to other Linux multimedia APIs</title>
  2124. <section id="xvideo">
  2125. <title>X Video Extension</title>
  2126. <para>The X Video Extension (abbreviated XVideo or just Xv) is
  2127. an extension of the X Window system, implemented for example by the
  2128. XFree86 project. Its scope is similar to V4L2, an API to video capture
  2129. and output devices for X clients. Xv allows applications to display
  2130. live video in a window, send window contents to a TV output, and
  2131. capture or output still images in XPixmaps<footnote>
  2132. <para>This is not implemented in XFree86.</para>
  2133. </footnote>. With their implementation XFree86 makes the
  2134. extension available across many operating systems and
  2135. architectures.</para>
  2136. <para>Because the driver is embedded into the X server Xv has a
  2137. number of advantages over the V4L2 <link linkend="overlay">video
  2138. overlay interface</link>. The driver can easily determine the overlay
  2139. target, &ie; visible graphics memory or off-screen buffers for a
  2140. destructive overlay. It can program the RAMDAC for a non-destructive
  2141. overlay, scaling or color-keying, or the clipping functions of the
  2142. video capture hardware, always in sync with drawing operations or
  2143. windows moving or changing their stacking order.</para>
  2144. <para>To combine the advantages of Xv and V4L a special Xv
  2145. driver exists in XFree86 and XOrg, just programming any overlay capable
  2146. Video4Linux device it finds. To enable it
  2147. <filename>/etc/X11/XF86Config</filename> must contain these lines:</para>
  2148. <para><screen>
  2149. Section "Module"
  2150. Load "v4l"
  2151. EndSection</screen></para>
  2152. <para>As of XFree86 4.2 this driver still supports only V4L
  2153. ioctls, however it should work just fine with all V4L2 devices through
  2154. the V4L2 backward-compatibility layer. Since V4L2 permits multiple
  2155. opens it is possible (if supported by the V4L2 driver) to capture
  2156. video while an X client requested video overlay. Restrictions of
  2157. simultaneous capturing and overlay are discussed in <xref
  2158. linkend="overlay" /> apply.</para>
  2159. <para>Only marginally related to V4L2, XFree86 extended Xv to
  2160. support hardware YUV to RGB conversion and scaling for faster video
  2161. playback, and added an interface to MPEG-2 decoding hardware. This API
  2162. is useful to display images captured with V4L2 devices.</para>
  2163. </section>
  2164. <section>
  2165. <title>Digital Video</title>
  2166. <para>V4L2 does not support digital terrestrial, cable or
  2167. satellite broadcast. A separate project aiming at digital receivers
  2168. exists. You can find its homepage at <ulink
  2169. url="http://linuxtv.org">http://linuxtv.org</ulink>. The Linux DVB API
  2170. has no connection to the V4L2 API except that drivers for hybrid
  2171. hardware may support both.</para>
  2172. </section>
  2173. <section>
  2174. <title>Audio Interfaces</title>
  2175. <para>[to do - OSS/ALSA]</para>
  2176. </section>
  2177. </section>
  2178. <section id="experimental">
  2179. <title>Experimental API Elements</title>
  2180. <para>The following V4L2 API elements are currently experimental
  2181. and may change in the future.</para>
  2182. <itemizedlist>
  2183. <listitem>
  2184. <para>Video Output Overlay (OSD) Interface, <xref
  2185. linkend="osd" />.</para>
  2186. </listitem>
  2187. <listitem>
  2188. <para><constant>V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY</constant>,
  2189. &v4l2-buf-type;, <xref linkend="v4l2-buf-type" />.</para>
  2190. </listitem>
  2191. <listitem>
  2192. <para><constant>V4L2_CAP_VIDEO_OUTPUT_OVERLAY</constant>,
  2193. &VIDIOC-QUERYCAP; ioctl, <xref linkend="device-capabilities" />.</para>
  2194. </listitem>
  2195. <listitem>
  2196. <para>&VIDIOC-ENUM-FRAMESIZES; and
  2197. &VIDIOC-ENUM-FRAMEINTERVALS; ioctls.</para>
  2198. </listitem>
  2199. <listitem>
  2200. <para>&VIDIOC-G-ENC-INDEX; ioctl.</para>
  2201. </listitem>
  2202. <listitem>
  2203. <para>&VIDIOC-ENCODER-CMD; and &VIDIOC-TRY-ENCODER-CMD;
  2204. ioctls.</para>
  2205. </listitem>
  2206. <listitem>
  2207. <para>&VIDIOC-DBG-G-REGISTER; and &VIDIOC-DBG-S-REGISTER;
  2208. ioctls.</para>
  2209. </listitem>
  2210. <listitem>
  2211. <para>&VIDIOC-DBG-G-CHIP-IDENT; ioctl.</para>
  2212. </listitem>
  2213. </itemizedlist>
  2214. </section>
  2215. <section id="obsolete">
  2216. <title>Obsolete API Elements</title>
  2217. <para>The following V4L2 API elements were superseded by new
  2218. interfaces and should not be implemented in new drivers.</para>
  2219. <itemizedlist>
  2220. <listitem>
  2221. <para><constant>VIDIOC_G_MPEGCOMP</constant> and
  2222. <constant>VIDIOC_S_MPEGCOMP</constant> ioctls. Use Extended Controls,
  2223. <xref linkend="extended-controls" />.</para>
  2224. </listitem>
  2225. </itemizedlist>
  2226. </section>
  2227. <!--
  2228. Local Variables:
  2229. mode: sgml
  2230. sgml-parent-document: "v4l2.sgml"
  2231. indent-tabs-mode: nil
  2232. End:
  2233. -->