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 and major parts of the sliced VBI
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>
115 <holder>Bill Dirks, Michael H. Schimek, Hans Verkuil, Martin
116 Rubli, Andy Walls, Muralidharan Karicheri, Mauro Carvalho Chehab,
117 Pawel Osciak</holder>
120 <para>Except when explicitly stated as GPL, programming examples within
121 this part can be used and distributed without restrictions.</para>
124 <!-- Put document revisions here, newest first. -->
125 <!-- API revisions (changes and additions of defines, enums,
126 structs, ioctls) must be noted in more detail in the history chapter
127 (compat.xml), along with the possible impact on existing drivers and
131 <revnumber>3.1</revnumber>
132 <date>2011-06-27</date>
133 <authorinitials>mcc, po, hv</authorinitials>
134 <revremark>Documented that VIDIOC_QUERYCAP now returns a per-subsystem version instead of a per-driver one.
135 Standardize an error code for invalid ioctl.
136 Added V4L2_CTRL_TYPE_BITMASK.</revremark>
140 <revnumber>2.6.39</revnumber>
141 <date>2011-03-01</date>
142 <authorinitials>mcc, po</authorinitials>
143 <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>
147 <revnumber>2.6.37</revnumber>
148 <date>2010-08-06</date>
149 <authorinitials>hv</authorinitials>
150 <revremark>Removed obsolete vtx (videotext) API.</revremark>
154 <revnumber>2.6.33</revnumber>
155 <date>2009-12-03</date>
156 <authorinitials>mk</authorinitials>
157 <revremark>Added documentation for the Digital Video timings API.</revremark>
161 <revnumber>2.6.32</revnumber>
162 <date>2009-08-31</date>
163 <authorinitials>mcc</authorinitials>
164 <revremark>Now, revisions will match the kernel version where
165 the V4L2 API changes will be used by the Linux Kernel.
166 Also added Remote Controller chapter.</revremark>
170 <revnumber>0.29</revnumber>
171 <date>2009-08-26</date>
172 <authorinitials>ev</authorinitials>
173 <revremark>Added documentation for string controls and for FM Transmitter controls.</revremark>
177 <revnumber>0.28</revnumber>
178 <date>2009-08-26</date>
179 <authorinitials>gl</authorinitials>
180 <revremark>Added V4L2_CID_BAND_STOP_FILTER documentation.</revremark>
184 <revnumber>0.27</revnumber>
185 <date>2009-08-15</date>
186 <authorinitials>mcc</authorinitials>
187 <revremark>Added libv4l and Remote Controller documentation;
188 added v4l2grab and keytable application examples.</revremark>
192 <revnumber>0.26</revnumber>
193 <date>2009-07-23</date>
194 <authorinitials>hv</authorinitials>
195 <revremark>Finalized the RDS capture API. Added modulator and RDS encoder
196 capabilities. Added support for string controls.</revremark>
200 <revnumber>0.25</revnumber>
201 <date>2009-01-18</date>
202 <authorinitials>hv</authorinitials>
203 <revremark>Added pixel formats VYUY, NV16 and NV61, and changed
204 the debug ioctls VIDIOC_DBG_G/S_REGISTER and VIDIOC_DBG_G_CHIP_IDENT.
205 Added camera controls V4L2_CID_ZOOM_ABSOLUTE, V4L2_CID_ZOOM_RELATIVE,
206 V4L2_CID_ZOOM_CONTINUOUS and V4L2_CID_PRIVACY.</revremark>
210 <revnumber>0.24</revnumber>
211 <date>2008-03-04</date>
212 <authorinitials>mhs</authorinitials>
213 <revremark>Added pixel formats Y16 and SBGGR16, new controls
214 and a camera controls class. Removed VIDIOC_G/S_MPEGCOMP.</revremark>
218 <revnumber>0.23</revnumber>
219 <date>2007-08-30</date>
220 <authorinitials>mhs</authorinitials>
221 <revremark>Fixed a typo in VIDIOC_DBG_G/S_REGISTER.
222 Clarified the byte order of packed pixel formats.</revremark>
226 <revnumber>0.22</revnumber>
227 <date>2007-08-29</date>
228 <authorinitials>mhs</authorinitials>
229 <revremark>Added the Video Output Overlay interface, new MPEG
230 controls, V4L2_FIELD_INTERLACED_TB and V4L2_FIELD_INTERLACED_BT,
231 VIDIOC_DBG_G/S_REGISTER, VIDIOC_(TRY_)ENCODER_CMD,
232 VIDIOC_G_CHIP_IDENT, VIDIOC_G_ENC_INDEX, new pixel formats.
233 Clarifications in the cropping chapter, about RGB pixel formats, the
234 mmap(), poll(), select(), read() and write() functions. Typographical
239 <revnumber>0.21</revnumber>
240 <date>2006-12-19</date>
241 <authorinitials>mhs</authorinitials>
242 <revremark>Fixed a link in the VIDIOC_G_EXT_CTRLS section.</revremark>
246 <revnumber>0.20</revnumber>
247 <date>2006-11-24</date>
248 <authorinitials>mhs</authorinitials>
249 <revremark>Clarified the purpose of the audioset field in
250 struct v4l2_input and v4l2_output.</revremark>
254 <revnumber>0.19</revnumber>
255 <date>2006-10-19</date>
256 <authorinitials>mhs</authorinitials>
257 <revremark>Documented V4L2_PIX_FMT_RGB444.</revremark>
261 <revnumber>0.18</revnumber>
262 <date>2006-10-18</date>
263 <authorinitials>mhs</authorinitials>
264 <revremark>Added the description of extended controls by Hans
265 Verkuil. Linked V4L2_PIX_FMT_MPEG to V4L2_CID_MPEG_STREAM_TYPE.</revremark>
269 <revnumber>0.17</revnumber>
270 <date>2006-10-12</date>
271 <authorinitials>mhs</authorinitials>
272 <revremark>Corrected V4L2_PIX_FMT_HM12 description.</revremark>
276 <revnumber>0.16</revnumber>
277 <date>2006-10-08</date>
278 <authorinitials>mhs</authorinitials>
279 <revremark>VIDIOC_ENUM_FRAMESIZES and
280 VIDIOC_ENUM_FRAMEINTERVALS are now part of the API.</revremark>
284 <revnumber>0.15</revnumber>
285 <date>2006-09-23</date>
286 <authorinitials>mhs</authorinitials>
287 <revremark>Cleaned up the bibliography, added BT.653 and
288 BT.1119. capture.c/start_capturing() for user pointer I/O did not
289 initialize the buffer index. Documented the V4L MPEG and MJPEG
290 VID_TYPEs and V4L2_PIX_FMT_SBGGR8. Updated the list of reserved pixel
291 formats. See the history chapter for API changes.</revremark>
295 <revnumber>0.14</revnumber>
296 <date>2006-09-14</date>
297 <authorinitials>mr</authorinitials>
298 <revremark>Added VIDIOC_ENUM_FRAMESIZES and
299 VIDIOC_ENUM_FRAMEINTERVALS proposal for frame format enumeration of
300 digital devices.</revremark>
304 <revnumber>0.13</revnumber>
305 <date>2006-04-07</date>
306 <authorinitials>mhs</authorinitials>
307 <revremark>Corrected the description of struct v4l2_window
308 clips. New V4L2_STD_ and V4L2_TUNER_MODE_LANG1_LANG2
313 <revnumber>0.12</revnumber>
314 <date>2006-02-03</date>
315 <authorinitials>mhs</authorinitials>
316 <revremark>Corrected the description of struct
317 v4l2_captureparm and v4l2_outputparm.</revremark>
321 <revnumber>0.11</revnumber>
322 <date>2006-01-27</date>
323 <authorinitials>mhs</authorinitials>
324 <revremark>Improved the description of struct
325 v4l2_tuner.</revremark>
329 <revnumber>0.10</revnumber>
330 <date>2006-01-10</date>
331 <authorinitials>mhs</authorinitials>
332 <revremark>VIDIOC_G_INPUT and VIDIOC_S_PARM
333 clarifications.</revremark>
337 <revnumber>0.9</revnumber>
338 <date>2005-11-27</date>
339 <authorinitials>mhs</authorinitials>
340 <revremark>Improved the 525 line numbering diagram. Hans
341 Verkuil and I rewrote the sliced VBI section. He also contributed a
342 VIDIOC_LOG_STATUS page. Fixed VIDIOC_S_STD call in the video standard
343 selection example. Various updates.</revremark>
347 <revnumber>0.8</revnumber>
348 <date>2004-10-04</date>
349 <authorinitials>mhs</authorinitials>
350 <revremark>Somehow a piece of junk slipped into the capture
351 example, removed.</revremark>
355 <revnumber>0.7</revnumber>
356 <date>2004-09-19</date>
357 <authorinitials>mhs</authorinitials>
358 <revremark>Fixed video standard selection, control
359 enumeration, downscaling and aspect example. Added read and user
360 pointer i/o to video capture example.</revremark>
364 <revnumber>0.6</revnumber>
365 <date>2004-08-01</date>
366 <authorinitials>mhs</authorinitials>
367 <revremark>v4l2_buffer changes, added video capture example,
368 various corrections.</revremark>
372 <revnumber>0.5</revnumber>
373 <date>2003-11-05</date>
374 <authorinitials>mhs</authorinitials>
375 <revremark>Pixel format erratum.</revremark>
379 <revnumber>0.4</revnumber>
380 <date>2003-09-17</date>
381 <authorinitials>mhs</authorinitials>
382 <revremark>Corrected source and Makefile to generate a PDF.
383 SGML fixes. Added latest API changes. Closed gaps in the history
388 <revnumber>0.3</revnumber>
389 <date>2003-02-05</date>
390 <authorinitials>mhs</authorinitials>
391 <revremark>Another draft, more corrections.</revremark>
395 <revnumber>0.2</revnumber>
396 <date>2003-01-15</date>
397 <authorinitials>mhs</authorinitials>
398 <revremark>Second draft, with corrections pointed out by Gerd
403 <revnumber>0.1</revnumber>
404 <date>2002-12-01</date>
405 <authorinitials>mhs</authorinitials>
406 <revremark>First draft, based on documentation by Bill Dirks
407 and discussions on the V4L mailing list.</revremark>
412 <title>Video for Linux Two API Specification</title>
413 <subtitle>Revision 3.1</subtitle>
415 <chapter id="common">
419 <chapter id="pixfmt">
427 <chapter id="devices">
428 <title>Interfaces</title>
430 <section id="capture"> &sub-dev-capture; </section>
431 <section id="overlay"> &sub-dev-overlay; </section>
432 <section id="output"> &sub-dev-output; </section>
433 <section id="osd"> &sub-dev-osd; </section>
434 <section id="codec"> &sub-dev-codec; </section>
435 <section id="effect"> &sub-dev-effect; </section>
436 <section id="raw-vbi"> &sub-dev-raw-vbi; </section>
437 <section id="sliced"> &sub-dev-sliced-vbi; </section>
438 <section id="ttx"> &sub-dev-teletext; </section>
439 <section id="radio"> &sub-dev-radio; </section>
440 <section id="rds"> &sub-dev-rds; </section>
441 <section id="event"> &sub-dev-event; </section>
442 <section id="subdev"> &sub-dev-subdev; </section>
445 <chapter id="driver">
449 <chapter id="libv4l">
453 <chapter id="compat">
457 <appendix id="user-func">
458 <title>Function Reference</title>
460 <!-- Keep this alphabetically sorted. -->
464 <!-- All ioctls go here. -->
466 &sub-dbg-g-chip-ident;
472 &sub-enum-dv-presets;
474 &sub-enum-framesizes;
475 &sub-enum-frameintervals;
496 &sub-g-sliced-vbi-cap;
505 &sub-query-dv-preset;
510 &sub-subdev-enum-frame-interval;
511 &sub-subdev-enum-frame-size;
512 &sub-subdev-enum-mbus-code;
515 &sub-subdev-g-frame-interval;
516 &sub-subscribe-event;
517 <!-- End of ioctls. -->
527 <appendix id="videodev">
528 <title>Video For Linux Two Header File</title>
532 <appendix id="capture-example">
533 <title>Video Capture Example</title>
537 <appendix id="v4l2grab-example">
538 <title>Video Grabber example using libv4l</title>
539 <para>This program demonstrates how to grab V4L2 images in ppm format by
540 using libv4l handlers. The advantage is that this grabber can potentially work
541 with any V4L2 driver.</para>