blob: c5ee3982cff56205c1932de137ff443837999f37 [file] [log] [blame]
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -03001 <partinfo>
2 <authorgroup>
3 <author>
4 <firstname>Michael</firstname>
5 <surname>Schimek</surname>
6 <othername role="mi">H</othername>
7 <affiliation>
8 <address>
9 <email>mschimek@gmx.at</email>
10 </address>
11 </affiliation>
12 </author>
13
14 <author>
15 <firstname>Bill</firstname>
16 <surname>Dirks</surname>
17 <!-- Commented until Bill opts in to be spammed.
18 <affiliation>
19 <address>
20 <email>bill@thedirks.org</email>
21 </address>
22 </affiliation> -->
23 <contrib>Original author of the V4L2 API and
24documentation.</contrib>
25 </author>
26
27 <author>
28 <firstname>Hans</firstname>
29 <surname>Verkuil</surname>
30 <contrib>Designed and documented the VIDIOC_LOG_STATUS ioctl,
31the extended control ioctls and major parts of the sliced VBI
32API.</contrib>
33 <affiliation>
34 <address>
35 <email>hverkuil@xs4all.nl</email>
36 </address>
37 </affiliation>
38 </author>
39
40 <author>
41 <firstname>Martin</firstname>
42 <surname>Rubli</surname>
43 <!--
44 <affiliation>
45 <address>
46 <email>martin_rubli@logitech.com</email>
47 </address>
48 </affiliation> -->
49 <contrib>Designed and documented the VIDIOC_ENUM_FRAMESIZES
50and VIDIOC_ENUM_FRAMEINTERVALS ioctls.</contrib>
51 </author>
52
53 <author>
54 <firstname>Andy</firstname>
55 <surname>Walls</surname>
56 <contrib>Documented the fielded V4L2_MPEG_STREAM_VBI_FMT_IVTV
57MPEG stream embedded, sliced VBI data format in this specification.
58</contrib>
59 <affiliation>
60 <address>
Andy Walls6afdeaf2010-05-23 18:53:35 -030061 <email>awalls@md.metrocast.net</email>
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -030062 </address>
63 </affiliation>
64 </author>
65
66 <author>
67 <firstname>Mauro</firstname>
68 <surname>Carvalho Chehab</surname>
69 <contrib>Documented libv4l, designed and added v4l2grab example,
70Remote Controller chapter.</contrib>
71 <affiliation>
72 <address>
73 <email>mchehab@redhat.com</email>
74 </address>
75 </affiliation>
76 </author>
Hans Verkuilb33f5f82009-12-03 01:32:12 -030077
78 <author>
79 <firstname>Muralidharan</firstname>
80 <surname>Karicheri</surname>
81 <contrib>Documented the Digital Video timings API.</contrib>
82 <affiliation>
83 <address>
84 <email>m-karicheri2@ti.com</email>
85 </address>
86 </affiliation>
87 </author>
Pawel Osciak53b5d572011-01-07 01:41:33 -030088
89 <author>
90 <firstname>Pawel</firstname>
91 <surname>Osciak</surname>
92 <contrib>Designed and documented the multi-planar API.</contrib>
93 <affiliation>
94 <address>
95 <email>pawel AT osciak.com</email>
96 </address>
97 </affiliation>
98 </author>
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -030099 </authorgroup>
100
101 <copyright>
102 <year>1999</year>
103 <year>2000</year>
104 <year>2001</year>
105 <year>2002</year>
106 <year>2003</year>
107 <year>2004</year>
108 <year>2005</year>
109 <year>2006</year>
110 <year>2007</year>
111 <year>2008</year>
112 <year>2009</year>
Hans Verkuilf44026d2010-08-06 12:52:43 -0300113 <year>2010</year>
Hans Verkuilbda50bc2011-01-16 17:44:17 -0300114 <year>2011</year>
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -0300115 <holder>Bill Dirks, Michael H. Schimek, Hans Verkuil, Martin
Pawel Osciak53b5d572011-01-07 01:41:33 -0300116Rubli, Andy Walls, Muralidharan Karicheri, Mauro Carvalho Chehab,
117 Pawel Osciak</holder>
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -0300118 </copyright>
119 <legalnotice>
120 <para>Except when explicitly stated as GPL, programming examples within
121 this part can be used and distributed without restrictions.</para>
122 </legalnotice>
123 <revhistory>
124 <!-- Put document revisions here, newest first. -->
125 <!-- API revisions (changes and additions of defines, enums,
126structs, ioctls) must be noted in more detail in the history chapter
Hans Verkuilf44026d2010-08-06 12:52:43 -0300127(compat.xml), along with the possible impact on existing drivers and
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -0300128applications. -->
129
130 <revision>
Mauro Carvalho Chehabc20eb182011-06-25 14:11:52 -0300131 <revnumber>3.1</revnumber>
132 <date>2011-06-27</date>
133 <authorinitials>mcc, po</authorinitials>
134 <revremark>Documented that VIDIOC_QUERYCAP now returns a per-subsystem version instead of a per-driver one.</revremark>
135 </revision>
136 <revision>
Mauro Carvalho Chehab3822f182011-03-01 16:03:11 -0300137 <revnumber>2.6.39</revnumber>
138 <date>2011-03-01</date>
Pawel Osciakf0e3b642011-03-13 15:20:22 -0300139 <authorinitials>mcc, po</authorinitials>
140 <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>
Pawel Osciak53b5d572011-01-07 01:41:33 -0300141 </revision>
142
143 <revision>
Hans Verkuilf44026d2010-08-06 12:52:43 -0300144 <revnumber>2.6.37</revnumber>
145 <date>2010-08-06</date>
146 <authorinitials>hv</authorinitials>
147 <revremark>Removed obsolete vtx (videotext) API.</revremark>
148 </revision>
149
150 <revision>
Hans Verkuilb33f5f82009-12-03 01:32:12 -0300151 <revnumber>2.6.33</revnumber>
152 <date>2009-12-03</date>
153 <authorinitials>mk</authorinitials>
154 <revremark>Added documentation for the Digital Video timings API.</revremark>
155 </revision>
156
157 <revision>
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -0300158 <revnumber>2.6.32</revnumber>
159 <date>2009-08-31</date>
160 <authorinitials>mcc</authorinitials>
161 <revremark>Now, revisions will match the kernel version where
162the V4L2 API changes will be used by the Linux Kernel.
163Also added Remote Controller chapter.</revremark>
164 </revision>
165
166 <revision>
167 <revnumber>0.29</revnumber>
168 <date>2009-08-26</date>
169 <authorinitials>ev</authorinitials>
170 <revremark>Added documentation for string controls and for FM Transmitter controls.</revremark>
171 </revision>
172
173 <revision>
174 <revnumber>0.28</revnumber>
175 <date>2009-08-26</date>
176 <authorinitials>gl</authorinitials>
177 <revremark>Added V4L2_CID_BAND_STOP_FILTER documentation.</revremark>
178 </revision>
179
180 <revision>
181 <revnumber>0.27</revnumber>
182 <date>2009-08-15</date>
183 <authorinitials>mcc</authorinitials>
184 <revremark>Added libv4l and Remote Controller documentation;
185added v4l2grab and keytable application examples.</revremark>
186 </revision>
187
188 <revision>
189 <revnumber>0.26</revnumber>
190 <date>2009-07-23</date>
191 <authorinitials>hv</authorinitials>
192 <revremark>Finalized the RDS capture API. Added modulator and RDS encoder
193capabilities. Added support for string controls.</revremark>
194 </revision>
195
196 <revision>
197 <revnumber>0.25</revnumber>
198 <date>2009-01-18</date>
199 <authorinitials>hv</authorinitials>
200 <revremark>Added pixel formats VYUY, NV16 and NV61, and changed
201the debug ioctls VIDIOC_DBG_G/S_REGISTER and VIDIOC_DBG_G_CHIP_IDENT.
202Added camera controls V4L2_CID_ZOOM_ABSOLUTE, V4L2_CID_ZOOM_RELATIVE,
203V4L2_CID_ZOOM_CONTINUOUS and V4L2_CID_PRIVACY.</revremark>
204 </revision>
205
206 <revision>
207 <revnumber>0.24</revnumber>
208 <date>2008-03-04</date>
209 <authorinitials>mhs</authorinitials>
210 <revremark>Added pixel formats Y16 and SBGGR16, new controls
211and a camera controls class. Removed VIDIOC_G/S_MPEGCOMP.</revremark>
212 </revision>
213
214 <revision>
215 <revnumber>0.23</revnumber>
216 <date>2007-08-30</date>
217 <authorinitials>mhs</authorinitials>
218 <revremark>Fixed a typo in VIDIOC_DBG_G/S_REGISTER.
219Clarified the byte order of packed pixel formats.</revremark>
220 </revision>
221
222 <revision>
223 <revnumber>0.22</revnumber>
224 <date>2007-08-29</date>
225 <authorinitials>mhs</authorinitials>
226 <revremark>Added the Video Output Overlay interface, new MPEG
227controls, V4L2_FIELD_INTERLACED_TB and V4L2_FIELD_INTERLACED_BT,
228VIDIOC_DBG_G/S_REGISTER, VIDIOC_(TRY_)ENCODER_CMD,
229VIDIOC_G_CHIP_IDENT, VIDIOC_G_ENC_INDEX, new pixel formats.
230Clarifications in the cropping chapter, about RGB pixel formats, the
231mmap(), poll(), select(), read() and write() functions. Typographical
232fixes.</revremark>
233 </revision>
234
235 <revision>
236 <revnumber>0.21</revnumber>
237 <date>2006-12-19</date>
238 <authorinitials>mhs</authorinitials>
239 <revremark>Fixed a link in the VIDIOC_G_EXT_CTRLS section.</revremark>
240 </revision>
241
242 <revision>
243 <revnumber>0.20</revnumber>
244 <date>2006-11-24</date>
245 <authorinitials>mhs</authorinitials>
246 <revremark>Clarified the purpose of the audioset field in
247struct v4l2_input and v4l2_output.</revremark>
248 </revision>
249
250 <revision>
251 <revnumber>0.19</revnumber>
252 <date>2006-10-19</date>
253 <authorinitials>mhs</authorinitials>
254 <revremark>Documented V4L2_PIX_FMT_RGB444.</revremark>
255 </revision>
256
257 <revision>
258 <revnumber>0.18</revnumber>
259 <date>2006-10-18</date>
260 <authorinitials>mhs</authorinitials>
261 <revremark>Added the description of extended controls by Hans
262Verkuil. Linked V4L2_PIX_FMT_MPEG to V4L2_CID_MPEG_STREAM_TYPE.</revremark>
263 </revision>
264
265 <revision>
266 <revnumber>0.17</revnumber>
267 <date>2006-10-12</date>
268 <authorinitials>mhs</authorinitials>
269 <revremark>Corrected V4L2_PIX_FMT_HM12 description.</revremark>
270 </revision>
271
272 <revision>
273 <revnumber>0.16</revnumber>
274 <date>2006-10-08</date>
275 <authorinitials>mhs</authorinitials>
276 <revremark>VIDIOC_ENUM_FRAMESIZES and
277VIDIOC_ENUM_FRAMEINTERVALS are now part of the API.</revremark>
278 </revision>
279
280 <revision>
281 <revnumber>0.15</revnumber>
282 <date>2006-09-23</date>
283 <authorinitials>mhs</authorinitials>
284 <revremark>Cleaned up the bibliography, added BT.653 and
285BT.1119. capture.c/start_capturing() for user pointer I/O did not
286initialize the buffer index. Documented the V4L MPEG and MJPEG
287VID_TYPEs and V4L2_PIX_FMT_SBGGR8. Updated the list of reserved pixel
288formats. See the history chapter for API changes.</revremark>
289 </revision>
290
291 <revision>
292 <revnumber>0.14</revnumber>
293 <date>2006-09-14</date>
294 <authorinitials>mr</authorinitials>
295 <revremark>Added VIDIOC_ENUM_FRAMESIZES and
296VIDIOC_ENUM_FRAMEINTERVALS proposal for frame format enumeration of
297digital devices.</revremark>
298 </revision>
299
300 <revision>
301 <revnumber>0.13</revnumber>
302 <date>2006-04-07</date>
303 <authorinitials>mhs</authorinitials>
304 <revremark>Corrected the description of struct v4l2_window
305clips. New V4L2_STD_ and V4L2_TUNER_MODE_LANG1_LANG2
306defines.</revremark>
307 </revision>
308
309 <revision>
310 <revnumber>0.12</revnumber>
311 <date>2006-02-03</date>
312 <authorinitials>mhs</authorinitials>
313 <revremark>Corrected the description of struct
314v4l2_captureparm and v4l2_outputparm.</revremark>
315 </revision>
316
317 <revision>
318 <revnumber>0.11</revnumber>
319 <date>2006-01-27</date>
320 <authorinitials>mhs</authorinitials>
321 <revremark>Improved the description of struct
322v4l2_tuner.</revremark>
323 </revision>
324
325 <revision>
326 <revnumber>0.10</revnumber>
327 <date>2006-01-10</date>
328 <authorinitials>mhs</authorinitials>
329 <revremark>VIDIOC_G_INPUT and VIDIOC_S_PARM
330clarifications.</revremark>
331 </revision>
332
333 <revision>
334 <revnumber>0.9</revnumber>
335 <date>2005-11-27</date>
336 <authorinitials>mhs</authorinitials>
337 <revremark>Improved the 525 line numbering diagram. Hans
338Verkuil and I rewrote the sliced VBI section. He also contributed a
339VIDIOC_LOG_STATUS page. Fixed VIDIOC_S_STD call in the video standard
340selection example. Various updates.</revremark>
341 </revision>
342
343 <revision>
344 <revnumber>0.8</revnumber>
345 <date>2004-10-04</date>
346 <authorinitials>mhs</authorinitials>
347 <revremark>Somehow a piece of junk slipped into the capture
348example, removed.</revremark>
349 </revision>
350
351 <revision>
352 <revnumber>0.7</revnumber>
353 <date>2004-09-19</date>
354 <authorinitials>mhs</authorinitials>
355 <revremark>Fixed video standard selection, control
356enumeration, downscaling and aspect example. Added read and user
357pointer i/o to video capture example.</revremark>
358 </revision>
359
360 <revision>
361 <revnumber>0.6</revnumber>
362 <date>2004-08-01</date>
363 <authorinitials>mhs</authorinitials>
364 <revremark>v4l2_buffer changes, added video capture example,
365various corrections.</revremark>
366 </revision>
367
368 <revision>
369 <revnumber>0.5</revnumber>
370 <date>2003-11-05</date>
371 <authorinitials>mhs</authorinitials>
372 <revremark>Pixel format erratum.</revremark>
373 </revision>
374
375 <revision>
376 <revnumber>0.4</revnumber>
377 <date>2003-09-17</date>
378 <authorinitials>mhs</authorinitials>
379 <revremark>Corrected source and Makefile to generate a PDF.
380SGML fixes. Added latest API changes. Closed gaps in the history
381chapter.</revremark>
382 </revision>
383
384 <revision>
385 <revnumber>0.3</revnumber>
386 <date>2003-02-05</date>
387 <authorinitials>mhs</authorinitials>
388 <revremark>Another draft, more corrections.</revremark>
389 </revision>
390
391 <revision>
392 <revnumber>0.2</revnumber>
393 <date>2003-01-15</date>
394 <authorinitials>mhs</authorinitials>
395 <revremark>Second draft, with corrections pointed out by Gerd
396Knorr.</revremark>
397 </revision>
398
399 <revision>
400 <revnumber>0.1</revnumber>
401 <date>2002-12-01</date>
402 <authorinitials>mhs</authorinitials>
403 <revremark>First draft, based on documentation by Bill Dirks
404and discussions on the V4L mailing list.</revremark>
405 </revision>
406 </revhistory>
407</partinfo>
408
409<title>Video for Linux Two API Specification</title>
Hans Verkuil6e5b55f2011-03-11 16:25:23 -0300410 <subtitle>Revision 2.6.39</subtitle>
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -0300411
412 <chapter id="common">
413 &sub-common;
414 </chapter>
415
416 <chapter id="pixfmt">
417 &sub-pixfmt;
418 </chapter>
419
420 <chapter id="io">
421 &sub-io;
422 </chapter>
423
424 <chapter id="devices">
425 <title>Interfaces</title>
426
427 <section id="capture"> &sub-dev-capture; </section>
428 <section id="overlay"> &sub-dev-overlay; </section>
429 <section id="output"> &sub-dev-output; </section>
430 <section id="osd"> &sub-dev-osd; </section>
431 <section id="codec"> &sub-dev-codec; </section>
432 <section id="effect"> &sub-dev-effect; </section>
433 <section id="raw-vbi"> &sub-dev-raw-vbi; </section>
434 <section id="sliced"> &sub-dev-sliced-vbi; </section>
435 <section id="ttx"> &sub-dev-teletext; </section>
436 <section id="radio"> &sub-dev-radio; </section>
437 <section id="rds"> &sub-dev-rds; </section>
Sakari Ailusdd966082010-03-27 10:58:24 -0300438 <section id="event"> &sub-dev-event; </section>
Laurent Pinchart333c8b92010-03-15 20:26:04 -0300439 <section id="subdev"> &sub-dev-subdev; </section>
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -0300440 </chapter>
441
442 <chapter id="driver">
443 &sub-driver;
444 </chapter>
445
446 <chapter id="libv4l">
447 &sub-libv4l;
448 </chapter>
449
450 <chapter id="compat">
451 &sub-compat;
452 </chapter>
453
Mauro Carvalho Chehabdb17ab92009-09-17 01:44:22 -0300454 <appendix id="user-func">
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -0300455 <title>Function Reference</title>
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -0300456
457 <!-- Keep this alphabetically sorted. -->
458
459 &sub-close;
460 &sub-ioctl;
461 <!-- All ioctls go here. -->
462 &sub-cropcap;
463 &sub-dbg-g-chip-ident;
464 &sub-dbg-g-register;
Sakari Ailusdd966082010-03-27 10:58:24 -0300465 &sub-dqevent;
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -0300466 &sub-encoder-cmd;
467 &sub-enumaudio;
468 &sub-enumaudioout;
Muralidharan Karicheri007701e2009-12-03 01:13:17 -0300469 &sub-enum-dv-presets;
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -0300470 &sub-enum-fmt;
471 &sub-enum-framesizes;
472 &sub-enum-frameintervals;
473 &sub-enuminput;
474 &sub-enumoutput;
475 &sub-enumstd;
476 &sub-g-audio;
477 &sub-g-audioout;
478 &sub-g-crop;
479 &sub-g-ctrl;
Muralidharan Karicheri007701e2009-12-03 01:13:17 -0300480 &sub-g-dv-preset;
481 &sub-g-dv-timings;
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -0300482 &sub-g-enc-index;
483 &sub-g-ext-ctrls;
484 &sub-g-fbuf;
485 &sub-g-fmt;
486 &sub-g-frequency;
487 &sub-g-input;
488 &sub-g-jpegcomp;
489 &sub-g-modulator;
490 &sub-g-output;
491 &sub-g-parm;
492 &sub-g-priority;
493 &sub-g-sliced-vbi-cap;
494 &sub-g-std;
495 &sub-g-tuner;
496 &sub-log-status;
497 &sub-overlay;
498 &sub-qbuf;
499 &sub-querybuf;
500 &sub-querycap;
501 &sub-queryctrl;
Muralidharan Karicheri007701e2009-12-03 01:13:17 -0300502 &sub-query-dv-preset;
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -0300503 &sub-querystd;
504 &sub-reqbufs;
505 &sub-s-hw-freq-seek;
506 &sub-streamon;
Laurent Pinchart35c30172010-05-05 11:38:35 -0300507 &sub-subdev-enum-frame-interval;
Laurent Pinchart333c8b92010-03-15 20:26:04 -0300508 &sub-subdev-enum-frame-size;
509 &sub-subdev-enum-mbus-code;
Antti Koskipaaf6a5cb12010-06-23 05:03:42 -0300510 &sub-subdev-g-crop;
Laurent Pinchart333c8b92010-03-15 20:26:04 -0300511 &sub-subdev-g-fmt;
Laurent Pinchart35c30172010-05-05 11:38:35 -0300512 &sub-subdev-g-frame-interval;
Sakari Ailusdd966082010-03-27 10:58:24 -0300513 &sub-subscribe-event;
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -0300514 <!-- End of ioctls. -->
515 &sub-mmap;
516 &sub-munmap;
517 &sub-open;
518 &sub-poll;
519 &sub-read;
520 &sub-select;
521 &sub-write;
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -0300522 </appendix>
523
524 <appendix id="videodev">
525 <title>Video For Linux Two Header File</title>
526 &sub-videodev2-h;
527 </appendix>
528
529 <appendix id="capture-example">
530 <title>Video Capture Example</title>
531 &sub-capture-c;
532 </appendix>
533
534 <appendix id="v4l2grab-example">
535 <title>Video Grabber example using libv4l</title>
536 <para>This program demonstrates how to grab V4L2 images in ppm format by
537using libv4l handlers. The advantage is that this grabber can potentially work
538with any V4L2 driver.</para>
539 &sub-v4l2grab-c;
540 </appendix>
541
542 &sub-media-indices;
543
544 &sub-biblio;
545