4 <firstname>Michael</firstname>
5 <surname>Schimek</surname>
6 <othername role="mi">H</othername>
9 <email>mschimek@gmx.at</email>
15 <firstname>Bill</firstname>
16 <surname>Dirks</surname>
17 <!-- Commented until Bill opts in to be spammed.
20 <email>bill@thedirks.org</email>
23 <contrib>Original author of the V4L2 API and
24 documentation.</contrib>
28 <firstname>Hans</firstname>
29 <surname>Verkuil</surname>
30 <contrib>Designed and documented the VIDIOC_LOG_STATUS ioctl,
31 the extended control ioctls, major parts of the sliced VBI API, the
32 MPEG encoder and decoder APIs and the DV Timings API.</contrib>
35 <email>hverkuil@xs4all.nl</email>
41 <firstname>Martin</firstname>
42 <surname>Rubli</surname>
46 <email>martin_rubli@logitech.com</email>
49 <contrib>Designed and documented the VIDIOC_ENUM_FRAMESIZES
50 and VIDIOC_ENUM_FRAMEINTERVALS ioctls.</contrib>
54 <firstname>Andy</firstname>
55 <surname>Walls</surname>
56 <contrib>Documented the fielded V4L2_MPEG_STREAM_VBI_FMT_IVTV
57 MPEG stream embedded, sliced VBI data format in this specification.
61 <email>awalls@md.metrocast.net</email>
67 <firstname>Mauro</firstname>
68 <surname>Carvalho Chehab</surname>
69 <contrib>Documented libv4l, designed and added v4l2grab example,
70 Remote Controller chapter.</contrib>
73 <email>mchehab@redhat.com</email>
79 <firstname>Muralidharan</firstname>
80 <surname>Karicheri</surname>
81 <contrib>Documented the Digital Video timings API.</contrib>
84 <email>m-karicheri2@ti.com</email>
90 <firstname>Pawel</firstname>
91 <surname>Osciak</surname>
92 <contrib>Designed and documented the multi-planar API.</contrib>
95 <email>pawel AT osciak.com</email>
101 <firstname>Sakari</firstname>
102 <surname>Ailus</surname>
103 <contrib>Subdev selections API.</contrib>
106 <email>sakari.ailus@iki.fi</email>
127 <holder>Bill Dirks, Michael H. Schimek, Hans Verkuil, Martin
128 Rubli, Andy Walls, Muralidharan Karicheri, Mauro Carvalho Chehab,
129 Pawel Osciak</holder>
132 <para>Except when explicitly stated as GPL, programming examples within
133 this part can be used and distributed without restrictions.</para>
136 <!-- Put document revisions here, newest first. -->
137 <!-- API revisions (changes and additions of defines, enums,
138 structs, ioctls) must be noted in more detail in the history chapter
139 (compat.xml), along with the possible impact on existing drivers and
143 <revnumber>3.5</revnumber>
144 <date>2012-05-07</date>
145 <authorinitials>sa, sn</authorinitials>
146 <revremark>Added V4L2_CTRL_TYPE_INTEGER_MENU and V4L2 subdev
147 selections API. Improved the description of V4L2_CID_COLORFX
148 control, added V4L2_CID_COLORFX_CBCR control.
149 Added camera controls V4L2_CID_AUTO_EXPOSURE_BIAS,
150 V4L2_CID_AUTO_N_PRESET_WHITE_BALANCE, V4L2_CID_IMAGE_STABILIZATION,
151 V4L2_CID_ISO_SENSITIVITY, V4L2_CID_ISO_SENSITIVITY_AUTO,
152 V4L2_CID_EXPOSURE_METERING, V4L2_CID_SCENE_MODE,
153 V4L2_CID_3A_LOCK, V4L2_CID_AUTO_FOCUS_START,
154 V4L2_CID_AUTO_FOCUS_STOP, V4L2_CID_AUTO_FOCUS_STATUS
155 and V4L2_CID_AUTO_FOCUS_RANGE.
157 <date>2012-05-01</date>
158 <authorinitials>hv</authorinitials>
159 <revremark>Added VIDIOC_ENUM_DV_TIMINGS, VIDIOC_QUERY_DV_TIMINGS and
160 VIDIOC_DV_TIMINGS_CAP.
165 <revnumber>3.4</revnumber>
166 <date>2012-01-25</date>
167 <authorinitials>sn</authorinitials>
168 <revremark>Added <link linkend="jpeg-controls">JPEG compression
169 control class.</link>
174 <revnumber>3.3</revnumber>
175 <date>2012-01-11</date>
176 <authorinitials>hv</authorinitials>
177 <revremark>Added device_caps field to struct v4l2_capabilities.</revremark>
181 <revnumber>3.2</revnumber>
182 <date>2011-08-26</date>
183 <authorinitials>hv</authorinitials>
184 <revremark>Added V4L2_CTRL_FLAG_VOLATILE.</revremark>
188 <revnumber>3.1</revnumber>
189 <date>2011-06-27</date>
190 <authorinitials>mcc, po, hv</authorinitials>
191 <revremark>Documented that VIDIOC_QUERYCAP now returns a per-subsystem version instead of a per-driver one.
192 Standardize an error code for invalid ioctl.
193 Added V4L2_CTRL_TYPE_BITMASK.</revremark>
197 <revnumber>2.6.39</revnumber>
198 <date>2011-03-01</date>
199 <authorinitials>mcc, po</authorinitials>
200 <revremark>Removed VIDIOC_*_OLD from videodev2.h header and update it to reflect latest changes. Added the <link linkend="planar-apis">multi-planar API</link>.</revremark>
204 <revnumber>2.6.37</revnumber>
205 <date>2010-08-06</date>
206 <authorinitials>hv</authorinitials>
207 <revremark>Removed obsolete vtx (videotext) API.</revremark>
211 <revnumber>2.6.33</revnumber>
212 <date>2009-12-03</date>
213 <authorinitials>mk</authorinitials>
214 <revremark>Added documentation for the Digital Video timings API.</revremark>
218 <revnumber>2.6.32</revnumber>
219 <date>2009-08-31</date>
220 <authorinitials>mcc</authorinitials>
221 <revremark>Now, revisions will match the kernel version where
222 the V4L2 API changes will be used by the Linux Kernel.
223 Also added Remote Controller chapter.</revremark>
227 <revnumber>0.29</revnumber>
228 <date>2009-08-26</date>
229 <authorinitials>ev</authorinitials>
230 <revremark>Added documentation for string controls and for FM Transmitter controls.</revremark>
234 <revnumber>0.28</revnumber>
235 <date>2009-08-26</date>
236 <authorinitials>gl</authorinitials>
237 <revremark>Added V4L2_CID_BAND_STOP_FILTER documentation.</revremark>
241 <revnumber>0.27</revnumber>
242 <date>2009-08-15</date>
243 <authorinitials>mcc</authorinitials>
244 <revremark>Added libv4l and Remote Controller documentation;
245 added v4l2grab and keytable application examples.</revremark>
249 <revnumber>0.26</revnumber>
250 <date>2009-07-23</date>
251 <authorinitials>hv</authorinitials>
252 <revremark>Finalized the RDS capture API. Added modulator and RDS encoder
253 capabilities. Added support for string controls.</revremark>
257 <revnumber>0.25</revnumber>
258 <date>2009-01-18</date>
259 <authorinitials>hv</authorinitials>
260 <revremark>Added pixel formats VYUY, NV16 and NV61, and changed
261 the debug ioctls VIDIOC_DBG_G/S_REGISTER and VIDIOC_DBG_G_CHIP_IDENT.
262 Added camera controls V4L2_CID_ZOOM_ABSOLUTE, V4L2_CID_ZOOM_RELATIVE,
263 V4L2_CID_ZOOM_CONTINUOUS and V4L2_CID_PRIVACY.</revremark>
267 <revnumber>0.24</revnumber>
268 <date>2008-03-04</date>
269 <authorinitials>mhs</authorinitials>
270 <revremark>Added pixel formats Y16 and SBGGR16, new controls
271 and a camera controls class. Removed VIDIOC_G/S_MPEGCOMP.</revremark>
275 <revnumber>0.23</revnumber>
276 <date>2007-08-30</date>
277 <authorinitials>mhs</authorinitials>
278 <revremark>Fixed a typo in VIDIOC_DBG_G/S_REGISTER.
279 Clarified the byte order of packed pixel formats.</revremark>
283 <revnumber>0.22</revnumber>
284 <date>2007-08-29</date>
285 <authorinitials>mhs</authorinitials>
286 <revremark>Added the Video Output Overlay interface, new MPEG
287 controls, V4L2_FIELD_INTERLACED_TB and V4L2_FIELD_INTERLACED_BT,
288 VIDIOC_DBG_G/S_REGISTER, VIDIOC_(TRY_)ENCODER_CMD,
289 VIDIOC_G_CHIP_IDENT, VIDIOC_G_ENC_INDEX, new pixel formats.
290 Clarifications in the cropping chapter, about RGB pixel formats, the
291 mmap(), poll(), select(), read() and write() functions. Typographical
296 <revnumber>0.21</revnumber>
297 <date>2006-12-19</date>
298 <authorinitials>mhs</authorinitials>
299 <revremark>Fixed a link in the VIDIOC_G_EXT_CTRLS section.</revremark>
303 <revnumber>0.20</revnumber>
304 <date>2006-11-24</date>
305 <authorinitials>mhs</authorinitials>
306 <revremark>Clarified the purpose of the audioset field in
307 struct v4l2_input and v4l2_output.</revremark>
311 <revnumber>0.19</revnumber>
312 <date>2006-10-19</date>
313 <authorinitials>mhs</authorinitials>
314 <revremark>Documented V4L2_PIX_FMT_RGB444.</revremark>
318 <revnumber>0.18</revnumber>
319 <date>2006-10-18</date>
320 <authorinitials>mhs</authorinitials>
321 <revremark>Added the description of extended controls by Hans
322 Verkuil. Linked V4L2_PIX_FMT_MPEG to V4L2_CID_MPEG_STREAM_TYPE.</revremark>
326 <revnumber>0.17</revnumber>
327 <date>2006-10-12</date>
328 <authorinitials>mhs</authorinitials>
329 <revremark>Corrected V4L2_PIX_FMT_HM12 description.</revremark>
333 <revnumber>0.16</revnumber>
334 <date>2006-10-08</date>
335 <authorinitials>mhs</authorinitials>
336 <revremark>VIDIOC_ENUM_FRAMESIZES and
337 VIDIOC_ENUM_FRAMEINTERVALS are now part of the API.</revremark>
341 <revnumber>0.15</revnumber>
342 <date>2006-09-23</date>
343 <authorinitials>mhs</authorinitials>
344 <revremark>Cleaned up the bibliography, added BT.653 and
345 BT.1119. capture.c/start_capturing() for user pointer I/O did not
346 initialize the buffer index. Documented the V4L MPEG and MJPEG
347 VID_TYPEs and V4L2_PIX_FMT_SBGGR8. Updated the list of reserved pixel
348 formats. See the history chapter for API changes.</revremark>
352 <revnumber>0.14</revnumber>
353 <date>2006-09-14</date>
354 <authorinitials>mr</authorinitials>
355 <revremark>Added VIDIOC_ENUM_FRAMESIZES and
356 VIDIOC_ENUM_FRAMEINTERVALS proposal for frame format enumeration of
357 digital devices.</revremark>
361 <revnumber>0.13</revnumber>
362 <date>2006-04-07</date>
363 <authorinitials>mhs</authorinitials>
364 <revremark>Corrected the description of struct v4l2_window
365 clips. New V4L2_STD_ and V4L2_TUNER_MODE_LANG1_LANG2
370 <revnumber>0.12</revnumber>
371 <date>2006-02-03</date>
372 <authorinitials>mhs</authorinitials>
373 <revremark>Corrected the description of struct
374 v4l2_captureparm and v4l2_outputparm.</revremark>
378 <revnumber>0.11</revnumber>
379 <date>2006-01-27</date>
380 <authorinitials>mhs</authorinitials>
381 <revremark>Improved the description of struct
382 v4l2_tuner.</revremark>
386 <revnumber>0.10</revnumber>
387 <date>2006-01-10</date>
388 <authorinitials>mhs</authorinitials>
389 <revremark>VIDIOC_G_INPUT and VIDIOC_S_PARM
390 clarifications.</revremark>
394 <revnumber>0.9</revnumber>
395 <date>2005-11-27</date>
396 <authorinitials>mhs</authorinitials>
397 <revremark>Improved the 525 line numbering diagram. Hans
398 Verkuil and I rewrote the sliced VBI section. He also contributed a
399 VIDIOC_LOG_STATUS page. Fixed VIDIOC_S_STD call in the video standard
400 selection example. Various updates.</revremark>
404 <revnumber>0.8</revnumber>
405 <date>2004-10-04</date>
406 <authorinitials>mhs</authorinitials>
407 <revremark>Somehow a piece of junk slipped into the capture
408 example, removed.</revremark>
412 <revnumber>0.7</revnumber>
413 <date>2004-09-19</date>
414 <authorinitials>mhs</authorinitials>
415 <revremark>Fixed video standard selection, control
416 enumeration, downscaling and aspect example. Added read and user
417 pointer i/o to video capture example.</revremark>
421 <revnumber>0.6</revnumber>
422 <date>2004-08-01</date>
423 <authorinitials>mhs</authorinitials>
424 <revremark>v4l2_buffer changes, added video capture example,
425 various corrections.</revremark>
429 <revnumber>0.5</revnumber>
430 <date>2003-11-05</date>
431 <authorinitials>mhs</authorinitials>
432 <revremark>Pixel format erratum.</revremark>
436 <revnumber>0.4</revnumber>
437 <date>2003-09-17</date>
438 <authorinitials>mhs</authorinitials>
439 <revremark>Corrected source and Makefile to generate a PDF.
440 SGML fixes. Added latest API changes. Closed gaps in the history
445 <revnumber>0.3</revnumber>
446 <date>2003-02-05</date>
447 <authorinitials>mhs</authorinitials>
448 <revremark>Another draft, more corrections.</revremark>
452 <revnumber>0.2</revnumber>
453 <date>2003-01-15</date>
454 <authorinitials>mhs</authorinitials>
455 <revremark>Second draft, with corrections pointed out by Gerd
460 <revnumber>0.1</revnumber>
461 <date>2002-12-01</date>
462 <authorinitials>mhs</authorinitials>
463 <revremark>First draft, based on documentation by Bill Dirks
464 and discussions on the V4L mailing list.</revremark>
469 <title>Video for Linux Two API Specification</title>
470 <subtitle>Revision 3.5</subtitle>
472 <chapter id="common">
476 <chapter id="pixfmt">
484 <chapter id="devices">
485 <title>Interfaces</title>
487 <section id="capture"> &sub-dev-capture; </section>
488 <section id="overlay"> &sub-dev-overlay; </section>
489 <section id="output"> &sub-dev-output; </section>
490 <section id="osd"> &sub-dev-osd; </section>
491 <section id="codec"> &sub-dev-codec; </section>
492 <section id="effect"> &sub-dev-effect; </section>
493 <section id="raw-vbi"> &sub-dev-raw-vbi; </section>
494 <section id="sliced"> &sub-dev-sliced-vbi; </section>
495 <section id="ttx"> &sub-dev-teletext; </section>
496 <section id="radio"> &sub-dev-radio; </section>
497 <section id="rds"> &sub-dev-rds; </section>
498 <section id="event"> &sub-dev-event; </section>
499 <section id="subdev"> &sub-dev-subdev; </section>
502 <chapter id="driver">
506 <chapter id="libv4l">
510 <chapter id="compat">
514 <appendix id="user-func">
515 <title>Function Reference</title>
517 <!-- Keep this alphabetically sorted. -->
521 <!-- All ioctls go here. -->
524 &sub-dbg-g-chip-ident;
532 &sub-enum-dv-presets;
533 &sub-enum-dv-timings;
535 &sub-enum-framesizes;
536 &sub-enum-frameintervals;
558 &sub-g-sliced-vbi-cap;
568 &sub-query-dv-preset;
569 &sub-query-dv-timings;
574 &sub-subdev-enum-frame-interval;
575 &sub-subdev-enum-frame-size;
576 &sub-subdev-enum-mbus-code;
579 &sub-subdev-g-frame-interval;
580 &sub-subdev-g-selection;
581 &sub-subscribe-event;
582 <!-- End of ioctls. -->
592 <appendix id="videodev">
593 <title>Video For Linux Two Header File</title>
597 <appendix id="capture-example">
598 <title>Video Capture Example</title>
602 <appendix id="v4l2grab-example">
603 <title>Video Grabber example using libv4l</title>
604 <para>This program demonstrates how to grab V4L2 images in ppm format by
605 using libv4l handlers. The advantage is that this grabber can potentially work
606 with any V4L2 driver.</para>