blob: c3d699173c17699d530fd5692d38f48624e49697 [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>
Pawel Osciak53b5d572011-01-07 01:41:33 -0300131 <revnumber>2.6.38</revnumber>
Hans Verkuildb4d5682011-01-16 17:21:02 -0300132 <date>2011-01-16</date>
Pawel Osciak53b5d572011-01-07 01:41:33 -0300133 <authorinitials>po</authorinitials>
134 <revremark>Added the <link linkend="planar-apis">multi-planar API</link>.
135 </revremark>
136 </revision>
137
138 <revision>
Hans Verkuilf44026d2010-08-06 12:52:43 -0300139 <revnumber>2.6.37</revnumber>
140 <date>2010-08-06</date>
141 <authorinitials>hv</authorinitials>
142 <revremark>Removed obsolete vtx (videotext) API.</revremark>
143 </revision>
144
145 <revision>
Hans Verkuilb33f5f82009-12-03 01:32:12 -0300146 <revnumber>2.6.33</revnumber>
147 <date>2009-12-03</date>
148 <authorinitials>mk</authorinitials>
149 <revremark>Added documentation for the Digital Video timings API.</revremark>
150 </revision>
151
152 <revision>
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -0300153 <revnumber>2.6.32</revnumber>
154 <date>2009-08-31</date>
155 <authorinitials>mcc</authorinitials>
156 <revremark>Now, revisions will match the kernel version where
157the V4L2 API changes will be used by the Linux Kernel.
158Also added Remote Controller chapter.</revremark>
159 </revision>
160
161 <revision>
162 <revnumber>0.29</revnumber>
163 <date>2009-08-26</date>
164 <authorinitials>ev</authorinitials>
165 <revremark>Added documentation for string controls and for FM Transmitter controls.</revremark>
166 </revision>
167
168 <revision>
169 <revnumber>0.28</revnumber>
170 <date>2009-08-26</date>
171 <authorinitials>gl</authorinitials>
172 <revremark>Added V4L2_CID_BAND_STOP_FILTER documentation.</revremark>
173 </revision>
174
175 <revision>
176 <revnumber>0.27</revnumber>
177 <date>2009-08-15</date>
178 <authorinitials>mcc</authorinitials>
179 <revremark>Added libv4l and Remote Controller documentation;
180added v4l2grab and keytable application examples.</revremark>
181 </revision>
182
183 <revision>
184 <revnumber>0.26</revnumber>
185 <date>2009-07-23</date>
186 <authorinitials>hv</authorinitials>
187 <revremark>Finalized the RDS capture API. Added modulator and RDS encoder
188capabilities. Added support for string controls.</revremark>
189 </revision>
190
191 <revision>
192 <revnumber>0.25</revnumber>
193 <date>2009-01-18</date>
194 <authorinitials>hv</authorinitials>
195 <revremark>Added pixel formats VYUY, NV16 and NV61, and changed
196the debug ioctls VIDIOC_DBG_G/S_REGISTER and VIDIOC_DBG_G_CHIP_IDENT.
197Added camera controls V4L2_CID_ZOOM_ABSOLUTE, V4L2_CID_ZOOM_RELATIVE,
198V4L2_CID_ZOOM_CONTINUOUS and V4L2_CID_PRIVACY.</revremark>
199 </revision>
200
201 <revision>
202 <revnumber>0.24</revnumber>
203 <date>2008-03-04</date>
204 <authorinitials>mhs</authorinitials>
205 <revremark>Added pixel formats Y16 and SBGGR16, new controls
206and a camera controls class. Removed VIDIOC_G/S_MPEGCOMP.</revremark>
207 </revision>
208
209 <revision>
210 <revnumber>0.23</revnumber>
211 <date>2007-08-30</date>
212 <authorinitials>mhs</authorinitials>
213 <revremark>Fixed a typo in VIDIOC_DBG_G/S_REGISTER.
214Clarified the byte order of packed pixel formats.</revremark>
215 </revision>
216
217 <revision>
218 <revnumber>0.22</revnumber>
219 <date>2007-08-29</date>
220 <authorinitials>mhs</authorinitials>
221 <revremark>Added the Video Output Overlay interface, new MPEG
222controls, V4L2_FIELD_INTERLACED_TB and V4L2_FIELD_INTERLACED_BT,
223VIDIOC_DBG_G/S_REGISTER, VIDIOC_(TRY_)ENCODER_CMD,
224VIDIOC_G_CHIP_IDENT, VIDIOC_G_ENC_INDEX, new pixel formats.
225Clarifications in the cropping chapter, about RGB pixel formats, the
226mmap(), poll(), select(), read() and write() functions. Typographical
227fixes.</revremark>
228 </revision>
229
230 <revision>
231 <revnumber>0.21</revnumber>
232 <date>2006-12-19</date>
233 <authorinitials>mhs</authorinitials>
234 <revremark>Fixed a link in the VIDIOC_G_EXT_CTRLS section.</revremark>
235 </revision>
236
237 <revision>
238 <revnumber>0.20</revnumber>
239 <date>2006-11-24</date>
240 <authorinitials>mhs</authorinitials>
241 <revremark>Clarified the purpose of the audioset field in
242struct v4l2_input and v4l2_output.</revremark>
243 </revision>
244
245 <revision>
246 <revnumber>0.19</revnumber>
247 <date>2006-10-19</date>
248 <authorinitials>mhs</authorinitials>
249 <revremark>Documented V4L2_PIX_FMT_RGB444.</revremark>
250 </revision>
251
252 <revision>
253 <revnumber>0.18</revnumber>
254 <date>2006-10-18</date>
255 <authorinitials>mhs</authorinitials>
256 <revremark>Added the description of extended controls by Hans
257Verkuil. Linked V4L2_PIX_FMT_MPEG to V4L2_CID_MPEG_STREAM_TYPE.</revremark>
258 </revision>
259
260 <revision>
261 <revnumber>0.17</revnumber>
262 <date>2006-10-12</date>
263 <authorinitials>mhs</authorinitials>
264 <revremark>Corrected V4L2_PIX_FMT_HM12 description.</revremark>
265 </revision>
266
267 <revision>
268 <revnumber>0.16</revnumber>
269 <date>2006-10-08</date>
270 <authorinitials>mhs</authorinitials>
271 <revremark>VIDIOC_ENUM_FRAMESIZES and
272VIDIOC_ENUM_FRAMEINTERVALS are now part of the API.</revremark>
273 </revision>
274
275 <revision>
276 <revnumber>0.15</revnumber>
277 <date>2006-09-23</date>
278 <authorinitials>mhs</authorinitials>
279 <revremark>Cleaned up the bibliography, added BT.653 and
280BT.1119. capture.c/start_capturing() for user pointer I/O did not
281initialize the buffer index. Documented the V4L MPEG and MJPEG
282VID_TYPEs and V4L2_PIX_FMT_SBGGR8. Updated the list of reserved pixel
283formats. See the history chapter for API changes.</revremark>
284 </revision>
285
286 <revision>
287 <revnumber>0.14</revnumber>
288 <date>2006-09-14</date>
289 <authorinitials>mr</authorinitials>
290 <revremark>Added VIDIOC_ENUM_FRAMESIZES and
291VIDIOC_ENUM_FRAMEINTERVALS proposal for frame format enumeration of
292digital devices.</revremark>
293 </revision>
294
295 <revision>
296 <revnumber>0.13</revnumber>
297 <date>2006-04-07</date>
298 <authorinitials>mhs</authorinitials>
299 <revremark>Corrected the description of struct v4l2_window
300clips. New V4L2_STD_ and V4L2_TUNER_MODE_LANG1_LANG2
301defines.</revremark>
302 </revision>
303
304 <revision>
305 <revnumber>0.12</revnumber>
306 <date>2006-02-03</date>
307 <authorinitials>mhs</authorinitials>
308 <revremark>Corrected the description of struct
309v4l2_captureparm and v4l2_outputparm.</revremark>
310 </revision>
311
312 <revision>
313 <revnumber>0.11</revnumber>
314 <date>2006-01-27</date>
315 <authorinitials>mhs</authorinitials>
316 <revremark>Improved the description of struct
317v4l2_tuner.</revremark>
318 </revision>
319
320 <revision>
321 <revnumber>0.10</revnumber>
322 <date>2006-01-10</date>
323 <authorinitials>mhs</authorinitials>
324 <revremark>VIDIOC_G_INPUT and VIDIOC_S_PARM
325clarifications.</revremark>
326 </revision>
327
328 <revision>
329 <revnumber>0.9</revnumber>
330 <date>2005-11-27</date>
331 <authorinitials>mhs</authorinitials>
332 <revremark>Improved the 525 line numbering diagram. Hans
333Verkuil and I rewrote the sliced VBI section. He also contributed a
334VIDIOC_LOG_STATUS page. Fixed VIDIOC_S_STD call in the video standard
335selection example. Various updates.</revremark>
336 </revision>
337
338 <revision>
339 <revnumber>0.8</revnumber>
340 <date>2004-10-04</date>
341 <authorinitials>mhs</authorinitials>
342 <revremark>Somehow a piece of junk slipped into the capture
343example, removed.</revremark>
344 </revision>
345
346 <revision>
347 <revnumber>0.7</revnumber>
348 <date>2004-09-19</date>
349 <authorinitials>mhs</authorinitials>
350 <revremark>Fixed video standard selection, control
351enumeration, downscaling and aspect example. Added read and user
352pointer i/o to video capture example.</revremark>
353 </revision>
354
355 <revision>
356 <revnumber>0.6</revnumber>
357 <date>2004-08-01</date>
358 <authorinitials>mhs</authorinitials>
359 <revremark>v4l2_buffer changes, added video capture example,
360various corrections.</revremark>
361 </revision>
362
363 <revision>
364 <revnumber>0.5</revnumber>
365 <date>2003-11-05</date>
366 <authorinitials>mhs</authorinitials>
367 <revremark>Pixel format erratum.</revremark>
368 </revision>
369
370 <revision>
371 <revnumber>0.4</revnumber>
372 <date>2003-09-17</date>
373 <authorinitials>mhs</authorinitials>
374 <revremark>Corrected source and Makefile to generate a PDF.
375SGML fixes. Added latest API changes. Closed gaps in the history
376chapter.</revremark>
377 </revision>
378
379 <revision>
380 <revnumber>0.3</revnumber>
381 <date>2003-02-05</date>
382 <authorinitials>mhs</authorinitials>
383 <revremark>Another draft, more corrections.</revremark>
384 </revision>
385
386 <revision>
387 <revnumber>0.2</revnumber>
388 <date>2003-01-15</date>
389 <authorinitials>mhs</authorinitials>
390 <revremark>Second draft, with corrections pointed out by Gerd
391Knorr.</revremark>
392 </revision>
393
394 <revision>
395 <revnumber>0.1</revnumber>
396 <date>2002-12-01</date>
397 <authorinitials>mhs</authorinitials>
398 <revremark>First draft, based on documentation by Bill Dirks
399and discussions on the V4L mailing list.</revremark>
400 </revision>
401 </revhistory>
402</partinfo>
403
404<title>Video for Linux Two API Specification</title>
Hans Verkuilbda50bc2011-01-16 17:44:17 -0300405 <subtitle>Revision 2.6.38</subtitle>
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -0300406
407 <chapter id="common">
408 &sub-common;
409 </chapter>
410
411 <chapter id="pixfmt">
412 &sub-pixfmt;
413 </chapter>
414
415 <chapter id="io">
416 &sub-io;
417 </chapter>
418
419 <chapter id="devices">
420 <title>Interfaces</title>
421
422 <section id="capture"> &sub-dev-capture; </section>
423 <section id="overlay"> &sub-dev-overlay; </section>
424 <section id="output"> &sub-dev-output; </section>
425 <section id="osd"> &sub-dev-osd; </section>
426 <section id="codec"> &sub-dev-codec; </section>
427 <section id="effect"> &sub-dev-effect; </section>
428 <section id="raw-vbi"> &sub-dev-raw-vbi; </section>
429 <section id="sliced"> &sub-dev-sliced-vbi; </section>
430 <section id="ttx"> &sub-dev-teletext; </section>
431 <section id="radio"> &sub-dev-radio; </section>
432 <section id="rds"> &sub-dev-rds; </section>
Sakari Ailusdd966082010-03-27 10:58:24 -0300433 <section id="event"> &sub-dev-event; </section>
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -0300434 </chapter>
435
436 <chapter id="driver">
437 &sub-driver;
438 </chapter>
439
440 <chapter id="libv4l">
441 &sub-libv4l;
442 </chapter>
443
444 <chapter id="compat">
445 &sub-compat;
446 </chapter>
447
Mauro Carvalho Chehabdb17ab92009-09-17 01:44:22 -0300448 <appendix id="user-func">
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -0300449 <title>Function Reference</title>
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -0300450
451 <!-- Keep this alphabetically sorted. -->
452
453 &sub-close;
454 &sub-ioctl;
455 <!-- All ioctls go here. -->
456 &sub-cropcap;
457 &sub-dbg-g-chip-ident;
458 &sub-dbg-g-register;
Sakari Ailusdd966082010-03-27 10:58:24 -0300459 &sub-dqevent;
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -0300460 &sub-encoder-cmd;
461 &sub-enumaudio;
462 &sub-enumaudioout;
Muralidharan Karicheri007701e2009-12-03 01:13:17 -0300463 &sub-enum-dv-presets;
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -0300464 &sub-enum-fmt;
465 &sub-enum-framesizes;
466 &sub-enum-frameintervals;
467 &sub-enuminput;
468 &sub-enumoutput;
469 &sub-enumstd;
470 &sub-g-audio;
471 &sub-g-audioout;
472 &sub-g-crop;
473 &sub-g-ctrl;
Muralidharan Karicheri007701e2009-12-03 01:13:17 -0300474 &sub-g-dv-preset;
475 &sub-g-dv-timings;
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -0300476 &sub-g-enc-index;
477 &sub-g-ext-ctrls;
478 &sub-g-fbuf;
479 &sub-g-fmt;
480 &sub-g-frequency;
481 &sub-g-input;
482 &sub-g-jpegcomp;
483 &sub-g-modulator;
484 &sub-g-output;
485 &sub-g-parm;
486 &sub-g-priority;
487 &sub-g-sliced-vbi-cap;
488 &sub-g-std;
489 &sub-g-tuner;
490 &sub-log-status;
491 &sub-overlay;
492 &sub-qbuf;
493 &sub-querybuf;
494 &sub-querycap;
495 &sub-queryctrl;
Muralidharan Karicheri007701e2009-12-03 01:13:17 -0300496 &sub-query-dv-preset;
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -0300497 &sub-querystd;
498 &sub-reqbufs;
499 &sub-s-hw-freq-seek;
500 &sub-streamon;
Sakari Ailusdd966082010-03-27 10:58:24 -0300501 &sub-subscribe-event;
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -0300502 <!-- End of ioctls. -->
503 &sub-mmap;
504 &sub-munmap;
505 &sub-open;
506 &sub-poll;
507 &sub-read;
508 &sub-select;
509 &sub-write;
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -0300510 </appendix>
511
512 <appendix id="videodev">
513 <title>Video For Linux Two Header File</title>
514 &sub-videodev2-h;
515 </appendix>
516
517 <appendix id="capture-example">
518 <title>Video Capture Example</title>
519 &sub-capture-c;
520 </appendix>
521
522 <appendix id="v4l2grab-example">
523 <title>Video Grabber example using libv4l</title>
524 <para>This program demonstrates how to grab V4L2 images in ppm format by
525using libv4l handlers. The advantage is that this grabber can potentially work
526with any V4L2 driver.</para>
527 &sub-v4l2grab-c;
528 </appendix>
529
530 &sub-media-indices;
531
532 &sub-biblio;
533