• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd">
2<HTML
3><HEAD
4><TITLE
5>Video for Linux Two API Specification</TITLE
6><META
7NAME="GENERATOR"
8CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK
9REL="NEXT"
10TITLE="Introduction"
11HREF="f163.htm"></HEAD
12><BODY
13CLASS="BOOK"
14BGCOLOR="#FFFFFF"
15TEXT="#000000"
16LINK="#0000FF"
17VLINK="#840084"
18ALINK="#0000FF"
19><DIV
20CLASS="BOOK"
21><A
22NAME="V4L2SPEC"
23></A
24><DIV
25CLASS="TITLEPAGE"
26><H1
27CLASS="TITLE"
28><A
29NAME="AEN2"
30>Video for Linux Two API Specification</A
31></H1
32><H2
33CLASS="SUBTITLE"
34>Revision 0.24</H2
35><H3
36CLASS="AUTHOR"
37><A
38NAME="AEN6"
39></A
40>Michael H Schimek</H3
41><DIV
42CLASS="AFFILIATION"
43><DIV
44CLASS="ADDRESS"
45><P
46CLASS="ADDRESS"
47>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<CODE
48CLASS="EMAIL"
49>&#60;<A
50HREF="mailto:mschimek@gmx.at"
51>mschimek@gmx.at</A
52>&#62;</CODE
53><br>
54&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</P
55></DIV
56></DIV
57><H3
58CLASS="AUTHOR"
59><A
60NAME="AEN13"
61></A
62>Bill Dirks</H3
63><H3
64CLASS="AUTHOR"
65><A
66NAME="AEN17"
67></A
68>Hans Verkuil</H3
69><H3
70CLASS="AUTHOR"
71><A
72NAME="AEN21"
73></A
74>Martin Rubli</H3
75><P
76CLASS="COPYRIGHT"
77>Copyright &copy; 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Bill Dirks, Michael H. Schimek, Hans Verkuil, Martin
78Rubli</P
79><DIV
80CLASS="LEGALNOTICE"
81><P
82></P
83><A
84NAME="AEN37"
85></A
86><P
87>This document is copyrighted &copy; 1999-2008 by Bill
88Dirks, Michael H. Schimek, Hans Verkuil and Martin Rubli.</P
89><P
90>Permission is granted to copy, distribute and/or modify
91this document under the terms of the GNU Free Documentation License,
92Version 1.1 or any later version published by the Free Software
93Foundation; with no Invariant Sections, with no Front-Cover Texts, and
94with no Back-Cover Texts. A copy of the license is included in the
95appendix entitled "GNU Free Documentation License".</P
96><P
97>Programming examples can be used and distributed without
98restrictions.</P
99><P
100></P
101></DIV
102><HR></DIV
103><DIV
104CLASS="TOC"
105><DL
106><DT
107><B
108>Table of Contents</B
109></DT
110><DT
111><A
112HREF="f163.htm"
113>Introduction</A
114></DT
115><DT
116>1. <A
117HREF="c174.htm"
118>Common API Elements</A
119></DT
120><DD
121><DL
122><DT
123>1.1. <A
124HREF="c174.htm#OPEN"
125>Opening and Closing Devices</A
126></DT
127><DD
128><DL
129><DT
130>1.1.1. <A
131HREF="c174.htm#AEN194"
132>Device Naming</A
133></DT
134><DT
135>1.1.2. <A
136HREF="c174.htm#RELATED"
137>Related Devices</A
138></DT
139><DT
140>1.1.3. <A
141HREF="c174.htm#AEN249"
142>Multiple Opens</A
143></DT
144><DT
145>1.1.4. <A
146HREF="c174.htm#AEN270"
147>Shared Data Streams</A
148></DT
149><DT
150>1.1.5. <A
151HREF="c174.htm#AEN273"
152>Functions</A
153></DT
154></DL
155></DD
156><DT
157>1.2. <A
158HREF="x282.htm"
159>Querying Capabilities</A
160></DT
161><DT
162>1.3. <A
163HREF="x294.htm"
164>Application Priority</A
165></DT
166><DT
167>1.4. <A
168HREF="x309.htm"
169>Video Inputs and Outputs</A
170></DT
171><DT
172>1.5. <A
173HREF="x341.htm"
174>Audio Inputs and Outputs</A
175></DT
176><DT
177>1.6. <A
178HREF="x394.htm"
179>Tuners and Modulators</A
180></DT
181><DD
182><DL
183><DT
184>1.6.1. <A
185HREF="x394.htm#AEN396"
186>Tuners</A
187></DT
188><DT
189>1.6.2. <A
190HREF="x394.htm#AEN418"
191>Modulators</A
192></DT
193><DT
194>1.6.3. <A
195HREF="x394.htm#AEN437"
196>Radio Frequency</A
197></DT
198><DT
199>1.6.4. <A
200HREF="x394.htm#AEN445"
201>Satellite Receivers</A
202></DT
203></DL
204></DD
205><DT
206>1.7. <A
207HREF="x448.htm"
208>Video Standards</A
209></DT
210><DT
211>1.8. <A
212HREF="x542.htm"
213>User Controls</A
214></DT
215><DT
216>1.9. <A
217HREF="x802.htm"
218>Extended Controls</A
219></DT
220><DD
221><DL
222><DT
223>1.9.1. <A
224HREF="x802.htm#AEN804"
225>Introduction</A
226></DT
227><DT
228>1.9.2. <A
229HREF="x802.htm#AEN809"
230>The Extended Control API</A
231></DT
232><DT
233>1.9.3. <A
234HREF="x802.htm#AEN840"
235>Enumerating Extended Controls</A
236></DT
237><DT
238>1.9.4. <A
239HREF="x802.htm#AEN867"
240>Creating Control Panels</A
241></DT
242><DT
243>1.9.5. <A
244HREF="x802.htm#MPEG-CONTROLS"
245>MPEG Control Reference</A
246></DT
247><DT
248>1.9.6. <A
249HREF="x802.htm#CAMERA-CONTROLS"
250>Camera Control Reference</A
251></DT
252></DL
253></DD
254><DT
255>1.10. <A
256HREF="x1859.htm"
257>Data Formats</A
258></DT
259><DD
260><DL
261><DT
262>1.10.1. <A
263HREF="x1859.htm#AEN1861"
264>Data Format Negotiation</A
265></DT
266><DT
267>1.10.2. <A
268HREF="x1859.htm#AEN1894"
269>Image Format Enumeration</A
270></DT
271></DL
272></DD
273><DT
274>1.11. <A
275HREF="x1904.htm"
276>Image Cropping, Insertion and Scaling</A
277></DT
278><DD
279><DL
280><DT
281>1.11.1. <A
282HREF="x1904.htm#AEN1926"
283>Cropping Structures</A
284></DT
285><DT
286>1.11.2. <A
287HREF="x1904.htm#AEN1954"
288>Scaling Adjustments</A
289></DT
290><DT
291>1.11.3. <A
292HREF="x1904.htm#AEN1969"
293>Examples</A
294></DT
295></DL
296></DD
297><DT
298>1.12. <A
299HREF="x2009.htm"
300>Streaming Parameters</A
301></DT
302></DL
303></DD
304><DT
305>2. <A
306HREF="c2030.htm"
307>Image Formats</A
308></DT
309><DD
310><DL
311><DT
312>2.1. <A
313HREF="c2030.htm#AEN2113"
314>Standard Image Formats</A
315></DT
316><DT
317>2.2. <A
318HREF="x2123.htm"
319>Colorspaces</A
320></DT
321><DT
322>2.3. <A
323HREF="x2428.htm"
324>Indexed Format</A
325></DT
326><DT
327>2.4. <A
328HREF="x2490.htm"
329>RGB Formats</A
330></DT
331><DD
332><DL
333><DT
334><A
335HREF="r2492.htm"
336>Packed RGB formats</A
337>&nbsp;--&nbsp;Packed RGB formats</DT
338><DT
339><A
340HREF="r3735.htm"
341>V4L2_PIX_FMT_SBGGR8 ('BA81')</A
342>&nbsp;--&nbsp;Bayer RGB format</DT
343><DT
344><A
345HREF="r3796.htm"
346>V4L2_PIX_FMT_SBGGR16 ('BA82')</A
347>&nbsp;--&nbsp;Bayer RGB format</DT
348></DL
349></DD
350><DT
351>2.5. <A
352HREF="x3891.htm"
353>YUV Formats</A
354></DT
355><DD
356><DL
357><DT
358><A
359HREF="r3896.htm"
360>Packed YUV formats</A
361>&nbsp;--&nbsp;Packed YUV formats</DT
362><DT
363><A
364HREF="r4185.htm"
365>V4L2_PIX_FMT_GREY ('GREY')</A
366>&nbsp;--&nbsp;Grey-scale image</DT
367><DT
368><A
369HREF="r4246.htm"
370>V4L2_PIX_FMT_Y16 ('Y16 ')</A
371>&nbsp;--&nbsp;Grey-scale image</DT
372><DT
373><A
374HREF="r4339.htm"
375>V4L2_PIX_FMT_YUYV ('YUYV')</A
376>&nbsp;--&nbsp;Packed format with &frac12; horizontal chroma
377resolution, also known as YUV 4:2:2</DT
378><DT
379><A
380HREF="r4484.htm"
381>V4L2_PIX_FMT_UYVY ('UYVY')</A
382>&nbsp;--&nbsp;Variation of
383<CODE
384CLASS="CONSTANT"
385>V4L2_PIX_FMT_YUYV</CODE
386> with different order of samples
387in memory</DT
388><DT
389><A
390HREF="r4629.htm"
391>V4L2_PIX_FMT_Y41P ('Y41P')</A
392>&nbsp;--&nbsp;Format with &frac14; horizontal chroma
393resolution, also known as YUV 4:1:1</DT
394><DT
395><A
396HREF="r4850.htm"
397>V4L2_PIX_FMT_YVU420 ('YV12'), V4L2_PIX_FMT_YUV420 ('YU12')</A
398>&nbsp;--&nbsp;Planar formats with &frac12; horizontal and
399vertical chroma resolution, also known as YUV 4:2:0</DT
400><DT
401><A
402HREF="r5016.htm"
403>V4L2_PIX_FMT_YVU410 ('YVU9'), V4L2_PIX_FMT_YUV410 ('YUV9')</A
404>&nbsp;--&nbsp;Planar formats with &frac14; horizontal and
405vertical chroma resolution, also known as YUV 4:1:0</DT
406><DT
407><A
408HREF="r5154.htm"
409>V4L2_PIX_FMT_YUV422P ('422P')</A
410>&nbsp;--&nbsp;Format with &frac12; horizontal chroma resolution,
411also known as YUV 4:2:2. Planar layout as opposed to
412<CODE
413CLASS="CONSTANT"
414>V4L2_PIX_FMT_YUYV</CODE
415></DT
416><DT
417><A
418HREF="r5319.htm"
419>V4L2_PIX_FMT_YUV411P ('411P')</A
420>&nbsp;--&nbsp;Format with &frac14; horizontal chroma resolution,
421also known as YUV 4:1:1. Planar layout as opposed to
422<CODE
423CLASS="CONSTANT"
424>V4L2_PIX_FMT_Y41P</CODE
425></DT
426><DT
427><A
428HREF="r5470.htm"
429>V4L2_PIX_FMT_NV12 ('NV12'), V4L2_PIX_FMT_NV21 ('NV21')</A
430>&nbsp;--&nbsp;Formats with &frac12; horizontal and vertical
431chroma resolution, also known as YUV 4:2:0. One luminance and one
432chrominance plane with alternating chroma samples as opposed to
433<CODE
434CLASS="CONSTANT"
435>V4L2_PIX_FMT_YVU420</CODE
436></DT
437></DL
438></DD
439><DT
440>2.6. <A
441HREF="x5634.htm"
442>Compressed Formats</A
443></DT
444><DT
445>2.7. <A
446HREF="x5665.htm"
447>Reserved Format Identifiers</A
448></DT
449></DL
450></DD
451><DT
452>3. <A
453HREF="c5742.htm"
454>Input/Output</A
455></DT
456><DD
457><DL
458><DT
459>3.1. <A
460HREF="c5742.htm#RW"
461>Read/Write</A
462></DT
463><DT
464>3.2. <A
465HREF="x5791.htm"
466>Streaming I/O (Memory Mapping)</A
467></DT
468><DT
469>3.3. <A
470HREF="x5884.htm"
471>Streaming I/O (User Pointers)</A
472></DT
473><DT
474>3.4. <A
475HREF="x5950.htm"
476>Asynchronous I/O</A
477></DT
478><DT
479>3.5. <A
480HREF="x5953.htm"
481>Buffers</A
482></DT
483><DD
484><DL
485><DT
486>3.5.1. <A
487HREF="x5953.htm#AEN6266"
488>Timecodes</A
489></DT
490></DL
491></DD
492><DT
493>3.6. <A
494HREF="x6386.htm"
495>Field Order</A
496></DT
497></DL
498></DD
499><DT
500>4. <A
501HREF="c6488.htm"
502>Interfaces</A
503></DT
504><DD
505><DL
506><DT
507>4.1. <A
508HREF="c6488.htm#CAPTURE"
509>Video Capture Interface</A
510></DT
511><DD
512><DL
513><DT
514>4.1.1. <A
515HREF="c6488.htm#AEN6498"
516>Querying Capabilities</A
517></DT
518><DT
519>4.1.2. <A
520HREF="c6488.htm#AEN6510"
521>Supplemental Functions</A
522></DT
523><DT
524>4.1.3. <A
525HREF="c6488.htm#AEN6520"
526>Image Format Negotiation</A
527></DT
528><DT
529>4.1.4. <A
530HREF="c6488.htm#AEN6563"
531>Reading Images</A
532></DT
533></DL
534></DD
535><DT
536>4.2. <A
537HREF="x6570.htm"
538>Video Overlay Interface</A
539></DT
540><DD
541><DL
542><DT
543>4.2.1. <A
544HREF="x6570.htm#AEN6587"
545>Querying Capabilities</A
546></DT
547><DT
548>4.2.2. <A
549HREF="x6570.htm#AEN6595"
550>Supplemental Functions</A
551></DT
552><DT
553>4.2.3. <A
554HREF="x6570.htm#AEN6605"
555>Setup</A
556></DT
557><DT
558>4.2.4. <A
559HREF="x6570.htm#AEN6635"
560>Overlay Window</A
561></DT
562><DT
563>4.2.5. <A
564HREF="x6570.htm#AEN6826"
565>Enabling Overlay</A
566></DT
567></DL
568></DD
569><DT
570>4.3. <A
571HREF="x6831.htm"
572>Video Output Interface</A
573></DT
574><DD
575><DL
576><DT
577>4.3.1. <A
578HREF="x6831.htm#AEN6839"
579>Querying Capabilities</A
580></DT
581><DT
582>4.3.2. <A
583HREF="x6831.htm#AEN6849"
584>Supplemental Functions</A
585></DT
586><DT
587>4.3.3. <A
588HREF="x6831.htm#AEN6859"
589>Image Format Negotiation</A
590></DT
591><DT
592>4.3.4. <A
593HREF="x6831.htm#AEN6902"
594>Writing Images</A
595></DT
596></DL
597></DD
598><DT
599>4.4. <A
600HREF="x6909.htm"
601>Video Output Overlay Interface</A
602></DT
603><DD
604><DL
605><DT
606>4.4.1. <A
607HREF="x6909.htm#AEN6923"
608>Querying Capabilities</A
609></DT
610><DT
611>4.4.2. <A
612HREF="x6909.htm#AEN6932"
613>Framebuffer</A
614></DT
615><DT
616>4.4.3. <A
617HREF="x6909.htm#AEN6953"
618>Overlay Window and Scaling</A
619></DT
620><DT
621>4.4.4. <A
622HREF="x6909.htm#AEN6987"
623>Enabling Overlay</A
624></DT
625></DL
626></DD
627><DT
628>4.5. <A
629HREF="x6991.htm"
630>Codec Interface</A
631></DT
632><DT
633>4.6. <A
634HREF="x7002.htm"
635>Effect Devices Interface</A
636></DT
637><DT
638>4.7. <A
639HREF="x7013.htm"
640>Raw VBI Data Interface</A
641></DT
642><DD
643><DL
644><DT
645>4.7.1. <A
646HREF="x7013.htm#AEN7029"
647>Querying Capabilities</A
648></DT
649><DT
650>4.7.2. <A
651HREF="x7013.htm#AEN7038"
652>Supplemental Functions</A
653></DT
654><DT
655>4.7.3. <A
656HREF="x7013.htm#AEN7045"
657>Raw VBI Format Negotiation</A
658></DT
659><DT
660>4.7.4. <A
661HREF="x7013.htm#AEN7218"
662>Reading and writing VBI images</A
663></DT
664></DL
665></DD
666><DT
667>4.8. <A
668HREF="x7236.htm"
669>Sliced VBI Data Interface</A
670></DT
671><DD
672><DL
673><DT
674>4.8.1. <A
675HREF="x7236.htm#AEN7248"
676>Querying Capabilities</A
677></DT
678><DT
679>4.8.2. <A
680HREF="x7236.htm#AEN7258"
681>Supplemental Functions</A
682></DT
683><DT
684>4.8.3. <A
685HREF="x7236.htm#AEN7265"
686>Sliced VBI Format Negotiation</A
687></DT
688><DT
689>4.8.4. <A
690HREF="x7236.htm#AEN7483"
691>Reading and writing sliced VBI data</A
692></DT
693></DL
694></DD
695><DT
696>4.9. <A
697HREF="x7561.htm"
698>Teletext Interface</A
699></DT
700><DT
701>4.10. <A
702HREF="x7578.htm"
703>Radio Interface</A
704></DT
705><DD
706><DL
707><DT
708>4.10.1. <A
709HREF="x7578.htm#AEN7585"
710>Querying Capabilities</A
711></DT
712><DT
713>4.10.2. <A
714HREF="x7578.htm#AEN7594"
715>Supplemental Functions</A
716></DT
717><DT
718>4.10.3. <A
719HREF="x7578.htm#AEN7600"
720>Programming</A
721></DT
722></DL
723></DD
724><DT
725>4.11. <A
726HREF="x7607.htm"
727>RDS Interface</A
728></DT
729></DL
730></DD
731><DT
732>I. <A
733HREF="r7624.htm"
734>Function Reference</A
735></DT
736><DD
737><DL
738><DT
739><A
740HREF="r7626.htm"
741>V4L2 close()</A
742>&nbsp;--&nbsp;Close a V4L2 device</DT
743><DT
744><A
745HREF="r7667.htm"
746>V4L2 ioctl()</A
747>&nbsp;--&nbsp;Program a V4L2 device</DT
748><DT
749><A
750HREF="r7771.htm"
751>ioctl VIDIOC_CROPCAP</A
752>&nbsp;--&nbsp;Information about the video cropping and scaling abilities</DT
753><DT
754><A
755HREF="r7900.htm"
756>ioctl VIDIOC_DBG_G_REGISTER, VIDIOC_DBG_S_REGISTER</A
757>&nbsp;--&nbsp;Read or write hardware registers</DT
758><DT
759><A
760HREF="r8087.htm"
761>ioctl VIDIOC_ENCODER_CMD, VIDIOC_TRY_ENCODER_CMD</A
762>&nbsp;--&nbsp;Execute an encoder command</DT
763><DT
764><A
765HREF="r8242.htm"
766>ioctl VIDIOC_ENUMAUDIO</A
767>&nbsp;--&nbsp;Enumerate audio inputs</DT
768><DT
769><A
770HREF="r8304.htm"
771>ioctl VIDIOC_ENUMAUDOUT</A
772>&nbsp;--&nbsp;Enumerate audio outputs</DT
773><DT
774><A
775HREF="r8367.htm"
776>ioctl VIDIOC_ENUM_FMT</A
777>&nbsp;--&nbsp;Enumerate image formats</DT
778><DT
779><A
780HREF="r8494.htm"
781>ioctl VIDIOC_ENUM_FRAMESIZES</A
782>&nbsp;--&nbsp;Enumerate frame sizes</DT
783><DT
784><A
785HREF="r8724.htm"
786>ioctl VIDIOC_ENUM_FRAMEINTERVALS</A
787>&nbsp;--&nbsp;Enumerate frame intervals</DT
788><DT
789><A
790HREF="r8936.htm"
791>ioctl VIDIOC_ENUMINPUT</A
792>&nbsp;--&nbsp;Enumerate video inputs</DT
793><DT
794><A
795HREF="r9149.htm"
796>ioctl VIDIOC_ENUMOUTPUT</A
797>&nbsp;--&nbsp;Enumerate video outputs</DT
798><DT
799><A
800HREF="r9288.htm"
801>ioctl VIDIOC_ENUMSTD</A
802>&nbsp;--&nbsp;Enumerate supported video standards</DT
803><DT
804><A
805HREF="r9539.htm"
806>ioctl VIDIOC_G_AUDIO, VIDIOC_S_AUDIO</A
807>&nbsp;--&nbsp;Query or select the current audio input and its
808attributes</DT
809><DT
810><A
811HREF="r9688.htm"
812>ioctl VIDIOC_G_AUDOUT, VIDIOC_S_AUDOUT</A
813>&nbsp;--&nbsp;Query or select the current audio output</DT
814><DT
815><A
816HREF="r9804.htm"
817>ioctl VIDIOC_G_CHIP_IDENT</A
818>&nbsp;--&nbsp;Identify the chips on a TV card</DT
819><DT
820><A
821HREF="r9994.htm"
822>ioctl VIDIOC_G_CROP, VIDIOC_S_CROP</A
823>&nbsp;--&nbsp;Get or set the current cropping rectangle</DT
824><DT
825><A
826HREF="r10104.htm"
827>ioctl VIDIOC_G_CTRL, VIDIOC_S_CTRL</A
828>&nbsp;--&nbsp;Get or set the value of a control</DT
829><DT
830><A
831HREF="r10211.htm"
832>ioctl VIDIOC_G_ENC_INDEX</A
833>&nbsp;--&nbsp;Get meta data about a compressed video stream</DT
834><DT
835><A
836HREF="r10386.htm"
837>ioctl VIDIOC_G_EXT_CTRLS, VIDIOC_S_EXT_CTRLS,
838VIDIOC_TRY_EXT_CTRLS</A
839>&nbsp;--&nbsp;Get or set the value of several controls, try control
840values</DT
841><DT
842><A
843HREF="r10595.htm"
844>ioctl VIDIOC_G_FBUF, VIDIOC_S_FBUF</A
845>&nbsp;--&nbsp;Get or set frame buffer overlay parameters</DT
846><DT
847><A
848HREF="r10944.htm"
849>ioctl VIDIOC_G_FMT, VIDIOC_S_FMT,
850VIDIOC_TRY_FMT</A
851>&nbsp;--&nbsp;Get or set the data format, try a format</DT
852><DT
853><A
854HREF="r11094.htm"
855>ioctl VIDIOC_G_FREQUENCY, VIDIOC_S_FREQUENCY</A
856>&nbsp;--&nbsp;Get or set tuner or modulator radio
857frequency</DT
858><DT
859><A
860HREF="r11217.htm"
861>ioctl VIDIOC_G_INPUT, VIDIOC_S_INPUT</A
862>&nbsp;--&nbsp;Query or select the current video input</DT
863><DT
864><A
865HREF="r11285.htm"
866>ioctl VIDIOC_G_JPEGCOMP, VIDIOC_S_JPEGCOMP</A
867>&nbsp;--&nbsp;</DT
868><DT
869><A
870HREF="r11430.htm"
871>ioctl VIDIOC_G_MODULATOR, VIDIOC_S_MODULATOR</A
872>&nbsp;--&nbsp;Get or set modulator attributes</DT
873><DT
874><A
875HREF="r11612.htm"
876>ioctl VIDIOC_G_OUTPUT, VIDIOC_S_OUTPUT</A
877>&nbsp;--&nbsp;Query or select the current video output</DT
878><DT
879><A
880HREF="r11680.htm"
881>ioctl VIDIOC_G_PARM, VIDIOC_S_PARM</A
882>&nbsp;--&nbsp;Get or set streaming parameters</DT
883><DT
884><A
885HREF="r11946.htm"
886>ioctl VIDIOC_G_PRIORITY, VIDIOC_S_PRIORITY</A
887>&nbsp;--&nbsp;Query or request the access priority associated with a
888file descriptor</DT
889><DT
890><A
891HREF="r12051.htm"
892>ioctl VIDIOC_G_SLICED_VBI_CAP</A
893>&nbsp;--&nbsp;Query sliced VBI capabilities</DT
894><DT
895><A
896HREF="r12265.htm"
897>ioctl VIDIOC_G_STD, VIDIOC_S_STD</A
898>&nbsp;--&nbsp;Query or select the video standard of the current input</DT
899><DT
900><A
901HREF="r12342.htm"
902>ioctl VIDIOC_G_TUNER, VIDIOC_S_TUNER</A
903>&nbsp;--&nbsp;Get or set tuner attributes</DT
904><DT
905><A
906HREF="r12784.htm"
907>ioctl VIDIOC_LOG_STATUS</A
908>&nbsp;--&nbsp;Log driver status information</DT
909><DT
910><A
911HREF="r12816.htm"
912>ioctl VIDIOC_OVERLAY</A
913>&nbsp;--&nbsp;Start or stop video overlay</DT
914><DT
915><A
916HREF="r12878.htm"
917>ioctl VIDIOC_QBUF, VIDIOC_DQBUF</A
918>&nbsp;--&nbsp;Exchange a buffer with the driver</DT
919><DT
920><A
921HREF="r13022.htm"
922>ioctl VIDIOC_QUERYBUF</A
923>&nbsp;--&nbsp;Query the status of a buffer</DT
924><DT
925><A
926HREF="r13105.htm"
927>ioctl VIDIOC_QUERYCAP</A
928>&nbsp;--&nbsp;Query device capabilities</DT
929><DT
930><A
931HREF="r13317.htm"
932>ioctl VIDIOC_QUERYCTRL, VIDIOC_QUERYMENU</A
933>&nbsp;--&nbsp;Enumerate controls and menu control items</DT
934><DT
935><A
936HREF="r13641.htm"
937>ioctl VIDIOC_QUERYSTD</A
938>&nbsp;--&nbsp;Sense the video standard received by the current
939input</DT
940><DT
941><A
942HREF="r13696.htm"
943>ioctl VIDIOC_REQBUFS</A
944>&nbsp;--&nbsp;Initiate Memory Mapping or User Pointer I/O</DT
945><DT
946><A
947HREF="r13817.htm"
948>ioctl VIDIOC_STREAMON, VIDIOC_STREAMOFF</A
949>&nbsp;--&nbsp;Start or stop streaming I/O</DT
950><DT
951><A
952HREF="r13889.htm"
953>V4L2 mmap()</A
954>&nbsp;--&nbsp;Map device memory into application address space</DT
955><DT
956><A
957HREF="r14037.htm"
958>V4L2 munmap()</A
959>&nbsp;--&nbsp;Unmap device memory</DT
960><DT
961><A
962HREF="r14090.htm"
963>V4L2 open()</A
964>&nbsp;--&nbsp;Open a V4L2 device</DT
965><DT
966><A
967HREF="r14169.htm"
968>V4L2 poll()</A
969>&nbsp;--&nbsp;Wait for some event on a file descriptor</DT
970><DT
971><A
972HREF="r14264.htm"
973>V4L2 read()</A
974>&nbsp;--&nbsp;Read from a V4L2 device</DT
975><DT
976><A
977HREF="r14390.htm"
978>V4L2 select()</A
979>&nbsp;--&nbsp;Synchronous I/O multiplexing</DT
980><DT
981><A
982HREF="r14496.htm"
983>V4L2 write()</A
984>&nbsp;--&nbsp;Write to a V4L2 device</DT
985></DL
986></DD
987><DT
988>5. <A
989HREF="c14592.htm"
990>V4L2 Driver Programming</A
991></DT
992><DT
993>6. <A
994HREF="c14595.htm"
995>Changes</A
996></DT
997><DD
998><DL
999><DT
1000>6.1. <A
1001HREF="c14595.htm#DIFF-V4L"
1002>Differences between V4L and V4L2</A
1003></DT
1004><DD
1005><DL
1006><DT
1007>6.1.1. <A
1008HREF="c14595.htm#AEN14602"
1009>Opening and Closing Devices</A
1010></DT
1011><DT
1012>6.1.2. <A
1013HREF="c14595.htm#AEN14665"
1014>Querying Capabilities</A
1015></DT
1016><DT
1017>6.1.3. <A
1018HREF="c14595.htm#AEN14821"
1019>Video Sources</A
1020></DT
1021><DT
1022>6.1.4. <A
1023HREF="c14595.htm#AEN14877"
1024>Tuning</A
1025></DT
1026><DT
1027>6.1.5. <A
1028HREF="c14595.htm#V4L-IMAGE-PROPERTIES"
1029>Image Properties</A
1030></DT
1031><DT
1032>6.1.6. <A
1033HREF="c14595.htm#AEN15120"
1034>Audio</A
1035></DT
1036><DT
1037>6.1.7. <A
1038HREF="c14595.htm#AEN15205"
1039>Frame Buffer Overlay</A
1040></DT
1041><DT
1042>6.1.8. <A
1043HREF="c14595.htm#AEN15269"
1044>Cropping</A
1045></DT
1046><DT
1047>6.1.9. <A
1048HREF="c14595.htm#AEN15302"
1049>Reading Images, Memory Mapping</A
1050></DT
1051><DT
1052>6.1.10. <A
1053HREF="c14595.htm#AEN15385"
1054>Reading Raw VBI Data</A
1055></DT
1056><DT
1057>6.1.11. <A
1058HREF="c14595.htm#AEN15438"
1059>Miscellaneous</A
1060></DT
1061></DL
1062></DD
1063><DT
1064>6.2. <A
1065HREF="x15446.htm"
1066>Changes of the V4L2 API</A
1067></DT
1068><DD
1069><DL
1070><DT
1071>6.2.1. <A
1072HREF="x15446.htm#AEN15449"
1073>Early Versions</A
1074></DT
1075><DT
1076>6.2.2. <A
1077HREF="x15446.htm#AEN15499"
1078>V4L2 Version 0.16 1999-01-31</A
1079></DT
1080><DT
1081>6.2.3. <A
1082HREF="x15446.htm#AEN15502"
1083>V4L2 Version 0.18 1999-03-16</A
1084></DT
1085><DT
1086>6.2.4. <A
1087HREF="x15446.htm#AEN15505"
1088>V4L2 Version 0.19 1999-06-05</A
1089></DT
1090><DT
1091>6.2.5. <A
1092HREF="x15446.htm#AEN15514"
1093>V4L2 Version 0.20 (1999-09-10)</A
1094></DT
1095><DT
1096>6.2.6. <A
1097HREF="x15446.htm#AEN15575"
1098>V4L2 Version 0.20 incremental changes</A
1099></DT
1100><DT
1101>6.2.7. <A
1102HREF="x15446.htm#AEN15628"
1103>V4L2 Version 0.20 2000-11-23</A
1104></DT
1105><DT
1106>6.2.8. <A
1107HREF="x15446.htm#AEN15657"
1108>V4L2 Version 0.20 2002-07-25</A
1109></DT
1110><DT
1111>6.2.9. <A
1112HREF="x15446.htm#AEN15660"
1113>V4L2 in Linux 2.5.46, 2002-10</A
1114></DT
1115><DT
1116>6.2.10. <A
1117HREF="x15446.htm#AEN16046"
1118>V4L2 2003-06-19</A
1119></DT
1120><DT
1121>6.2.11. <A
1122HREF="x15446.htm#AEN16089"
1123>V4L2 2003-11-05</A
1124></DT
1125><DT
1126>6.2.12. <A
1127HREF="x15446.htm#AEN16131"
1128>V4L2 in Linux 2.6.6, 2004-05-09</A
1129></DT
1130><DT
1131>6.2.13. <A
1132HREF="x15446.htm#AEN16139"
1133>V4L2 in Linux 2.6.8</A
1134></DT
1135><DT
1136>6.2.14. <A
1137HREF="x15446.htm#AEN16149"
1138>V4L2 spec erratum 2004-08-01</A
1139></DT
1140><DT
1141>6.2.15. <A
1142HREF="x15446.htm#AEN16170"
1143>V4L2 in Linux 2.6.14</A
1144></DT
1145><DT
1146>6.2.16. <A
1147HREF="x15446.htm#AEN16176"
1148>V4L2 in Linux 2.6.15</A
1149></DT
1150><DT
1151>6.2.17. <A
1152HREF="x15446.htm#AEN16203"
1153>V4L2 spec erratum 2005-11-27</A
1154></DT
1155><DT
1156>6.2.18. <A
1157HREF="x15446.htm#AEN16212"
1158>V4L2 spec erratum 2006-01-10</A
1159></DT
1160><DT
1161>6.2.19. <A
1162HREF="x15446.htm#AEN16223"
1163>V4L2 spec erratum 2006-02-03</A
1164></DT
1165><DT
1166>6.2.20. <A
1167HREF="x15446.htm#AEN16231"
1168>V4L2 spec erratum 2006-02-04</A
1169></DT
1170><DT
1171>6.2.21. <A
1172HREF="x15446.htm#AEN16241"
1173>V4L2 in Linux 2.6.17</A
1174></DT
1175><DT
1176>6.2.22. <A
1177HREF="x15446.htm#AEN16261"
1178>V4L2 spec erratum 2006-09-23 (Draft 0.15)</A
1179></DT
1180><DT
1181>6.2.23. <A
1182HREF="x15446.htm#AEN16297"
1183>V4L2 in Linux 2.6.18</A
1184></DT
1185><DT
1186>6.2.24. <A
1187HREF="x15446.htm#AEN16319"
1188>V4L2 in Linux 2.6.19</A
1189></DT
1190><DT
1191>6.2.25. <A
1192HREF="x15446.htm#AEN16338"
1193>V4L2 spec erratum 2006-10-12 (Draft 0.17)</A
1194></DT
1195><DT
1196>6.2.26. <A
1197HREF="x15446.htm#AEN16345"
1198>V4L2 in Linux 2.6.21</A
1199></DT
1200><DT
1201>6.2.27. <A
1202HREF="x15446.htm#AEN16351"
1203>V4L2 in Linux 2.6.22</A
1204></DT
1205><DT
1206>6.2.28. <A
1207HREF="x15446.htm#AEN16378"
1208>V4L2 in Linux 2.6.24</A
1209></DT
1210><DT
1211>6.2.29. <A
1212HREF="x15446.htm#AEN16388"
1213>V4L2 in Linux 2.6.25</A
1214></DT
1215></DL
1216></DD
1217><DT
1218>6.3. <A
1219HREF="x16430.htm"
1220>Relation of V4L2 to other Linux multimedia APIs</A
1221></DT
1222><DD
1223><DL
1224><DT
1225>6.3.1. <A
1226HREF="x16430.htm#XVIDEO"
1227>X Video Extension</A
1228></DT
1229><DT
1230>6.3.2. <A
1231HREF="x16430.htm#AEN16446"
1232>Digital Video</A
1233></DT
1234><DT
1235>6.3.3. <A
1236HREF="x16430.htm#AEN16450"
1237>Audio Interfaces</A
1238></DT
1239></DL
1240></DD
1241><DT
1242>6.4. <A
1243HREF="x16453.htm"
1244>Experimental API Elements</A
1245></DT
1246><DT
1247>6.5. <A
1248HREF="x16497.htm"
1249>Obsolete API Elements</A
1250></DT
1251></DL
1252></DD
1253><DT
1254>A. <A
1255HREF="a16506.htm"
1256>Video For Linux Two Header File</A
1257></DT
1258><DT
1259>B. <A
1260HREF="a16706.htm"
1261>Video Capture Example</A
1262></DT
1263><DT
1264>C. <A
1265HREF="a16721.htm"
1266>GNU Free Documentation License</A
1267></DT
1268><DD
1269><DL
1270><DT
1271>C.1. <A
1272HREF="a16721.htm#FDL-PREAMBLE"
1273>0. PREAMBLE</A
1274></DT
1275><DT
1276>C.2. <A
1277HREF="x16743.htm"
1278>1. APPLICABILITY AND DEFINITIONS</A
1279></DT
1280><DT
1281>C.3. <A
1282HREF="x16769.htm"
1283>2. VERBATIM COPYING</A
1284></DT
1285><DT
1286>C.4. <A
1287HREF="x16775.htm"
1288>3. COPYING IN QUANTITY</A
1289></DT
1290><DT
1291>C.5. <A
1292HREF="x16788.htm"
1293>4. MODIFICATIONS</A
1294></DT
1295><DT
1296>C.6. <A
1297HREF="x16896.htm"
1298>5. COMBINING DOCUMENTS</A
1299></DT
1300><DT
1301>C.7. <A
1302HREF="x16910.htm"
1303>6. COLLECTIONS OF DOCUMENTS</A
1304></DT
1305><DT
1306>C.8. <A
1307HREF="x16915.htm"
1308>7. AGGREGATION WITH INDEPENDENT WORKS</A
1309></DT
1310><DT
1311>C.9. <A
1312HREF="x16923.htm"
1313>8. TRANSLATION</A
1314></DT
1315><DT
1316>C.10. <A
1317HREF="x16929.htm"
1318>9. TERMINATION</A
1319></DT
1320><DT
1321>C.11. <A
1322HREF="x16933.htm"
1323>10. FUTURE REVISIONS OF THIS LICENSE</A
1324></DT
1325><DT
1326>C.12. <A
1327HREF="x16941.htm"
1328>Addendum</A
1329></DT
1330></DL
1331></DD
1332><DT
1333><A
1334HREF="i16960.htm"
1335>List of Types</A
1336></DT
1337><DT
1338><A
1339HREF="b17127.htm"
1340>References</A
1341></DT
1342></DL
1343></DIV
1344><DIV
1345CLASS="LOT"
1346><DL
1347CLASS="LOT"
1348><DT
1349><B
1350>List of Figures</B
1351></DT
1352><DT
1353>1-1. <A
1354HREF="x1904.htm#CROP-SCALE"
1355>Image Cropping, Insertion and Scaling</A
1356></DT
1357><DT
1358>3-1. <A
1359HREF="x6386.htm#FIELDSEQ-TB"
1360>Field Order, Top Field First Transmitted</A
1361></DT
1362><DT
1363>3-2. <A
1364HREF="x6386.htm#FIELDSEQ-BT"
1365>Field Order, Bottom Field First Transmitted</A
1366></DT
1367><DT
1368>4-1. <A
1369HREF="x7013.htm#VBI-HSYNC"
1370>Line synchronization</A
1371></DT
1372><DT
1373>4-2. <A
1374HREF="x7013.htm#VBI-525"
1375>ITU-R 525 line numbering (M/NTSC and M/PAL)</A
1376></DT
1377><DT
1378>4-3. <A
1379HREF="x7013.htm#VBI-625"
1380>ITU-R 625 line numbering</A
1381></DT
1382></DL
1383></DIV
1384><DIV
1385CLASS="LOT"
1386><DL
1387CLASS="LOT"
1388><DT
1389><B
1390>List of Examples</B
1391></DT
1392><DT
1393>1-1. <A
1394HREF="x309.htm#AEN328"
1395>Information about the current video input</A
1396></DT
1397><DT
1398>1-2. <A
1399HREF="x309.htm#AEN336"
1400>Switching to the first video input</A
1401></DT
1402><DT
1403>1-3. <A
1404HREF="x341.htm#AEN382"
1405>Information about the current audio input</A
1406></DT
1407><DT
1408>1-4. <A
1409HREF="x341.htm#AEN388"
1410>Switching to the first audio input</A
1411></DT
1412><DT
1413>1-5. <A
1414HREF="x448.htm#AEN510"
1415>Information about the current video standard</A
1416></DT
1417><DT
1418>1-6. <A
1419HREF="x448.htm#AEN519"
1420>Listing the video standards supported by the current
1421input</A
1422></DT
1423><DT
1424>1-7. <A
1425HREF="x448.htm#AEN530"
1426>Selecting a new video standard</A
1427></DT
1428><DT
1429>1-8. <A
1430HREF="x542.htm#AEN778"
1431>Enumerating all controls</A
1432></DT
1433><DT
1434>1-9. <A
1435HREF="x542.htm#AEN789"
1436>Changing controls</A
1437></DT
1438><DT
1439>1-10. <A
1440HREF="x1904.htm#AEN1972"
1441>Resetting the cropping parameters</A
1442></DT
1443><DT
1444>1-11. <A
1445HREF="x1904.htm#AEN1983"
1446>Simple downscaling</A
1447></DT
1448><DT
1449>1-12. <A
1450HREF="x1904.htm#AEN1991"
1451>Selecting an output area</A
1452></DT
1453><DT
1454>1-13. <A
1455HREF="x1904.htm#AEN1996"
1456>Current scaling factor and pixel aspect</A
1457></DT
1458><DT
1459>2-1. <A
1460HREF="x2123.htm#AEN2217"
1461>ITU-R Rec. BT.601 color conversion</A
1462></DT
1463><DT
1464>2-1. <A
1465HREF="r2492.htm#AEN3061"
1466><CODE
1467CLASS="CONSTANT"
1468>V4L2_PIX_FMT_BGR24</CODE
1469> 4 &times; 4 pixel
1470image</A
1471></DT
1472><DT
1473>2-1. <A
1474HREF="r3735.htm#AEN3746"
1475><CODE
1476CLASS="CONSTANT"
1477>V4L2_PIX_FMT_SBGGR8</CODE
1478> 4 &times; 4
1479pixel image</A
1480></DT
1481><DT
1482>2-1. <A
1483HREF="r3796.htm#AEN3809"
1484><CODE
1485CLASS="CONSTANT"
1486>V4L2_PIX_FMT_SBGGR16</CODE
1487> 4 &times; 4
1488pixel image</A
1489></DT
1490><DT
1491>2-1. <A
1492HREF="r4185.htm#AEN4196"
1493><CODE
1494CLASS="CONSTANT"
1495>V4L2_PIX_FMT_GREY</CODE
1496> 4 &times; 4
1497pixel image</A
1498></DT
1499><DT
1500>2-1. <A
1501HREF="r4246.htm#AEN4257"
1502><CODE
1503CLASS="CONSTANT"
1504>V4L2_PIX_FMT_Y16</CODE
1505> 4 &times; 4
1506pixel image</A
1507></DT
1508><DT
1509>2-1. <A
1510HREF="r4339.htm#AEN4351"
1511><CODE
1512CLASS="CONSTANT"
1513>V4L2_PIX_FMT_YUYV</CODE
1514> 4 &times; 4
1515pixel image</A
1516></DT
1517><DT
1518>2-1. <A
1519HREF="r4484.htm#AEN4496"
1520><CODE
1521CLASS="CONSTANT"
1522>V4L2_PIX_FMT_UYVY</CODE
1523> 4 &times; 4
1524pixel image</A
1525></DT
1526><DT
1527>2-1. <A
1528HREF="r4629.htm#AEN4645"
1529><CODE
1530CLASS="CONSTANT"
1531>V4L2_PIX_FMT_Y41P</CODE
1532> 8 &times; 4
1533pixel image</A
1534></DT
1535><DT
1536>2-1. <A
1537HREF="r4850.htm#AEN4871"
1538><CODE
1539CLASS="CONSTANT"
1540>V4L2_PIX_FMT_YVU420</CODE
1541> 4 &times; 4
1542pixel image</A
1543></DT
1544><DT
1545>2-1. <A
1546HREF="r5016.htm#AEN5032"
1547><CODE
1548CLASS="CONSTANT"
1549>V4L2_PIX_FMT_YVU410</CODE
1550> 4 &times; 4
1551pixel image</A
1552></DT
1553><DT
1554>2-1. <A
1555HREF="r5154.htm#AEN5170"
1556><CODE
1557CLASS="CONSTANT"
1558>V4L2_PIX_FMT_YUV422P</CODE
1559> 4 &times; 4
1560pixel image</A
1561></DT
1562><DT
1563>2-1. <A
1564HREF="r5319.htm#AEN5337"
1565><CODE
1566CLASS="CONSTANT"
1567>V4L2_PIX_FMT_YUV411P</CODE
1568> 4 &times; 4
1569pixel image</A
1570></DT
1571><DT
1572>2-1. <A
1573HREF="r5470.htm#AEN5493"
1574><CODE
1575CLASS="CONSTANT"
1576>V4L2_PIX_FMT_NV12</CODE
1577> 4 &times; 4
1578pixel image</A
1579></DT
1580><DT
1581>3-1. <A
1582HREF="x5791.htm#AEN5823"
1583>Mapping buffers</A
1584></DT
1585><DT
1586>3-2. <A
1587HREF="x5884.htm#AEN5899"
1588>Initiating streaming I/O with user pointers</A
1589></DT
1590><DT
1591>4-1. <A
1592HREF="x6909.htm#AEN6949"
1593>Finding a framebuffer device for OSD</A
1594></DT
1595></DL
1596></DIV
1597></DIV
1598><DIV
1599CLASS="NAVFOOTER"
1600><HR
1601ALIGN="LEFT"
1602WIDTH="100%"><TABLE
1603SUMMARY="Footer navigation table"
1604WIDTH="100%"
1605BORDER="0"
1606CELLPADDING="0"
1607CELLSPACING="0"
1608><TR
1609><TD
1610WIDTH="33%"
1611ALIGN="left"
1612VALIGN="top"
1613>&nbsp;</TD
1614><TD
1615WIDTH="34%"
1616ALIGN="center"
1617VALIGN="top"
1618>&nbsp;</TD
1619><TD
1620WIDTH="33%"
1621ALIGN="right"
1622VALIGN="top"
1623><A
1624HREF="f163.htm"
1625ACCESSKEY="N"
1626>Next</A
1627></TD
1628></TR
1629><TR
1630><TD
1631WIDTH="33%"
1632ALIGN="left"
1633VALIGN="top"
1634>&nbsp;</TD
1635><TD
1636WIDTH="34%"
1637ALIGN="center"
1638VALIGN="top"
1639>&nbsp;</TD
1640><TD
1641WIDTH="33%"
1642ALIGN="right"
1643VALIGN="top"
1644>Introduction</TD
1645></TR
1646></TABLE
1647></DIV
1648></BODY
1649></HTML
1650>
1651