blob: a436716ef3bcf45181149132ae10d401a72d3922 [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 Chehab3822f182011-03-01 16:03:11 -0300131 <revnumber>2.6.39</revnumber>
132 <date>2011-03-01</date>
133 <authorinitials>mcc</authorinitials>
134 <revremark>Removed VIDIOC_*_OLD from videodev2.h header and update it to reflect latest changes.
135 </revremark>
136 </revision>
137
138 <revision>
Pawel Osciak53b5d572011-01-07 01:41:33 -0300139 <revnumber>2.6.38</revnumber>
Hans Verkuildb4d5682011-01-16 17:21:02 -0300140 <date>2011-01-16</date>
Pawel Osciak53b5d572011-01-07 01:41:33 -0300141 <authorinitials>po</authorinitials>
142 <revremark>Added the <link linkend="planar-apis">multi-planar API</link>.
143 </revremark>
144 </revision>
145
146 <revision>
Hans Verkuilf44026d2010-08-06 12:52:43 -0300147 <revnumber>2.6.37</revnumber>
148 <date>2010-08-06</date>
149 <authorinitials>hv</authorinitials>
150 <revremark>Removed obsolete vtx (videotext) API.</revremark>
151 </revision>
152
153 <revision>
Hans Verkuilb33f5f82009-12-03 01:32:12 -0300154 <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>
158 </revision>
159
160 <revision>
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -0300161 <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
165the V4L2 API changes will be used by the Linux Kernel.
166Also added Remote Controller chapter.</revremark>
167 </revision>
168
169 <revision>
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>
174 </revision>
175
176 <revision>
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>
181 </revision>
182
183 <revision>
184 <revnumber>0.27</revnumber>
185 <date>2009-08-15</date>
186 <authorinitials>mcc</authorinitials>
187 <revremark>Added libv4l and Remote Controller documentation;
188added v4l2grab and keytable application examples.</revremark>
189 </revision>
190
191 <revision>
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
196capabilities. Added support for string controls.</revremark>
197 </revision>
198
199 <revision>
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
204the debug ioctls VIDIOC_DBG_G/S_REGISTER and VIDIOC_DBG_G_CHIP_IDENT.
205Added camera controls V4L2_CID_ZOOM_ABSOLUTE, V4L2_CID_ZOOM_RELATIVE,
206V4L2_CID_ZOOM_CONTINUOUS and V4L2_CID_PRIVACY.</revremark>
207 </revision>
208
209 <revision>
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
214and a camera controls class. Removed VIDIOC_G/S_MPEGCOMP.</revremark>
215 </revision>
216
217 <revision>
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.
222Clarified the byte order of packed pixel formats.</revremark>
223 </revision>
224
225 <revision>
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
230controls, V4L2_FIELD_INTERLACED_TB and V4L2_FIELD_INTERLACED_BT,
231VIDIOC_DBG_G/S_REGISTER, VIDIOC_(TRY_)ENCODER_CMD,
232VIDIOC_G_CHIP_IDENT, VIDIOC_G_ENC_INDEX, new pixel formats.
233Clarifications in the cropping chapter, about RGB pixel formats, the
234mmap(), poll(), select(), read() and write() functions. Typographical
235fixes.</revremark>
236 </revision>
237
238 <revision>
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>
243 </revision>
244
245 <revision>
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
250struct v4l2_input and v4l2_output.</revremark>
251 </revision>
252
253 <revision>
254 <revnumber>0.19</revnumber>
255 <date>2006-10-19</date>
256 <authorinitials>mhs</authorinitials>
257 <revremark>Documented V4L2_PIX_FMT_RGB444.</revremark>
258 </revision>
259
260 <revision>
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
265Verkuil. Linked V4L2_PIX_FMT_MPEG to V4L2_CID_MPEG_STREAM_TYPE.</revremark>
266 </revision>
267
268 <revision>
269 <revnumber>0.17</revnumber>
270 <date>2006-10-12</date>
271 <authorinitials>mhs</authorinitials>
272 <revremark>Corrected V4L2_PIX_FMT_HM12 description.</revremark>
273 </revision>
274
275 <revision>
276 <revnumber>0.16</revnumber>
277 <date>2006-10-08</date>
278 <authorinitials>mhs</authorinitials>
279 <revremark>VIDIOC_ENUM_FRAMESIZES and
280VIDIOC_ENUM_FRAMEINTERVALS are now part of the API.</revremark>
281 </revision>
282
283 <revision>
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
288BT.1119. capture.c/start_capturing() for user pointer I/O did not
289initialize the buffer index. Documented the V4L MPEG and MJPEG
290VID_TYPEs and V4L2_PIX_FMT_SBGGR8. Updated the list of reserved pixel
291formats. See the history chapter for API changes.</revremark>
292 </revision>
293
294 <revision>
295 <revnumber>0.14</revnumber>
296 <date>2006-09-14</date>
297 <authorinitials>mr</authorinitials>
298 <revremark>Added VIDIOC_ENUM_FRAMESIZES and
299VIDIOC_ENUM_FRAMEINTERVALS proposal for frame format enumeration of
300digital devices.</revremark>
301 </revision>
302
303 <revision>
304 <revnumber>0.13</revnumber>
305 <date>2006-04-07</date>
306 <authorinitials>mhs</authorinitials>
307 <revremark>Corrected the description of struct v4l2_window
308clips. New V4L2_STD_ and V4L2_TUNER_MODE_LANG1_LANG2
309defines.</revremark>
310 </revision>
311
312 <revision>
313 <revnumber>0.12</revnumber>
314 <date>2006-02-03</date>
315 <authorinitials>mhs</authorinitials>
316 <revremark>Corrected the description of struct
317v4l2_captureparm and v4l2_outputparm.</revremark>
318 </revision>
319
320 <revision>
321 <revnumber>0.11</revnumber>
322 <date>2006-01-27</date>
323 <authorinitials>mhs</authorinitials>
324 <revremark>Improved the description of struct
325v4l2_tuner.</revremark>
326 </revision>
327
328 <revision>
329 <revnumber>0.10</revnumber>
330 <date>2006-01-10</date>
331 <authorinitials>mhs</authorinitials>
332 <revremark>VIDIOC_G_INPUT and VIDIOC_S_PARM
333clarifications.</revremark>
334 </revision>
335
336 <revision>
337 <revnumber>0.9</revnumber>
338 <date>2005-11-27</date>
339 <authorinitials>mhs</authorinitials>
340 <revremark>Improved the 525 line numbering diagram. Hans
341Verkuil and I rewrote the sliced VBI section. He also contributed a
342VIDIOC_LOG_STATUS page. Fixed VIDIOC_S_STD call in the video standard
343selection example. Various updates.</revremark>
344 </revision>
345
346 <revision>
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
351example, removed.</revremark>
352 </revision>
353
354 <revision>
355 <revnumber>0.7</revnumber>
356 <date>2004-09-19</date>
357 <authorinitials>mhs</authorinitials>
358 <revremark>Fixed video standard selection, control
359enumeration, downscaling and aspect example. Added read and user
360pointer i/o to video capture example.</revremark>
361 </revision>
362
363 <revision>
364 <revnumber>0.6</revnumber>
365 <date>2004-08-01</date>
366 <authorinitials>mhs</authorinitials>
367 <revremark>v4l2_buffer changes, added video capture example,
368various corrections.</revremark>
369 </revision>
370
371 <revision>
372 <revnumber>0.5</revnumber>
373 <date>2003-11-05</date>
374 <authorinitials>mhs</authorinitials>
375 <revremark>Pixel format erratum.</revremark>
376 </revision>
377
378 <revision>
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.
383SGML fixes. Added latest API changes. Closed gaps in the history
384chapter.</revremark>
385 </revision>
386
387 <revision>
388 <revnumber>0.3</revnumber>
389 <date>2003-02-05</date>
390 <authorinitials>mhs</authorinitials>
391 <revremark>Another draft, more corrections.</revremark>
392 </revision>
393
394 <revision>
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
399Knorr.</revremark>
400 </revision>
401
402 <revision>
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
407and discussions on the V4L mailing list.</revremark>
408 </revision>
409 </revhistory>
410</partinfo>
411
412<title>Video for Linux Two API Specification</title>
Hans Verkuilbda50bc2011-01-16 17:44:17 -0300413 <subtitle>Revision 2.6.38</subtitle>
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -0300414
415 <chapter id="common">
416 &sub-common;
417 </chapter>
418
419 <chapter id="pixfmt">
420 &sub-pixfmt;
421 </chapter>
422
423 <chapter id="io">
424 &sub-io;
425 </chapter>
426
427 <chapter id="devices">
428 <title>Interfaces</title>
429
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>
Sakari Ailusdd966082010-03-27 10:58:24 -0300441 <section id="event"> &sub-dev-event; </section>
Laurent Pinchart333c8b92010-03-15 20:26:04 -0300442 <section id="subdev"> &sub-dev-subdev; </section>
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -0300443 </chapter>
444
445 <chapter id="driver">
446 &sub-driver;
447 </chapter>
448
449 <chapter id="libv4l">
450 &sub-libv4l;
451 </chapter>
452
453 <chapter id="compat">
454 &sub-compat;
455 </chapter>
456
Mauro Carvalho Chehabdb17ab92009-09-17 01:44:22 -0300457 <appendix id="user-func">
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -0300458 <title>Function Reference</title>
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -0300459
460 <!-- Keep this alphabetically sorted. -->
461
462 &sub-close;
463 &sub-ioctl;
464 <!-- All ioctls go here. -->
465 &sub-cropcap;
466 &sub-dbg-g-chip-ident;
467 &sub-dbg-g-register;
Sakari Ailusdd966082010-03-27 10:58:24 -0300468 &sub-dqevent;
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -0300469 &sub-encoder-cmd;
470 &sub-enumaudio;
471 &sub-enumaudioout;
Muralidharan Karicheri007701e2009-12-03 01:13:17 -0300472 &sub-enum-dv-presets;
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -0300473 &sub-enum-fmt;
474 &sub-enum-framesizes;
475 &sub-enum-frameintervals;
476 &sub-enuminput;
477 &sub-enumoutput;
478 &sub-enumstd;
479 &sub-g-audio;
480 &sub-g-audioout;
481 &sub-g-crop;
482 &sub-g-ctrl;
Muralidharan Karicheri007701e2009-12-03 01:13:17 -0300483 &sub-g-dv-preset;
484 &sub-g-dv-timings;
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -0300485 &sub-g-enc-index;
486 &sub-g-ext-ctrls;
487 &sub-g-fbuf;
488 &sub-g-fmt;
489 &sub-g-frequency;
490 &sub-g-input;
491 &sub-g-jpegcomp;
492 &sub-g-modulator;
493 &sub-g-output;
494 &sub-g-parm;
495 &sub-g-priority;
496 &sub-g-sliced-vbi-cap;
497 &sub-g-std;
498 &sub-g-tuner;
499 &sub-log-status;
500 &sub-overlay;
501 &sub-qbuf;
502 &sub-querybuf;
503 &sub-querycap;
504 &sub-queryctrl;
Muralidharan Karicheri007701e2009-12-03 01:13:17 -0300505 &sub-query-dv-preset;
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -0300506 &sub-querystd;
507 &sub-reqbufs;
508 &sub-s-hw-freq-seek;
509 &sub-streamon;
Laurent Pinchart35c30172010-05-05 11:38:35 -0300510 &sub-subdev-enum-frame-interval;
Laurent Pinchart333c8b92010-03-15 20:26:04 -0300511 &sub-subdev-enum-frame-size;
512 &sub-subdev-enum-mbus-code;
513 &sub-subdev-g-fmt;
Laurent Pinchart35c30172010-05-05 11:38:35 -0300514 &sub-subdev-g-frame-interval;
Sakari Ailusdd966082010-03-27 10:58:24 -0300515 &sub-subscribe-event;
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -0300516 <!-- End of ioctls. -->
517 &sub-mmap;
518 &sub-munmap;
519 &sub-open;
520 &sub-poll;
521 &sub-read;
522 &sub-select;
523 &sub-write;
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -0300524 </appendix>
525
526 <appendix id="videodev">
527 <title>Video For Linux Two Header File</title>
528 &sub-videodev2-h;
529 </appendix>
530
531 <appendix id="capture-example">
532 <title>Video Capture Example</title>
533 &sub-capture-c;
534 </appendix>
535
536 <appendix id="v4l2grab-example">
537 <title>Video Grabber example using libv4l</title>
538 <para>This program demonstrates how to grab V4L2 images in ppm format by
539using libv4l handlers. The advantage is that this grabber can potentially work
540with any V4L2 driver.</para>
541 &sub-v4l2grab-c;
542 </appendix>
543
544 &sub-media-indices;
545
546 &sub-biblio;
547