]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blob - Documentation/DocBook/media/v4l/v4l2.xml
[media] DocBook media: update copyright years and Introduction
[mirror_ubuntu-bionic-kernel.git] / Documentation / DocBook / media / v4l / v4l2.xml
1 <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
24 documentation.</contrib>
25 </author>
26
27 <author>
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>
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
50 and 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
57 MPEG stream embedded, sliced VBI data format in this specification.
58 </contrib>
59 <affiliation>
60 <address>
61 <email>awalls@md.metrocast.net</email>
62 </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,
70 Remote Controller chapter.</contrib>
71 <affiliation>
72 <address>
73 <email>m.chehab@samsung.com</email>
74 </address>
75 </affiliation>
76 </author>
77
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>
88
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>
99
100 <author>
101 <firstname>Sakari</firstname>
102 <surname>Ailus</surname>
103 <contrib>Subdev selections API.</contrib>
104 <affiliation>
105 <address>
106 <email>sakari.ailus@iki.fi</email>
107 </address>
108 </affiliation>
109 </author>
110 </authorgroup>
111
112 <copyright>
113 <year>1999</year>
114 <year>2000</year>
115 <year>2001</year>
116 <year>2002</year>
117 <year>2003</year>
118 <year>2004</year>
119 <year>2005</year>
120 <year>2006</year>
121 <year>2007</year>
122 <year>2008</year>
123 <year>2009</year>
124 <year>2010</year>
125 <year>2011</year>
126 <year>2012</year>
127 <year>2013</year>
128 <year>2014</year>
129 <holder>Bill Dirks, Michael H. Schimek, Hans Verkuil, Martin
130 Rubli, Andy Walls, Muralidharan Karicheri, Mauro Carvalho Chehab,
131 Pawel Osciak</holder>
132 </copyright>
133 <legalnotice>
134 <para>Except when explicitly stated as GPL, programming examples within
135 this part can be used and distributed without restrictions.</para>
136 </legalnotice>
137 <revhistory>
138 <!-- Put document revisions here, newest first. -->
139 <!-- API revisions (changes and additions of defines, enums,
140 structs, ioctls) must be noted in more detail in the history chapter
141 (compat.xml), along with the possible impact on existing drivers and
142 applications. -->
143
144 <revision>
145 <revnumber>3.14</revnumber>
146 <date>2013-11-25</date>
147 <authorinitials>rr</authorinitials>
148 <revremark>Set width and height as unsigned on v4l2_rect.
149 </revremark>
150 </revision>
151
152 <revision>
153 <revnumber>3.11</revnumber>
154 <date>2013-05-26</date>
155 <authorinitials>hv</authorinitials>
156 <revremark>Remove obsolete VIDIOC_DBG_G_CHIP_IDENT ioctl.
157 </revremark>
158 </revision>
159
160 <revision>
161 <revnumber>3.10</revnumber>
162 <date>2013-03-25</date>
163 <authorinitials>hv</authorinitials>
164 <revremark>Remove obsolete and unused DV_PRESET ioctls:
165 VIDIOC_G_DV_PRESET, VIDIOC_S_DV_PRESET, VIDIOC_QUERY_DV_PRESET and
166 VIDIOC_ENUM_DV_PRESET. Remove the related v4l2_input/output capability
167 flags V4L2_IN_CAP_PRESETS and V4L2_OUT_CAP_PRESETS. Added VIDIOC_DBG_G_CHIP_INFO.
168 </revremark>
169 </revision>
170
171 <revision>
172 <revnumber>3.9</revnumber>
173 <date>2012-12-03</date>
174 <authorinitials>sa, sn</authorinitials>
175 <revremark>Added timestamp types to v4l2_buffer.
176 Added V4L2_EVENT_CTRL_CH_RANGE control event changes flag.
177 </revremark>
178 </revision>
179
180 <revision>
181 <revnumber>3.6</revnumber>
182 <date>2012-07-02</date>
183 <authorinitials>hv</authorinitials>
184 <revremark>Added VIDIOC_ENUM_FREQ_BANDS.
185 </revremark>
186 </revision>
187
188 <revision>
189 <revnumber>3.5</revnumber>
190 <date>2012-05-07</date>
191 <authorinitials>sa, sn, hv</authorinitials>
192 <revremark>Added V4L2_CTRL_TYPE_INTEGER_MENU and V4L2 subdev
193 selections API. Improved the description of V4L2_CID_COLORFX
194 control, added V4L2_CID_COLORFX_CBCR control.
195 Added camera controls V4L2_CID_AUTO_EXPOSURE_BIAS,
196 V4L2_CID_AUTO_N_PRESET_WHITE_BALANCE, V4L2_CID_IMAGE_STABILIZATION,
197 V4L2_CID_ISO_SENSITIVITY, V4L2_CID_ISO_SENSITIVITY_AUTO,
198 V4L2_CID_EXPOSURE_METERING, V4L2_CID_SCENE_MODE,
199 V4L2_CID_3A_LOCK, V4L2_CID_AUTO_FOCUS_START,
200 V4L2_CID_AUTO_FOCUS_STOP, V4L2_CID_AUTO_FOCUS_STATUS
201 and V4L2_CID_AUTO_FOCUS_RANGE.
202 Added VIDIOC_ENUM_DV_TIMINGS, VIDIOC_QUERY_DV_TIMINGS and
203 VIDIOC_DV_TIMINGS_CAP.
204 </revremark>
205 </revision>
206
207 <revision>
208 <revnumber>3.4</revnumber>
209 <date>2012-01-25</date>
210 <authorinitials>sn</authorinitials>
211 <revremark>Added <link linkend="jpeg-controls">JPEG compression
212 control class.</link>
213 </revremark>
214 </revision>
215
216 <revision>
217 <revnumber>3.3</revnumber>
218 <date>2012-01-11</date>
219 <authorinitials>hv</authorinitials>
220 <revremark>Added device_caps field to struct v4l2_capabilities.</revremark>
221 </revision>
222
223 <revision>
224 <revnumber>3.2</revnumber>
225 <date>2011-08-26</date>
226 <authorinitials>hv</authorinitials>
227 <revremark>Added V4L2_CTRL_FLAG_VOLATILE.</revremark>
228 </revision>
229
230 <revision>
231 <revnumber>3.1</revnumber>
232 <date>2011-06-27</date>
233 <authorinitials>mcc, po, hv</authorinitials>
234 <revremark>Documented that VIDIOC_QUERYCAP now returns a per-subsystem version instead of a per-driver one.
235 Standardize an error code for invalid ioctl.
236 Added V4L2_CTRL_TYPE_BITMASK.</revremark>
237 </revision>
238
239 <revision>
240 <revnumber>2.6.39</revnumber>
241 <date>2011-03-01</date>
242 <authorinitials>mcc, po</authorinitials>
243 <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>
244 </revision>
245
246 <revision>
247 <revnumber>2.6.37</revnumber>
248 <date>2010-08-06</date>
249 <authorinitials>hv</authorinitials>
250 <revremark>Removed obsolete vtx (videotext) API.</revremark>
251 </revision>
252
253 <revision>
254 <revnumber>2.6.33</revnumber>
255 <date>2009-12-03</date>
256 <authorinitials>mk</authorinitials>
257 <revremark>Added documentation for the Digital Video timings API.</revremark>
258 </revision>
259
260 <revision>
261 <revnumber>2.6.32</revnumber>
262 <date>2009-08-31</date>
263 <authorinitials>mcc</authorinitials>
264 <revremark>Now, revisions will match the kernel version where
265 the V4L2 API changes will be used by the Linux Kernel.
266 Also added Remote Controller chapter.</revremark>
267 </revision>
268
269 <revision>
270 <revnumber>0.29</revnumber>
271 <date>2009-08-26</date>
272 <authorinitials>ev</authorinitials>
273 <revremark>Added documentation for string controls and for FM Transmitter controls.</revremark>
274 </revision>
275
276 <revision>
277 <revnumber>0.28</revnumber>
278 <date>2009-08-26</date>
279 <authorinitials>gl</authorinitials>
280 <revremark>Added V4L2_CID_BAND_STOP_FILTER documentation.</revremark>
281 </revision>
282
283 <revision>
284 <revnumber>0.27</revnumber>
285 <date>2009-08-15</date>
286 <authorinitials>mcc</authorinitials>
287 <revremark>Added libv4l and Remote Controller documentation;
288 added v4l2grab and keytable application examples.</revremark>
289 </revision>
290
291 <revision>
292 <revnumber>0.26</revnumber>
293 <date>2009-07-23</date>
294 <authorinitials>hv</authorinitials>
295 <revremark>Finalized the RDS capture API. Added modulator and RDS encoder
296 capabilities. Added support for string controls.</revremark>
297 </revision>
298
299 <revision>
300 <revnumber>0.25</revnumber>
301 <date>2009-01-18</date>
302 <authorinitials>hv</authorinitials>
303 <revremark>Added pixel formats VYUY, NV16 and NV61, and changed
304 the debug ioctls VIDIOC_DBG_G/S_REGISTER and VIDIOC_DBG_G_CHIP_IDENT.
305 Added camera controls V4L2_CID_ZOOM_ABSOLUTE, V4L2_CID_ZOOM_RELATIVE,
306 V4L2_CID_ZOOM_CONTINUOUS and V4L2_CID_PRIVACY.</revremark>
307 </revision>
308
309 <revision>
310 <revnumber>0.24</revnumber>
311 <date>2008-03-04</date>
312 <authorinitials>mhs</authorinitials>
313 <revremark>Added pixel formats Y16 and SBGGR16, new controls
314 and a camera controls class. Removed VIDIOC_G/S_MPEGCOMP.</revremark>
315 </revision>
316
317 <revision>
318 <revnumber>0.23</revnumber>
319 <date>2007-08-30</date>
320 <authorinitials>mhs</authorinitials>
321 <revremark>Fixed a typo in VIDIOC_DBG_G/S_REGISTER.
322 Clarified the byte order of packed pixel formats.</revremark>
323 </revision>
324
325 <revision>
326 <revnumber>0.22</revnumber>
327 <date>2007-08-29</date>
328 <authorinitials>mhs</authorinitials>
329 <revremark>Added the Video Output Overlay interface, new MPEG
330 controls, V4L2_FIELD_INTERLACED_TB and V4L2_FIELD_INTERLACED_BT,
331 VIDIOC_DBG_G/S_REGISTER, VIDIOC_(TRY_)ENCODER_CMD,
332 VIDIOC_G_CHIP_IDENT, VIDIOC_G_ENC_INDEX, new pixel formats.
333 Clarifications in the cropping chapter, about RGB pixel formats, the
334 mmap(), poll(), select(), read() and write() functions. Typographical
335 fixes.</revremark>
336 </revision>
337
338 <revision>
339 <revnumber>0.21</revnumber>
340 <date>2006-12-19</date>
341 <authorinitials>mhs</authorinitials>
342 <revremark>Fixed a link in the VIDIOC_G_EXT_CTRLS section.</revremark>
343 </revision>
344
345 <revision>
346 <revnumber>0.20</revnumber>
347 <date>2006-11-24</date>
348 <authorinitials>mhs</authorinitials>
349 <revremark>Clarified the purpose of the audioset field in
350 struct v4l2_input and v4l2_output.</revremark>
351 </revision>
352
353 <revision>
354 <revnumber>0.19</revnumber>
355 <date>2006-10-19</date>
356 <authorinitials>mhs</authorinitials>
357 <revremark>Documented V4L2_PIX_FMT_RGB444.</revremark>
358 </revision>
359
360 <revision>
361 <revnumber>0.18</revnumber>
362 <date>2006-10-18</date>
363 <authorinitials>mhs</authorinitials>
364 <revremark>Added the description of extended controls by Hans
365 Verkuil. Linked V4L2_PIX_FMT_MPEG to V4L2_CID_MPEG_STREAM_TYPE.</revremark>
366 </revision>
367
368 <revision>
369 <revnumber>0.17</revnumber>
370 <date>2006-10-12</date>
371 <authorinitials>mhs</authorinitials>
372 <revremark>Corrected V4L2_PIX_FMT_HM12 description.</revremark>
373 </revision>
374
375 <revision>
376 <revnumber>0.16</revnumber>
377 <date>2006-10-08</date>
378 <authorinitials>mhs</authorinitials>
379 <revremark>VIDIOC_ENUM_FRAMESIZES and
380 VIDIOC_ENUM_FRAMEINTERVALS are now part of the API.</revremark>
381 </revision>
382
383 <revision>
384 <revnumber>0.15</revnumber>
385 <date>2006-09-23</date>
386 <authorinitials>mhs</authorinitials>
387 <revremark>Cleaned up the bibliography, added BT.653 and
388 BT.1119. capture.c/start_capturing() for user pointer I/O did not
389 initialize the buffer index. Documented the V4L MPEG and MJPEG
390 VID_TYPEs and V4L2_PIX_FMT_SBGGR8. Updated the list of reserved pixel
391 formats. See the history chapter for API changes.</revremark>
392 </revision>
393
394 <revision>
395 <revnumber>0.14</revnumber>
396 <date>2006-09-14</date>
397 <authorinitials>mr</authorinitials>
398 <revremark>Added VIDIOC_ENUM_FRAMESIZES and
399 VIDIOC_ENUM_FRAMEINTERVALS proposal for frame format enumeration of
400 digital devices.</revremark>
401 </revision>
402
403 <revision>
404 <revnumber>0.13</revnumber>
405 <date>2006-04-07</date>
406 <authorinitials>mhs</authorinitials>
407 <revremark>Corrected the description of struct v4l2_window
408 clips. New V4L2_STD_ and V4L2_TUNER_MODE_LANG1_LANG2
409 defines.</revremark>
410 </revision>
411
412 <revision>
413 <revnumber>0.12</revnumber>
414 <date>2006-02-03</date>
415 <authorinitials>mhs</authorinitials>
416 <revremark>Corrected the description of struct
417 v4l2_captureparm and v4l2_outputparm.</revremark>
418 </revision>
419
420 <revision>
421 <revnumber>0.11</revnumber>
422 <date>2006-01-27</date>
423 <authorinitials>mhs</authorinitials>
424 <revremark>Improved the description of struct
425 v4l2_tuner.</revremark>
426 </revision>
427
428 <revision>
429 <revnumber>0.10</revnumber>
430 <date>2006-01-10</date>
431 <authorinitials>mhs</authorinitials>
432 <revremark>VIDIOC_G_INPUT and VIDIOC_S_PARM
433 clarifications.</revremark>
434 </revision>
435
436 <revision>
437 <revnumber>0.9</revnumber>
438 <date>2005-11-27</date>
439 <authorinitials>mhs</authorinitials>
440 <revremark>Improved the 525 line numbering diagram. Hans
441 Verkuil and I rewrote the sliced VBI section. He also contributed a
442 VIDIOC_LOG_STATUS page. Fixed VIDIOC_S_STD call in the video standard
443 selection example. Various updates.</revremark>
444 </revision>
445
446 <revision>
447 <revnumber>0.8</revnumber>
448 <date>2004-10-04</date>
449 <authorinitials>mhs</authorinitials>
450 <revremark>Somehow a piece of junk slipped into the capture
451 example, removed.</revremark>
452 </revision>
453
454 <revision>
455 <revnumber>0.7</revnumber>
456 <date>2004-09-19</date>
457 <authorinitials>mhs</authorinitials>
458 <revremark>Fixed video standard selection, control
459 enumeration, downscaling and aspect example. Added read and user
460 pointer i/o to video capture example.</revremark>
461 </revision>
462
463 <revision>
464 <revnumber>0.6</revnumber>
465 <date>2004-08-01</date>
466 <authorinitials>mhs</authorinitials>
467 <revremark>v4l2_buffer changes, added video capture example,
468 various corrections.</revremark>
469 </revision>
470
471 <revision>
472 <revnumber>0.5</revnumber>
473 <date>2003-11-05</date>
474 <authorinitials>mhs</authorinitials>
475 <revremark>Pixel format erratum.</revremark>
476 </revision>
477
478 <revision>
479 <revnumber>0.4</revnumber>
480 <date>2003-09-17</date>
481 <authorinitials>mhs</authorinitials>
482 <revremark>Corrected source and Makefile to generate a PDF.
483 SGML fixes. Added latest API changes. Closed gaps in the history
484 chapter.</revremark>
485 </revision>
486
487 <revision>
488 <revnumber>0.3</revnumber>
489 <date>2003-02-05</date>
490 <authorinitials>mhs</authorinitials>
491 <revremark>Another draft, more corrections.</revremark>
492 </revision>
493
494 <revision>
495 <revnumber>0.2</revnumber>
496 <date>2003-01-15</date>
497 <authorinitials>mhs</authorinitials>
498 <revremark>Second draft, with corrections pointed out by Gerd
499 Knorr.</revremark>
500 </revision>
501
502 <revision>
503 <revnumber>0.1</revnumber>
504 <date>2002-12-01</date>
505 <authorinitials>mhs</authorinitials>
506 <revremark>First draft, based on documentation by Bill Dirks
507 and discussions on the V4L mailing list.</revremark>
508 </revision>
509 </revhistory>
510 </partinfo>
511
512 <title>Video for Linux Two API Specification</title>
513 <subtitle>Revision 3.14</subtitle>
514
515 <chapter id="common">
516 &sub-common;
517 </chapter>
518
519 <chapter id="pixfmt">
520 &sub-pixfmt;
521 </chapter>
522
523 <chapter id="io">
524 &sub-io;
525 </chapter>
526
527 <chapter id="devices">
528 <title>Interfaces</title>
529
530 <section id="capture"> &sub-dev-capture; </section>
531 <section id="overlay"> &sub-dev-overlay; </section>
532 <section id="output"> &sub-dev-output; </section>
533 <section id="osd"> &sub-dev-osd; </section>
534 <section id="codec"> &sub-dev-codec; </section>
535 <section id="effect"> &sub-dev-effect; </section>
536 <section id="raw-vbi"> &sub-dev-raw-vbi; </section>
537 <section id="sliced"> &sub-dev-sliced-vbi; </section>
538 <section id="ttx"> &sub-dev-teletext; </section>
539 <section id="radio"> &sub-dev-radio; </section>
540 <section id="rds"> &sub-dev-rds; </section>
541 <section id="event"> &sub-dev-event; </section>
542 <section id="subdev"> &sub-dev-subdev; </section>
543 </chapter>
544
545 <chapter id="driver">
546 &sub-driver;
547 </chapter>
548
549 <chapter id="libv4l">
550 &sub-libv4l;
551 </chapter>
552
553 <chapter id="compat">
554 &sub-compat;
555 </chapter>
556
557 <appendix id="user-func">
558 <title>Function Reference</title>
559
560 <!-- Keep this alphabetically sorted. -->
561
562 &sub-close;
563 &sub-ioctl;
564 <!-- All ioctls go here. -->
565 &sub-create-bufs;
566 &sub-cropcap;
567 &sub-dbg-g-chip-info;
568 &sub-dbg-g-register;
569 &sub-decoder-cmd;
570 &sub-dqevent;
571 &sub-dv-timings-cap;
572 &sub-encoder-cmd;
573 &sub-enumaudio;
574 &sub-enumaudioout;
575 &sub-enum-dv-timings;
576 &sub-enum-fmt;
577 &sub-enum-framesizes;
578 &sub-enum-frameintervals;
579 &sub-enum-freq-bands;
580 &sub-enuminput;
581 &sub-enumoutput;
582 &sub-enumstd;
583 &sub-expbuf;
584 &sub-g-audio;
585 &sub-g-audioout;
586 &sub-g-crop;
587 &sub-g-ctrl;
588 &sub-g-dv-timings;
589 &sub-g-enc-index;
590 &sub-g-ext-ctrls;
591 &sub-g-fbuf;
592 &sub-g-fmt;
593 &sub-g-frequency;
594 &sub-g-input;
595 &sub-g-jpegcomp;
596 &sub-g-modulator;
597 &sub-g-output;
598 &sub-g-parm;
599 &sub-g-priority;
600 &sub-g-selection;
601 &sub-g-sliced-vbi-cap;
602 &sub-g-std;
603 &sub-g-tuner;
604 &sub-log-status;
605 &sub-overlay;
606 &sub-prepare-buf;
607 &sub-qbuf;
608 &sub-querybuf;
609 &sub-querycap;
610 &sub-queryctrl;
611 &sub-query-dv-timings;
612 &sub-querystd;
613 &sub-reqbufs;
614 &sub-s-hw-freq-seek;
615 &sub-streamon;
616 &sub-subdev-enum-frame-interval;
617 &sub-subdev-enum-frame-size;
618 &sub-subdev-enum-mbus-code;
619 &sub-subdev-g-crop;
620 &sub-subdev-g-edid;
621 &sub-subdev-g-fmt;
622 &sub-subdev-g-frame-interval;
623 &sub-subdev-g-selection;
624 &sub-subscribe-event;
625 <!-- End of ioctls. -->
626 &sub-mmap;
627 &sub-munmap;
628 &sub-open;
629 &sub-poll;
630 &sub-read;
631 &sub-select;
632 &sub-write;
633 </appendix>
634
635 <appendix>
636 <title>Common definitions for V4L2 and V4L2 subdev interfaces</title>
637 &sub-selections-common;
638 </appendix>
639
640 <appendix id="videodev">
641 <title>Video For Linux Two Header File</title>
642 &sub-videodev2-h;
643 </appendix>
644
645 <appendix id="capture-example">
646 <title>Video Capture Example</title>
647 &sub-capture-c;
648 </appendix>
649
650 <appendix id="v4l2grab-example">
651 <title>Video Grabber example using libv4l</title>
652 <para>This program demonstrates how to grab V4L2 images in ppm format by
653 using libv4l handlers. The advantage is that this grabber can potentially work
654 with any V4L2 driver.</para>
655 &sub-v4l2grab-c;
656 </appendix>
657
658 &sub-media-indices;
659
660 &sub-biblio;
661