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