• 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 Header File</TITLE
6><META
7NAME="GENERATOR"
8CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK
9REL="HOME"
10TITLE="Video for Linux Two API Specification"
11HREF="book1.htm"><LINK
12REL="PREVIOUS"
13TITLE="Obsolete API Elements"
14HREF="x16497.htm"><LINK
15REL="NEXT"
16TITLE="Video Capture Example"
17HREF="a16706.htm"></HEAD
18><BODY
19CLASS="APPENDIX"
20BGCOLOR="#FFFFFF"
21TEXT="#000000"
22LINK="#0000FF"
23VLINK="#840084"
24ALINK="#0000FF"
25><DIV
26CLASS="NAVHEADER"
27><TABLE
28SUMMARY="Header navigation table"
29WIDTH="100%"
30BORDER="0"
31CELLPADDING="0"
32CELLSPACING="0"
33><TR
34><TH
35COLSPAN="3"
36ALIGN="center"
37>Video for Linux Two API Specification: Revision 0.24</TH
38></TR
39><TR
40><TD
41WIDTH="10%"
42ALIGN="left"
43VALIGN="bottom"
44><A
45HREF="x16497.htm"
46ACCESSKEY="P"
47>Prev</A
48></TD
49><TD
50WIDTH="80%"
51ALIGN="center"
52VALIGN="bottom"
53></TD
54><TD
55WIDTH="10%"
56ALIGN="right"
57VALIGN="bottom"
58><A
59HREF="a16706.htm"
60ACCESSKEY="N"
61>Next</A
62></TD
63></TR
64></TABLE
65><HR
66ALIGN="LEFT"
67WIDTH="100%"></DIV
68><DIV
69CLASS="APPENDIX"
70><H1
71><A
72NAME="VIDEODEV"
73></A
74>Appendix A. Video For Linux Two Header File</H1
75><PRE
76CLASS="PROGRAMLISTING"
77>/*
78 *  Video for Linux Two header file
79 *
80 *  Copyright (C) 1999-2007 the contributors
81 *
82 *  This program is free software; you can redistribute it and/or modify
83 *  it under the terms of the GNU General Public License as published by
84 *  the Free Software Foundation; either version 2 of the License, or
85 *  (at your option) any later version.
86 *
87 *  This program is distributed in the hope that it will be useful,
88 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
89 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
90 *  GNU General Public License for more details.
91 *
92 *  Alternatively you can redistribute this file under the terms of the
93 *  BSD license as stated below:
94 *
95 *  Redistribution and use in source and binary forms, with or without
96 *  modification, are permitted provided that the following conditions
97 *  are met:
98 *  1. Redistributions of source code must retain the above copyright
99 *     notice, this list of conditions and the following disclaimer.
100 *  2. Redistributions in binary form must reproduce the above copyright
101 *     notice, this list of conditions and the following disclaimer in
102 *     the documentation and/or other materials provided with the
103 *     distribution.
104 *  3. The names of its contributors may not be used to endorse or promote
105 *     products derived from this software without specific prior written
106 *     permission.
107 *
108 *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
109 *  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
110 *  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
111 *  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
112 *  OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
113 *  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
114 *  TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
115 *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
116 *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
117 *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
118 *  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
119 *
120 *      Header file for v4l or V4L2 drivers and applications
121 * with public API.
122 * All kernel-specific stuff were moved to media/v4l2-dev.h, so
123 * no #if __KERNEL tests are allowed here
124 *
125 *      See http://linuxtv.org for more info
126 *
127 *      Author: Bill Dirks &lt;bill@thedirks.org&gt;
128 *              Justin Schoeman
129 *              Hans Verkuil &lt;hverkuil@xs4all.nl&gt;
130 *              et al.
131 */
132#ifndef __LINUX_VIDEODEV2_H
133#define __LINUX_VIDEODEV2_H
134#ifdef __KERNEL__
135#include &lt;linux/time.h&gt;     /* need struct timeval */
136#include &lt;linux/compiler.h&gt; /* need __user */
137#else
138#define __user
139#include &lt;sys/time.h&gt;
140#endif
141#include &lt;linux/ioctl.h&gt;
142#include &lt;linux/types.h&gt;
143
144/*
145 * Common stuff for both V4L1 and V4L2
146 * Moved from videodev.h
147 */
148#define VIDEO_MAX_FRAME               32
149
150#define VID_TYPE_CAPTURE        1       /* Can capture */
151#define VID_TYPE_TUNER          2       /* Can tune */
152#define VID_TYPE_TELETEXT       4       /* Does teletext */
153#define VID_TYPE_OVERLAY        8       /* Overlay onto frame buffer */
154#define VID_TYPE_CHROMAKEY      16      /* Overlay by chromakey */
155#define VID_TYPE_CLIPPING       32      /* Can clip */
156#define VID_TYPE_FRAMERAM       64      /* Uses the frame buffer memory */
157#define VID_TYPE_SCALES         128     /* Scalable */
158#define VID_TYPE_MONOCHROME     256     /* Monochrome only */
159#define VID_TYPE_SUBCAPTURE     512     /* Can capture subareas of the image */
160#define VID_TYPE_MPEG_DECODER   1024    /* Can decode MPEG streams */
161#define VID_TYPE_MPEG_ENCODER   2048    /* Can encode MPEG streams */
162#define VID_TYPE_MJPEG_DECODER  4096    /* Can decode MJPEG streams */
163#define VID_TYPE_MJPEG_ENCODER  8192    /* Can encode MJPEG streams */
164
165/*
166 *      M I S C E L L A N E O U S
167 */
168
169/*  Four-character-code (FOURCC) */
170#define v4l2_fourcc(a,b,c,d)\
171        (((__u32)(a)&lt;&lt;0)|((__u32)(b)&lt;&lt;8)|((__u32)(c)&lt;&lt;16)|((__u32)(d)&lt;&lt;24))
172
173/*
174 *      E N U M S
175 */
176enum <A
177HREF="x6386.htm#V4L2-FIELD"
178>v4l2_field</A
179> {
180        V4L2_FIELD_ANY           = 0, /* driver can choose from none,
181                                         top, bottom, interlaced
182                                         depending on whatever it thinks
183                                         is approximate ... */
184        V4L2_FIELD_NONE          = 1, /* this device has no fields ... */
185        V4L2_FIELD_TOP           = 2, /* top field only */
186        V4L2_FIELD_BOTTOM        = 3, /* bottom field only */
187        V4L2_FIELD_INTERLACED    = 4, /* both fields interlaced */
188        V4L2_FIELD_SEQ_TB        = 5, /* both fields sequential into one
189                                         buffer, top-bottom order */
190        V4L2_FIELD_SEQ_BT        = 6, /* same as above + bottom-top order */
191        V4L2_FIELD_ALTERNATE     = 7, /* both fields alternating into
192                                         separate buffers */
193        V4L2_FIELD_INTERLACED_TB = 8, /* both fields interlaced, top field
194                                         first and the top field is
195                                         transmitted first */
196        V4L2_FIELD_INTERLACED_BT = 9, /* both fields interlaced, top field
197                                         first and the bottom field is
198                                         transmitted first */
199};
200#define V4L2_FIELD_HAS_TOP(field)       \
201        ((field) == V4L2_FIELD_TOP      ||\
202         (field) == V4L2_FIELD_INTERLACED ||\
203         (field) == V4L2_FIELD_INTERLACED_TB ||\
204         (field) == V4L2_FIELD_INTERLACED_BT ||\
205         (field) == V4L2_FIELD_SEQ_TB   ||\
206         (field) == V4L2_FIELD_SEQ_BT)
207#define V4L2_FIELD_HAS_BOTTOM(field)    \
208        ((field) == V4L2_FIELD_BOTTOM   ||\
209         (field) == V4L2_FIELD_INTERLACED ||\
210         (field) == V4L2_FIELD_INTERLACED_TB ||\
211         (field) == V4L2_FIELD_INTERLACED_BT ||\
212         (field) == V4L2_FIELD_SEQ_TB   ||\
213         (field) == V4L2_FIELD_SEQ_BT)
214#define V4L2_FIELD_HAS_BOTH(field)      \
215        ((field) == V4L2_FIELD_INTERLACED ||\
216         (field) == V4L2_FIELD_INTERLACED_TB ||\
217         (field) == V4L2_FIELD_INTERLACED_BT ||\
218         (field) == V4L2_FIELD_SEQ_TB ||\
219         (field) == V4L2_FIELD_SEQ_BT)
220
221enum <A
222HREF="x5953.htm#V4L2-BUF-TYPE"
223>v4l2_buf_type</A
224> {
225        V4L2_BUF_TYPE_VIDEO_CAPTURE        = 1,
226        V4L2_BUF_TYPE_VIDEO_OUTPUT         = 2,
227        V4L2_BUF_TYPE_VIDEO_OVERLAY        = 3,
228        V4L2_BUF_TYPE_VBI_CAPTURE          = 4,
229        V4L2_BUF_TYPE_VBI_OUTPUT           = 5,
230        V4L2_BUF_TYPE_SLICED_VBI_CAPTURE   = 6,
231        V4L2_BUF_TYPE_SLICED_VBI_OUTPUT    = 7,
232#if 1 /*KEEP*/
233        /* Experimental */
234        V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY = 8,
235#endif
236        V4L2_BUF_TYPE_PRIVATE              = 0x80,
237};
238
239enum <A
240HREF="r13317.htm#V4L2-CTRL-TYPE"
241>v4l2_ctrl_type</A
242> {
243        V4L2_CTRL_TYPE_INTEGER       = 1,
244        V4L2_CTRL_TYPE_BOOLEAN       = 2,
245        V4L2_CTRL_TYPE_MENU          = 3,
246        V4L2_CTRL_TYPE_BUTTON        = 4,
247        V4L2_CTRL_TYPE_INTEGER64     = 5,
248        V4L2_CTRL_TYPE_CTRL_CLASS    = 6,
249};
250
251enum <A
252HREF="r12342.htm#V4L2-TUNER-TYPE"
253>v4l2_tuner_type</A
254> {
255        V4L2_TUNER_RADIO             = 1,
256        V4L2_TUNER_ANALOG_TV         = 2,
257        V4L2_TUNER_DIGITAL_TV        = 3,
258};
259
260enum <A
261HREF="x5953.htm#V4L2-MEMORY"
262>v4l2_memory</A
263> {
264        V4L2_MEMORY_MMAP             = 1,
265        V4L2_MEMORY_USERPTR          = 2,
266        V4L2_MEMORY_OVERLAY          = 3,
267};
268
269/* see also http://vektor.theorem.ca/graphics/ycbcr/ */
270enum <A
271HREF="x2123.htm#V4L2-COLORSPACE"
272>v4l2_colorspace</A
273> {
274        /* ITU-R 601 -- broadcast NTSC/PAL */
275        V4L2_COLORSPACE_SMPTE170M     = 1,
276
277        /* 1125-Line (US) HDTV */
278        V4L2_COLORSPACE_SMPTE240M     = 2,
279
280        /* HD and modern captures. */
281        V4L2_COLORSPACE_REC709        = 3,
282
283        /* broken BT878 extents (601, luma range 16-253 instead of 16-235) */
284        V4L2_COLORSPACE_BT878         = 4,
285
286        /* These should be useful.  Assume 601 extents. */
287        V4L2_COLORSPACE_470_SYSTEM_M  = 5,
288        V4L2_COLORSPACE_470_SYSTEM_BG = 6,
289
290        /* I know there will be cameras that send this.  So, this is
291         * unspecified chromaticities and full 0-255 on each of the
292         * Y'CbCr components
293         */
294        V4L2_COLORSPACE_JPEG          = 7,
295
296        /* For RGB colourspaces, this is probably a good start. */
297        V4L2_COLORSPACE_SRGB          = 8,
298};
299
300enum <A
301HREF="r11946.htm#V4L2-PRIORITY"
302>v4l2_priority</A
303> {
304        V4L2_PRIORITY_UNSET       = 0,  /* not initialized */
305        V4L2_PRIORITY_BACKGROUND  = 1,
306        V4L2_PRIORITY_INTERACTIVE = 2,
307        V4L2_PRIORITY_RECORD      = 3,
308        V4L2_PRIORITY_DEFAULT     = V4L2_PRIORITY_INTERACTIVE,
309};
310
311struct <A
312HREF="x6570.htm#V4L2-RECT"
313>v4l2_rect</A
314> {
315        __s32   left;
316        __s32   top;
317        __s32   width;
318        __s32   height;
319};
320
321struct <A
322HREF="r9288.htm#V4L2-FRACT"
323>v4l2_fract</A
324> {
325        __u32   numerator;
326        __u32   denominator;
327};
328
329/*
330 *      D R I V E R   C A P A B I L I T I E S
331 */
332struct <A
333HREF="r13105.htm#V4L2-CAPABILITY"
334>v4l2_capability</A
335>
336{
337        __u8    driver[16];     /* i.e.ie; "bttv" */
338        __u8    card[32];       /* i.e.ie; "Hauppauge WinTV" */
339        __u8    bus_info[32];   /* "PCI:" + pci_name(pci_dev) */
340        __u32   version;        /* should use KERNEL_VERSION() */
341        __u32   capabilities;   /* Device capabilities */
342        __u32   reserved[4];
343};
344
345/* Values for 'capabilities' field */
346#define V4L2_CAP_VIDEO_CAPTURE          0x00000001  /* Is a video capture device */
347#define V4L2_CAP_VIDEO_OUTPUT           0x00000002  /* Is a video output device */
348#define V4L2_CAP_VIDEO_OVERLAY          0x00000004  /* Can do video overlay */
349#define V4L2_CAP_VBI_CAPTURE            0x00000010  /* Is a raw VBI capture device */
350#define V4L2_CAP_VBI_OUTPUT             0x00000020  /* Is a raw VBI output device */
351#define V4L2_CAP_SLICED_VBI_CAPTURE     0x00000040  /* Is a sliced VBI capture device */
352#define V4L2_CAP_SLICED_VBI_OUTPUT      0x00000080  /* Is a sliced VBI output device */
353#define V4L2_CAP_RDS_CAPTURE            0x00000100  /* RDS data capture */
354#define V4L2_CAP_VIDEO_OUTPUT_OVERLAY   0x00000200  /* Can do video output overlay */
355
356#define V4L2_CAP_TUNER                  0x00010000  /* has a tuner */
357#define V4L2_CAP_AUDIO                  0x00020000  /* has audio support */
358#define V4L2_CAP_RADIO                  0x00040000  /* is a radio device */
359
360#define V4L2_CAP_READWRITE              0x01000000  /* read/write systemcalls */
361#define V4L2_CAP_ASYNCIO                0x02000000  /* async I/O */
362#define V4L2_CAP_STREAMING              0x04000000  /* streaming I/O ioctls */
363
364/*
365 *      V I D E O   I M A G E   F O R M A T
366 */
367struct <A
368HREF="c2030.htm#V4L2-PIX-FORMAT"
369>v4l2_pix_format</A
370>
371{
372        __u32                   width;
373        __u32                   height;
374        __u32                   pixelformat;
375        enum <A
376HREF="x6386.htm#V4L2-FIELD"
377>v4l2_field</A
378>         field;
379        __u32                   bytesperline;   /* for padding, zero if unused */
380        __u32                   sizeimage;
381        enum <A
382HREF="x2123.htm#V4L2-COLORSPACE"
383>v4l2_colorspace</A
384>    colorspace;
385        __u32                   priv;           /* private data, depends on pixelformat */
386};
387
388/*      Pixel format         FOURCC                        depth  Description  */
389#define <A
390HREF="r2492.htm#V4L2-PIX-FMT-RGB332"
391>V4L2_PIX_FMT_RGB332</A
392>  v4l2_fourcc('R','G','B','1') /*  8  RGB-3-3-2     */
393#define <A
394HREF="r2492.htm#V4L2-PIX-FMT-RGB444"
395>V4L2_PIX_FMT_RGB444</A
396>  v4l2_fourcc('R','4','4','4') /* 16  xxxxrrrr ggggbbbb */
397#define <A
398HREF="r2492.htm#V4L2-PIX-FMT-RGB555"
399>V4L2_PIX_FMT_RGB555</A
400>  v4l2_fourcc('R','G','B','O') /* 16  RGB-5-5-5     */
401#define <A
402HREF="r2492.htm#V4L2-PIX-FMT-RGB565"
403>V4L2_PIX_FMT_RGB565</A
404>  v4l2_fourcc('R','G','B','P') /* 16  RGB-5-6-5     */
405#define <A
406HREF="r2492.htm#V4L2-PIX-FMT-RGB555X"
407>V4L2_PIX_FMT_RGB555X</A
408> v4l2_fourcc('R','G','B','Q') /* 16  RGB-5-5-5 BE  */
409#define <A
410HREF="r2492.htm#V4L2-PIX-FMT-RGB565X"
411>V4L2_PIX_FMT_RGB565X</A
412> v4l2_fourcc('R','G','B','R') /* 16  RGB-5-6-5 BE  */
413#define <A
414HREF="r2492.htm#V4L2-PIX-FMT-BGR24"
415>V4L2_PIX_FMT_BGR24</A
416>   v4l2_fourcc('B','G','R','3') /* 24  BGR-8-8-8     */
417#define <A
418HREF="r2492.htm#V4L2-PIX-FMT-RGB24"
419>V4L2_PIX_FMT_RGB24</A
420>   v4l2_fourcc('R','G','B','3') /* 24  RGB-8-8-8     */
421#define <A
422HREF="r2492.htm#V4L2-PIX-FMT-BGR32"
423>V4L2_PIX_FMT_BGR32</A
424>   v4l2_fourcc('B','G','R','4') /* 32  BGR-8-8-8-8   */
425#define <A
426HREF="r2492.htm#V4L2-PIX-FMT-RGB32"
427>V4L2_PIX_FMT_RGB32</A
428>   v4l2_fourcc('R','G','B','4') /* 32  RGB-8-8-8-8   */
429#define <A
430HREF="r4185.htm"
431>V4L2_PIX_FMT_GREY</A
432>    v4l2_fourcc('G','R','E','Y') /*  8  Greyscale     */
433#define <A
434HREF="r4246.htm"
435>V4L2_PIX_FMT_Y16</A
436>     v4l2_fourcc('Y','1','6',' ') /* 16  Greyscale     */
437#define <A
438HREF="x2428.htm#V4L2-PIX-FMT-PAL8"
439>V4L2_PIX_FMT_PAL8</A
440>    v4l2_fourcc('P','A','L','8') /*  8  8-bit palette */
441#define <A
442HREF="r5016.htm#V4L2-PIX-FMT-YVU410"
443>V4L2_PIX_FMT_YVU410</A
444>  v4l2_fourcc('Y','V','U','9') /*  9  YVU 4:1:0     */
445#define <A
446HREF="r4850.htm#V4L2-PIX-FMT-YVU420"
447>V4L2_PIX_FMT_YVU420</A
448>  v4l2_fourcc('Y','V','1','2') /* 12  YVU 4:2:0     */
449#define <A
450HREF="r4339.htm"
451>V4L2_PIX_FMT_YUYV</A
452>    v4l2_fourcc('Y','U','Y','V') /* 16  YUV 4:2:2     */
453#define <A
454HREF="r4484.htm"
455>V4L2_PIX_FMT_UYVY</A
456>    v4l2_fourcc('U','Y','V','Y') /* 16  YUV 4:2:2     */
457#define <A
458HREF="r5154.htm"
459>V4L2_PIX_FMT_YUV422P</A
460> v4l2_fourcc('4','2','2','P') /* 16  YVU422 planar */
461#define <A
462HREF="r5319.htm"
463>V4L2_PIX_FMT_YUV411P</A
464> v4l2_fourcc('4','1','1','P') /* 16  YVU411 planar */
465#define <A
466HREF="r4629.htm"
467>V4L2_PIX_FMT_Y41P</A
468>    v4l2_fourcc('Y','4','1','P') /* 12  YUV 4:1:1     */
469#define <A
470HREF="r3896.htm#V4L2-PIX-FMT-YUV444"
471>V4L2_PIX_FMT_YUV444</A
472>  v4l2_fourcc('Y','4','4','4') /* 16  xxxxyyyy uuuuvvvv */
473#define <A
474HREF="r3896.htm#V4L2-PIX-FMT-YUV555"
475>V4L2_PIX_FMT_YUV555</A
476>  v4l2_fourcc('Y','U','V','O') /* 16  YUV-5-5-5     */
477#define <A
478HREF="r3896.htm#V4L2-PIX-FMT-YUV565"
479>V4L2_PIX_FMT_YUV565</A
480>  v4l2_fourcc('Y','U','V','P') /* 16  YUV-5-6-5     */
481#define <A
482HREF="r3896.htm#V4L2-PIX-FMT-YUV32"
483>V4L2_PIX_FMT_YUV32</A
484>   v4l2_fourcc('Y','U','V','4') /* 32  YUV-8-8-8-8   */
485
486/* two planes -- one Y, one Cr + Cb interleaved  */
487#define <A
488HREF="r5470.htm#V4L2-PIX-FMT-NV12"
489>V4L2_PIX_FMT_NV12</A
490>    v4l2_fourcc('N','V','1','2') /* 12  Y/CbCr 4:2:0  */
491#define <A
492HREF="r5470.htm#V4L2-PIX-FMT-NV21"
493>V4L2_PIX_FMT_NV21</A
494>    v4l2_fourcc('N','V','2','1') /* 12  Y/CrCb 4:2:0  */
495
496/*  The following formats are not defined in the V4L2 specification */
497#define <A
498HREF="r5016.htm#V4L2-PIX-FMT-YUV410"
499>V4L2_PIX_FMT_YUV410</A
500>  v4l2_fourcc('Y','U','V','9') /*  9  YUV 4:1:0     */
501#define <A
502HREF="r4850.htm#V4L2-PIX-FMT-YUV420"
503>V4L2_PIX_FMT_YUV420</A
504>  v4l2_fourcc('Y','U','1','2') /* 12  YUV 4:2:0     */
505#define <A
506HREF="x5665.htm#V4L2-PIX-FMT-YYUV"
507>V4L2_PIX_FMT_YYUV</A
508>    v4l2_fourcc('Y','Y','U','V') /* 16  YUV 4:2:2     */
509#define <A
510HREF="x5665.htm#V4L2-PIX-FMT-HI240"
511>V4L2_PIX_FMT_HI240</A
512>   v4l2_fourcc('H','I','2','4') /*  8  8-bit color   */
513#define <A
514HREF="x5665.htm#V4L2-PIX-FMT-HM12"
515>V4L2_PIX_FMT_HM12</A
516>    v4l2_fourcc('H','M','1','2') /*  8  YUV 4:2:0 16x16 macroblocks */
517
518/* see http://www.siliconimaging.com/RGB%20Bayer.htm */
519#define <A
520HREF="r3735.htm"
521>V4L2_PIX_FMT_SBGGR8</A
522>  v4l2_fourcc('B','A','8','1') /*  8  BGBG.. GRGR.. */
523#define <A
524HREF="r3796.htm"
525>V4L2_PIX_FMT_SBGGR16</A
526> v4l2_fourcc('B','Y','R','2') /* 16  BGBG.. GRGR.. */
527
528/* compressed formats */
529#define <A
530HREF="x5665.htm#V4L2-PIX-FMT-MJPEG"
531>V4L2_PIX_FMT_MJPEG</A
532>    v4l2_fourcc('M','J','P','G') /* Motion-JPEG   */
533#define <A
534HREF="x5634.htm#V4L2-PIX-FMT-JPEG"
535>V4L2_PIX_FMT_JPEG</A
536>     v4l2_fourcc('J','P','E','G') /* JFIF JPEG     */
537#define <A
538HREF="x5665.htm#V4L2-PIX-FMT-DV"
539>V4L2_PIX_FMT_DV</A
540>       v4l2_fourcc('d','v','s','d') /* 1394          */
541#define <A
542HREF="x5634.htm#V4L2-PIX-FMT-MPEG"
543>V4L2_PIX_FMT_MPEG</A
544>     v4l2_fourcc('M','P','E','G') /* MPEG-1/2/4    */
545
546/*  Vendor-specific formats   */
547#define <A
548HREF="x5665.htm#V4L2-PIX-FMT-WNVA"
549>V4L2_PIX_FMT_WNVA</A
550>     v4l2_fourcc('W','N','V','A') /* Winnov hw compress */
551#define <A
552HREF="x5665.htm#V4L2-PIX-FMT-SN9C10X"
553>V4L2_PIX_FMT_SN9C10X</A
554>  v4l2_fourcc('S','9','1','0') /* SN9C10x compression */
555#define <A
556HREF="x5665.htm#V4L2-PIX-FMT-PWC1"
557>V4L2_PIX_FMT_PWC1</A
558>     v4l2_fourcc('P','W','C','1') /* pwc older webcam */
559#define <A
560HREF="x5665.htm#V4L2-PIX-FMT-PWC2"
561>V4L2_PIX_FMT_PWC2</A
562>     v4l2_fourcc('P','W','C','2') /* pwc newer webcam */
563#define <A
564HREF="x5665.htm#V4L2-PIX-FMT-ET61X251"
565>V4L2_PIX_FMT_ET61X251</A
566> v4l2_fourcc('E','6','2','5') /* ET61X251 compression */
567
568/*
569 *      F O R M A T   E N U M E R A T I O N
570 */
571struct <A
572HREF="r8367.htm#V4L2-FMTDESC"
573>v4l2_fmtdesc</A
574>
575{
576        __u32               index;             /* Format number      */
577        enum <A
578HREF="x5953.htm#V4L2-BUF-TYPE"
579>v4l2_buf_type</A
580>  type;              /* buffer type        */
581        __u32               flags;
582        __u8                description[32];   /* Description string */
583        __u32               pixelformat;       /* Format fourcc      */
584        __u32               reserved[4];
585};
586
587#define V4L2_FMT_FLAG_COMPRESSED 0x0001
588
589#if 1 /*KEEP*/
590        /* Experimental Frame Size and frame rate enumeration */
591/*
592 *      F R A M E   S I Z E   E N U M E R A T I O N
593 */
594enum <A
595HREF="r8494.htm#V4L2-FRMSIZETYPES"
596>v4l2_frmsizetypes</A
597>
598{
599        V4L2_FRMSIZE_TYPE_DISCRETE      = 1,
600        V4L2_FRMSIZE_TYPE_CONTINUOUS    = 2,
601        V4L2_FRMSIZE_TYPE_STEPWISE      = 3,
602};
603
604struct <A
605HREF="r8494.htm#V4L2-FRMSIZE-DISCRETE"
606>v4l2_frmsize_discrete</A
607>
608{
609        __u32                   width;          /* Frame width [pixel] */
610        __u32                   height;         /* Frame height [pixel] */
611};
612
613struct <A
614HREF="r8494.htm#V4L2-FRMSIZE-STEPWISE"
615>v4l2_frmsize_stepwise</A
616>
617{
618        __u32                   min_width;      /* Minimum frame width [pixel] */
619        __u32                   max_width;      /* Maximum frame width [pixel] */
620        __u32                   step_width;     /* Frame width step size [pixel] */
621        __u32                   min_height;     /* Minimum frame height [pixel] */
622        __u32                   max_height;     /* Maximum frame height [pixel] */
623        __u32                   step_height;    /* Frame height step size [pixel] */
624};
625
626struct <A
627HREF="r8494.htm#V4L2-FRMSIZEENUM"
628>v4l2_frmsizeenum</A
629>
630{
631        __u32                   index;          /* Frame size number */
632        __u32                   pixel_format;   /* Pixel format */
633        __u32                   type;           /* Frame size type the device supports. */
634
635        union {                                 /* Frame size */
636                struct <A
637HREF="r8494.htm#V4L2-FRMSIZE-DISCRETE"
638>v4l2_frmsize_discrete</A
639>    discrete;
640                struct <A
641HREF="r8494.htm#V4L2-FRMSIZE-STEPWISE"
642>v4l2_frmsize_stepwise</A
643>    stepwise;
644        };
645
646        __u32   reserved[2];                    /* Reserved space for future use */
647};
648
649/*
650 *      F R A M E   R A T E   E N U M E R A T I O N
651 */
652enum <A
653HREF="r8724.htm#V4L2-FRMIVALTYPES"
654>v4l2_frmivaltypes</A
655>
656{
657        V4L2_FRMIVAL_TYPE_DISCRETE      = 1,
658        V4L2_FRMIVAL_TYPE_CONTINUOUS    = 2,
659        V4L2_FRMIVAL_TYPE_STEPWISE      = 3,
660};
661
662struct <A
663HREF="r8724.htm#V4L2-FRMIVAL-STEPWISE"
664>v4l2_frmival_stepwise</A
665>
666{
667        struct <A
668HREF="r9288.htm#V4L2-FRACT"
669>v4l2_fract</A
670>       min;            /* Minimum frame interval [s] */
671        struct <A
672HREF="r9288.htm#V4L2-FRACT"
673>v4l2_fract</A
674>       max;            /* Maximum frame interval [s] */
675        struct <A
676HREF="r9288.htm#V4L2-FRACT"
677>v4l2_fract</A
678>       step;           /* Frame interval step size [s] */
679};
680
681struct <A
682HREF="r8724.htm#V4L2-FRMIVALENUM"
683>v4l2_frmivalenum</A
684>
685{
686        __u32                   index;          /* Frame format index */
687        __u32                   pixel_format;   /* Pixel format */
688        __u32                   width;          /* Frame width */
689        __u32                   height;         /* Frame height */
690        __u32                   type;           /* Frame interval type the device supports. */
691
692        union {                                 /* Frame interval */
693                struct <A
694HREF="r9288.htm#V4L2-FRACT"
695>v4l2_fract</A
696>               discrete;
697                struct <A
698HREF="r8724.htm#V4L2-FRMIVAL-STEPWISE"
699>v4l2_frmival_stepwise</A
700>    stepwise;
701        };
702
703        __u32   reserved[2];                    /* Reserved space for future use */
704};
705#endif
706
707/*
708 *      T I M E C O D E
709 */
710struct <A
711HREF="x5953.htm#V4L2-TIMECODE"
712>v4l2_timecode</A
713>
714{
715        __u32   type;
716        __u32   flags;
717        __u8    frames;
718        __u8    seconds;
719        __u8    minutes;
720        __u8    hours;
721        __u8    userbits[4];
722};
723
724/*  Type  */
725#define V4L2_TC_TYPE_24FPS              1
726#define V4L2_TC_TYPE_25FPS              2
727#define V4L2_TC_TYPE_30FPS              3
728#define V4L2_TC_TYPE_50FPS              4
729#define V4L2_TC_TYPE_60FPS              5
730
731/*  Flags  */
732#define V4L2_TC_FLAG_DROPFRAME          0x0001 /* "drop-frame" mode */
733#define V4L2_TC_FLAG_COLORFRAME         0x0002
734#define V4L2_TC_USERBITS_field          0x000C
735#define V4L2_TC_USERBITS_USERDEFINED    0x0000
736#define V4L2_TC_USERBITS_8BITCHARS      0x0008
737/* The above is based on SMPTE timecodes */
738
739struct <A
740HREF="r11285.htm#V4L2-JPEGCOMPRESSION"
741>v4l2_jpegcompression</A
742>
743{
744        int quality;
745
746        int  APPn;              /* Number of APP segment to be written,
747                                 * must be 0..15 */
748        int  APP_len;           /* Length of data in JPEG APPn segment */
749        char APP_data[60];      /* Data in the JPEG APPn segment. */
750
751        int  COM_len;           /* Length of data in JPEG COM segment */
752        char COM_data[60];      /* Data in JPEG COM segment */
753
754        __u32 jpeg_markers;     /* Which markers should go into the JPEG
755                                 * output. Unless you exactly know what
756                                 * you do, leave them untouched.
757                                 * Inluding less markers will make the
758                                 * resulting code smaller, but there will
759                                 * be fewer aplications which can read it.
760                                 * The presence of the APP and COM marker
761                                 * is influenced by APP_len and COM_len
762                                 * ONLY, not by this property! */
763
764#define V4L2_JPEG_MARKER_DHT (1&lt;&lt;3)    /* Define Huffman Tables */
765#define V4L2_JPEG_MARKER_DQT (1&lt;&lt;4)    /* Define Quantization Tables */
766#define V4L2_JPEG_MARKER_DRI (1&lt;&lt;5)    /* Define Restart Interval */
767#define V4L2_JPEG_MARKER_COM (1&lt;&lt;6)    /* Comment segment */
768#define V4L2_JPEG_MARKER_APP (1&lt;&lt;7)    /* App segment, driver will
769                                        * allways use APP0 */
770};
771
772/*
773 *      M E M O R Y - M A P P I N G   B U F F E R S
774 */
775struct <A
776HREF="r13696.htm#V4L2-REQUESTBUFFERS"
777>v4l2_requestbuffers</A
778>
779{
780        __u32                   count;
781        enum <A
782HREF="x5953.htm#V4L2-BUF-TYPE"
783>v4l2_buf_type</A
784>      type;
785        enum <A
786HREF="x5953.htm#V4L2-MEMORY"
787>v4l2_memory</A
788>        memory;
789        __u32                   reserved[2];
790};
791
792struct <A
793HREF="x5953.htm#V4L2-BUFFER"
794>v4l2_buffer</A
795>
796{
797        __u32                   index;
798        enum <A
799HREF="x5953.htm#V4L2-BUF-TYPE"
800>v4l2_buf_type</A
801>      type;
802        __u32                   bytesused;
803        __u32                   flags;
804        enum <A
805HREF="x6386.htm#V4L2-FIELD"
806>v4l2_field</A
807>         field;
808        struct timeval          timestamp;
809        struct <A
810HREF="x5953.htm#V4L2-TIMECODE"
811>v4l2_timecode</A
812>    timecode;
813        __u32                   sequence;
814
815        /* memory location */
816        enum <A
817HREF="x5953.htm#V4L2-MEMORY"
818>v4l2_memory</A
819>        memory;
820        union {
821                __u32           offset;
822                unsigned long   userptr;
823        } m;
824        __u32                   length;
825        __u32                   input;
826        __u32                   reserved;
827};
828
829/*  Flags for 'flags' field */
830#define V4L2_BUF_FLAG_MAPPED    0x0001  /* Buffer is mapped (flag) */
831#define V4L2_BUF_FLAG_QUEUED    0x0002  /* Buffer is queued for processing */
832#define V4L2_BUF_FLAG_DONE      0x0004  /* Buffer is ready */
833#define V4L2_BUF_FLAG_KEYFRAME  0x0008  /* Image is a keyframe (I-frame) */
834#define V4L2_BUF_FLAG_PFRAME    0x0010  /* Image is a P-frame */
835#define V4L2_BUF_FLAG_BFRAME    0x0020  /* Image is a B-frame */
836#define V4L2_BUF_FLAG_TIMECODE  0x0100  /* timecode field is valid */
837#define V4L2_BUF_FLAG_INPUT     0x0200  /* input field is valid */
838
839/*
840 *      O V E R L A Y   P R E V I E W
841 */
842struct <A
843HREF="r10595.htm#V4L2-FRAMEBUFFER"
844>v4l2_framebuffer</A
845>
846{
847        __u32                   capability;
848        __u32                   flags;
849/* FIXME: in theory we should pass something like PCI device + memory
850 * region + offset instead of some physical address */
851        void*                   base;
852        struct <A
853HREF="c2030.htm#V4L2-PIX-FORMAT"
854>v4l2_pix_format</A
855>  fmt;
856};
857/*  Flags for the 'capability' field. Read only */
858#define V4L2_FBUF_CAP_EXTERNOVERLAY     0x0001
859#define V4L2_FBUF_CAP_CHROMAKEY         0x0002
860#define V4L2_FBUF_CAP_LIST_CLIPPING     0x0004
861#define V4L2_FBUF_CAP_BITMAP_CLIPPING   0x0008
862#define V4L2_FBUF_CAP_LOCAL_ALPHA       0x0010
863#define V4L2_FBUF_CAP_GLOBAL_ALPHA      0x0020
864#define V4L2_FBUF_CAP_LOCAL_INV_ALPHA   0x0040
865/*  Flags for the 'flags' field. */
866#define V4L2_FBUF_FLAG_PRIMARY          0x0001
867#define V4L2_FBUF_FLAG_OVERLAY          0x0002
868#define V4L2_FBUF_FLAG_CHROMAKEY        0x0004
869#define V4L2_FBUF_FLAG_LOCAL_ALPHA      0x0008
870#define V4L2_FBUF_FLAG_GLOBAL_ALPHA     0x0010
871#define V4L2_FBUF_FLAG_LOCAL_INV_ALPHA  0x0020
872
873struct <A
874HREF="x6570.htm#V4L2-CLIP"
875>v4l2_clip</A
876>
877{
878        struct <A
879HREF="x6570.htm#V4L2-RECT"
880>v4l2_rect</A
881>        c;
882        struct <A
883HREF="x6570.htm#V4L2-CLIP"
884>v4l2_clip</A
885>        __user *next;
886};
887
888struct <A
889HREF="x6570.htm#V4L2-WINDOW"
890>v4l2_window</A
891>
892{
893        struct <A
894HREF="x6570.htm#V4L2-RECT"
895>v4l2_rect</A
896>        w;
897        enum <A
898HREF="x6386.htm#V4L2-FIELD"
899>v4l2_field</A
900>         field;
901        __u32                   chromakey;
902        struct <A
903HREF="x6570.htm#V4L2-CLIP"
904>v4l2_clip</A
905>        __user *clips;
906        __u32                   clipcount;
907        void                    __user *bitmap;
908        __u8                    global_alpha;
909};
910
911/*
912 *      C A P T U R E   P A R A M E T E R S
913 */
914struct <A
915HREF="r11680.htm#V4L2-CAPTUREPARM"
916>v4l2_captureparm</A
917>
918{
919        __u32              capability;    /*  Supported modes */
920        __u32              capturemode;   /*  Current mode */
921        struct <A
922HREF="r9288.htm#V4L2-FRACT"
923>v4l2_fract</A
924>  timeperframe;  /*  Time per frame in .1us units */
925        __u32              extendedmode;  /*  Driver-specific extensions */
926        __u32              readbuffers;   /*  # of buffers for read */
927        __u32              reserved[4];
928};
929
930/*  Flags for 'capability' and 'capturemode' fields */
931#define V4L2_MODE_HIGHQUALITY   0x0001  /*  High quality imaging mode */
932#define V4L2_CAP_TIMEPERFRAME   0x1000  /*  timeperframe field is supported */
933
934struct <A
935HREF="r11680.htm#V4L2-OUTPUTPARM"
936>v4l2_outputparm</A
937>
938{
939        __u32              capability;   /*  Supported modes */
940        __u32              outputmode;   /*  Current mode */
941        struct <A
942HREF="r9288.htm#V4L2-FRACT"
943>v4l2_fract</A
944>  timeperframe; /*  Time per frame in seconds */
945        __u32              extendedmode; /*  Driver-specific extensions */
946        __u32              writebuffers; /*  # of buffers for write */
947        __u32              reserved[4];
948};
949
950/*
951 *      I N P U T   I M A G E   C R O P P I N G
952 */
953struct <A
954HREF="r7771.htm#V4L2-CROPCAP"
955>v4l2_cropcap</A
956> {
957        enum <A
958HREF="x5953.htm#V4L2-BUF-TYPE"
959>v4l2_buf_type</A
960>      type;
961        struct <A
962HREF="x6570.htm#V4L2-RECT"
963>v4l2_rect</A
964>        bounds;
965        struct <A
966HREF="x6570.htm#V4L2-RECT"
967>v4l2_rect</A
968>        defrect;
969        struct <A
970HREF="r9288.htm#V4L2-FRACT"
971>v4l2_fract</A
972>       pixelaspect;
973};
974
975struct <A
976HREF="r9994.htm#V4L2-CROP"
977>v4l2_crop</A
978> {
979        enum <A
980HREF="x5953.htm#V4L2-BUF-TYPE"
981>v4l2_buf_type</A
982>      type;
983        struct <A
984HREF="x6570.htm#V4L2-RECT"
985>v4l2_rect</A
986>        c;
987};
988
989/*
990 *      A N A L O G   V I D E O   S T A N D A R D
991 */
992
993typedef __u64 v4l2_std_id;
994
995/* one bit for each */
996#define V4L2_STD_PAL_B          ((v4l2_std_id)0x00000001)
997#define V4L2_STD_PAL_B1         ((v4l2_std_id)0x00000002)
998#define V4L2_STD_PAL_G          ((v4l2_std_id)0x00000004)
999#define V4L2_STD_PAL_H          ((v4l2_std_id)0x00000008)
1000#define V4L2_STD_PAL_I          ((v4l2_std_id)0x00000010)
1001#define V4L2_STD_PAL_D          ((v4l2_std_id)0x00000020)
1002#define V4L2_STD_PAL_D1         ((v4l2_std_id)0x00000040)
1003#define V4L2_STD_PAL_K          ((v4l2_std_id)0x00000080)
1004
1005#define V4L2_STD_PAL_M          ((v4l2_std_id)0x00000100)
1006#define V4L2_STD_PAL_N          ((v4l2_std_id)0x00000200)
1007#define V4L2_STD_PAL_Nc         ((v4l2_std_id)0x00000400)
1008#define V4L2_STD_PAL_60         ((v4l2_std_id)0x00000800)
1009
1010#define V4L2_STD_NTSC_M         ((v4l2_std_id)0x00001000)
1011#define V4L2_STD_NTSC_M_JP      ((v4l2_std_id)0x00002000)
1012#define V4L2_STD_NTSC_443       ((v4l2_std_id)0x00004000)
1013#define V4L2_STD_NTSC_M_KR      ((v4l2_std_id)0x00008000)
1014
1015#define V4L2_STD_SECAM_B        ((v4l2_std_id)0x00010000)
1016#define V4L2_STD_SECAM_D        ((v4l2_std_id)0x00020000)
1017#define V4L2_STD_SECAM_G        ((v4l2_std_id)0x00040000)
1018#define V4L2_STD_SECAM_H        ((v4l2_std_id)0x00080000)
1019#define V4L2_STD_SECAM_K        ((v4l2_std_id)0x00100000)
1020#define V4L2_STD_SECAM_K1       ((v4l2_std_id)0x00200000)
1021#define V4L2_STD_SECAM_L        ((v4l2_std_id)0x00400000)
1022#define V4L2_STD_SECAM_LC       ((v4l2_std_id)0x00800000)
1023
1024/* ATSC/HDTV */
1025#define V4L2_STD_ATSC_8_VSB     ((v4l2_std_id)0x01000000)
1026#define V4L2_STD_ATSC_16_VSB    ((v4l2_std_id)0x02000000)
1027
1028/* FIXME:
1029   Although std_id is 64 bits, there is an issue on PPC32 architecture that
1030   makes switch(__u64) to break. So, there's a hack on v4l2-common.c rounding
1031   this value to 32 bits.
1032   As, currently, the max value is for V4L2_STD_ATSC_16_VSB (30 bits wide),
1033   it should work fine. However, if needed to add more than two standards,
1034   v4l2-common.c should be fixed.
1035 */
1036
1037/* some merged standards */
1038#define V4L2_STD_MN     (V4L2_STD_PAL_M|V4L2_STD_PAL_N|V4L2_STD_PAL_Nc|V4L2_STD_NTSC)
1039#define V4L2_STD_B      (V4L2_STD_PAL_B|V4L2_STD_PAL_B1|V4L2_STD_SECAM_B)
1040#define V4L2_STD_GH     (V4L2_STD_PAL_G|V4L2_STD_PAL_H|V4L2_STD_SECAM_G|V4L2_STD_SECAM_H)
1041#define V4L2_STD_DK     (V4L2_STD_PAL_DK|V4L2_STD_SECAM_DK)
1042
1043/* some common needed stuff */
1044#define V4L2_STD_PAL_BG         (V4L2_STD_PAL_B         |\
1045                                 V4L2_STD_PAL_B1        |\
1046                                 V4L2_STD_PAL_G)
1047#define V4L2_STD_PAL_DK         (V4L2_STD_PAL_D         |\
1048                                 V4L2_STD_PAL_D1        |\
1049                                 V4L2_STD_PAL_K)
1050#define V4L2_STD_PAL            (V4L2_STD_PAL_BG        |\
1051                                 V4L2_STD_PAL_DK        |\
1052                                 V4L2_STD_PAL_H         |\
1053                                 V4L2_STD_PAL_I)
1054#define V4L2_STD_NTSC           (V4L2_STD_NTSC_M        |\
1055                                 V4L2_STD_NTSC_M_JP     |\
1056                                 V4L2_STD_NTSC_M_KR)
1057#define V4L2_STD_SECAM_DK       (V4L2_STD_SECAM_D       |\
1058                                 V4L2_STD_SECAM_K       |\
1059                                 V4L2_STD_SECAM_K1)
1060#define V4L2_STD_SECAM          (V4L2_STD_SECAM_B       |\
1061                                 V4L2_STD_SECAM_G       |\
1062                                 V4L2_STD_SECAM_H       |\
1063                                 V4L2_STD_SECAM_DK      |\
1064                                 V4L2_STD_SECAM_L       |\
1065                                 V4L2_STD_SECAM_LC)
1066
1067#define V4L2_STD_525_60         (V4L2_STD_PAL_M         |\
1068                                 V4L2_STD_PAL_60        |\
1069                                 V4L2_STD_NTSC          |\
1070                                 V4L2_STD_NTSC_443)
1071#define V4L2_STD_625_50         (V4L2_STD_PAL           |\
1072                                 V4L2_STD_PAL_N         |\
1073                                 V4L2_STD_PAL_Nc        |\
1074                                 V4L2_STD_SECAM)
1075#define V4L2_STD_ATSC           (V4L2_STD_ATSC_8_VSB    |\
1076                                 V4L2_STD_ATSC_16_VSB)
1077
1078#define V4L2_STD_UNKNOWN        0
1079#define V4L2_STD_ALL            (V4L2_STD_525_60        |\
1080                                 V4L2_STD_625_50)
1081
1082struct <A
1083HREF="r9288.htm#V4L2-STANDARD"
1084>v4l2_standard</A
1085>
1086{
1087        __u32                index;
1088        v4l2_std_id          id;
1089        __u8                 name[24];
1090        struct <A
1091HREF="r9288.htm#V4L2-FRACT"
1092>v4l2_fract</A
1093>    frameperiod; /* Frames, not fields */
1094        __u32                framelines;
1095        __u32                reserved[4];
1096};
1097
1098/*
1099 *      V I D E O   I N P U T S
1100 */
1101struct <A
1102HREF="r8936.htm#V4L2-INPUT"
1103>v4l2_input</A
1104>
1105{
1106        __u32        index;             /*  Which input */
1107        __u8         name[32];          /*  Label */
1108        __u32        type;              /*  Type of input */
1109        __u32        audioset;          /*  Associated audios (bitfield) */
1110        __u32        tuner;             /*  Associated tuner */
1111        v4l2_std_id  std;
1112        __u32        status;
1113        __u32        reserved[4];
1114};
1115
1116/*  Values for the 'type' field */
1117#define V4L2_INPUT_TYPE_TUNER           1
1118#define V4L2_INPUT_TYPE_CAMERA          2
1119
1120/* field 'status' - general */
1121#define V4L2_IN_ST_NO_POWER    0x00000001  /* Attached device is off */
1122#define V4L2_IN_ST_NO_SIGNAL   0x00000002
1123#define V4L2_IN_ST_NO_COLOR    0x00000004
1124
1125/* field 'status' - analog */
1126#define V4L2_IN_ST_NO_H_LOCK   0x00000100  /* No horizontal sync lock */
1127#define V4L2_IN_ST_COLOR_KILL  0x00000200  /* Color killer is active */
1128
1129/* field 'status' - digital */
1130#define V4L2_IN_ST_NO_SYNC     0x00010000  /* No synchronization lock */
1131#define V4L2_IN_ST_NO_EQU      0x00020000  /* No equalizer lock */
1132#define V4L2_IN_ST_NO_CARRIER  0x00040000  /* Carrier recovery failed */
1133
1134/* field 'status' - VCR and set-top box */
1135#define V4L2_IN_ST_MACROVISION 0x01000000  /* Macrovision detected */
1136#define V4L2_IN_ST_NO_ACCESS   0x02000000  /* Conditional access denied */
1137#define V4L2_IN_ST_VTR         0x04000000  /* VTR time constant */
1138
1139/*
1140 *      V I D E O   O U T P U T S
1141 */
1142struct <A
1143HREF="r9149.htm#V4L2-OUTPUT"
1144>v4l2_output</A
1145>
1146{
1147        __u32        index;             /*  Which output */
1148        __u8         name[32];          /*  Label */
1149        __u32        type;              /*  Type of output */
1150        __u32        audioset;          /*  Associated audios (bitfield) */
1151        __u32        modulator;         /*  Associated modulator */
1152        v4l2_std_id  std;
1153        __u32        reserved[4];
1154};
1155/*  Values for the 'type' field */
1156#define V4L2_OUTPUT_TYPE_MODULATOR              1
1157#define V4L2_OUTPUT_TYPE_ANALOG                 2
1158#define V4L2_OUTPUT_TYPE_ANALOGVGAOVERLAY       3
1159
1160/*
1161 *      C O N T R O L S
1162 */
1163struct <A
1164HREF="r10104.htm#V4L2-CONTROL"
1165>v4l2_control</A
1166>
1167{
1168        __u32                id;
1169        __s32                value;
1170};
1171
1172struct <A
1173HREF="r10386.htm#V4L2-EXT-CONTROL"
1174>v4l2_ext_control</A
1175>
1176{
1177        __u32 id;
1178        __u32 reserved2[2];
1179        union {
1180                __s32 value;
1181                __s64 value64;
1182                void *reserved;
1183        };
1184} __attribute__ ((packed));
1185
1186struct <A
1187HREF="r10386.htm#V4L2-EXT-CONTROLS"
1188>v4l2_ext_controls</A
1189>
1190{
1191        __u32 ctrl_class;
1192        __u32 count;
1193        __u32 error_idx;
1194        __u32 reserved[2];
1195        struct <A
1196HREF="r10386.htm#V4L2-EXT-CONTROL"
1197>v4l2_ext_control</A
1198> *controls;
1199};
1200
1201/*  Values for ctrl_class field */
1202#define V4L2_CTRL_CLASS_USER 0x00980000 /* Old-style 'user' controls */
1203#define V4L2_CTRL_CLASS_MPEG 0x00990000 /* MPEG-compression controls */
1204#define V4L2_CTRL_CLASS_CAMERA 0x009a0000       /* Camera class controls */
1205
1206#define V4L2_CTRL_ID_MASK         (0x0fffffff)
1207#define V4L2_CTRL_ID2CLASS(id)    ((id) &amp; 0x0fff0000UL)
1208#define V4L2_CTRL_DRIVER_PRIV(id) (((id) &amp; 0xffff) &gt;= 0x1000)
1209
1210/*  Used in the VIDIOC_QUERYCTRL ioctl for querying controls */
1211struct <A
1212HREF="r13317.htm#V4L2-QUERYCTRL"
1213>v4l2_queryctrl</A
1214>
1215{
1216        __u32                id;
1217        enum <A
1218HREF="r13317.htm#V4L2-CTRL-TYPE"
1219>v4l2_ctrl_type</A
1220>  type;
1221        __u8                 name[32];  /* Whatever */
1222        __s32                minimum;   /* Note signedness */
1223        __s32                maximum;
1224        __s32                step;
1225        __s32                default_value;
1226        __u32                flags;
1227        __u32                reserved[2];
1228};
1229
1230/*  Used in the VIDIOC_QUERYMENU ioctl for querying menu items */
1231struct <A
1232HREF="r13317.htm#V4L2-QUERYMENU"
1233>v4l2_querymenu</A
1234>
1235{
1236        __u32           id;
1237        __u32           index;
1238        __u8            name[32];       /* Whatever */
1239        __u32           reserved;
1240};
1241
1242/*  Control flags  */
1243#define V4L2_CTRL_FLAG_DISABLED         0x0001
1244#define V4L2_CTRL_FLAG_GRABBED          0x0002
1245#define V4L2_CTRL_FLAG_READ_ONLY        0x0004
1246#define V4L2_CTRL_FLAG_UPDATE           0x0008
1247#define V4L2_CTRL_FLAG_INACTIVE         0x0010
1248#define V4L2_CTRL_FLAG_SLIDER           0x0020
1249
1250/*  Query flag, to be ORed with the control ID */
1251#define V4L2_CTRL_FLAG_NEXT_CTRL        0x80000000
1252
1253/*  User-class control IDs defined by V4L2 */
1254#define V4L2_CID_BASE                   (V4L2_CTRL_CLASS_USER | 0x900)
1255#define V4L2_CID_USER_BASE              V4L2_CID_BASE
1256/*  IDs reserved for driver specific controls */
1257#define V4L2_CID_PRIVATE_BASE           0x08000000
1258
1259#define V4L2_CID_USER_CLASS             (V4L2_CTRL_CLASS_USER | 1)
1260#define V4L2_CID_BRIGHTNESS             (V4L2_CID_BASE+0)
1261#define V4L2_CID_CONTRAST               (V4L2_CID_BASE+1)
1262#define V4L2_CID_SATURATION             (V4L2_CID_BASE+2)
1263#define V4L2_CID_HUE                    (V4L2_CID_BASE+3)
1264#define V4L2_CID_AUDIO_VOLUME           (V4L2_CID_BASE+5)
1265#define V4L2_CID_AUDIO_BALANCE          (V4L2_CID_BASE+6)
1266#define V4L2_CID_AUDIO_BASS             (V4L2_CID_BASE+7)
1267#define V4L2_CID_AUDIO_TREBLE           (V4L2_CID_BASE+8)
1268#define V4L2_CID_AUDIO_MUTE             (V4L2_CID_BASE+9)
1269#define V4L2_CID_AUDIO_LOUDNESS         (V4L2_CID_BASE+10)
1270#define V4L2_CID_BLACK_LEVEL            (V4L2_CID_BASE+11) /* Deprecated */
1271#define V4L2_CID_AUTO_WHITE_BALANCE     (V4L2_CID_BASE+12)
1272#define V4L2_CID_DO_WHITE_BALANCE       (V4L2_CID_BASE+13)
1273#define V4L2_CID_RED_BALANCE            (V4L2_CID_BASE+14)
1274#define V4L2_CID_BLUE_BALANCE           (V4L2_CID_BASE+15)
1275#define V4L2_CID_GAMMA                  (V4L2_CID_BASE+16)
1276#define V4L2_CID_WHITENESS              (V4L2_CID_GAMMA) /* Deprecated */
1277#define V4L2_CID_EXPOSURE               (V4L2_CID_BASE+17)
1278#define V4L2_CID_AUTOGAIN               (V4L2_CID_BASE+18)
1279#define V4L2_CID_GAIN                   (V4L2_CID_BASE+19)
1280#define V4L2_CID_HFLIP                  (V4L2_CID_BASE+20)
1281#define V4L2_CID_VFLIP                  (V4L2_CID_BASE+21)
1282
1283/* Deprecated, use V4L2_CID_PAN_RESET and V4L2_CID_TILT_RESET */
1284#define V4L2_CID_HCENTER_DEPRECATED     (V4L2_CID_BASE+22)
1285#define V4L2_CID_VCENTER_DEPRECATED     (V4L2_CID_BASE+23)
1286
1287#define V4L2_CID_POWER_LINE_FREQUENCY   (V4L2_CID_BASE+24)
1288enum&nbsp;v4l2_power_line_frequency {
1289        V4L2_CID_POWER_LINE_FREQUENCY_DISABLED  = 0,
1290        V4L2_CID_POWER_LINE_FREQUENCY_50HZ      = 1,
1291        V4L2_CID_POWER_LINE_FREQUENCY_60HZ      = 2,
1292};
1293#define V4L2_CID_HUE_AUTO                       (V4L2_CID_BASE+25)
1294#define V4L2_CID_WHITE_BALANCE_TEMPERATURE      (V4L2_CID_BASE+26)
1295#define V4L2_CID_SHARPNESS                      (V4L2_CID_BASE+27)
1296#define V4L2_CID_BACKLIGHT_COMPENSATION         (V4L2_CID_BASE+28)
1297#define V4L2_CID_LASTP1                         (V4L2_CID_BASE+29) /* last CID + 1 */
1298
1299/*  MPEG-class control IDs defined by V4L2 */
1300#define V4L2_CID_MPEG_BASE                      (V4L2_CTRL_CLASS_MPEG | 0x900)
1301#define V4L2_CID_MPEG_CLASS                     (V4L2_CTRL_CLASS_MPEG | 1)
1302
1303/*  MPEG streams */
1304#define V4L2_CID_MPEG_STREAM_TYPE               (V4L2_CID_MPEG_BASE+0)
1305enum&nbsp;v4l2_mpeg_stream_type {
1306        V4L2_MPEG_STREAM_TYPE_MPEG2_PS   = 0, /* MPEG-2 program stream */
1307        V4L2_MPEG_STREAM_TYPE_MPEG2_TS   = 1, /* MPEG-2 transport stream */
1308        V4L2_MPEG_STREAM_TYPE_MPEG1_SS   = 2, /* MPEG-1 system stream */
1309        V4L2_MPEG_STREAM_TYPE_MPEG2_DVD  = 3, /* MPEG-2 DVD-compatible stream */
1310        V4L2_MPEG_STREAM_TYPE_MPEG1_VCD  = 4, /* MPEG-1 VCD-compatible stream */
1311        V4L2_MPEG_STREAM_TYPE_MPEG2_SVCD = 5, /* MPEG-2 SVCD-compatible stream */
1312};
1313#define V4L2_CID_MPEG_STREAM_PID_PMT            (V4L2_CID_MPEG_BASE+1)
1314#define V4L2_CID_MPEG_STREAM_PID_AUDIO          (V4L2_CID_MPEG_BASE+2)
1315#define V4L2_CID_MPEG_STREAM_PID_VIDEO          (V4L2_CID_MPEG_BASE+3)
1316#define V4L2_CID_MPEG_STREAM_PID_PCR            (V4L2_CID_MPEG_BASE+4)
1317#define V4L2_CID_MPEG_STREAM_PES_ID_AUDIO       (V4L2_CID_MPEG_BASE+5)
1318#define V4L2_CID_MPEG_STREAM_PES_ID_VIDEO       (V4L2_CID_MPEG_BASE+6)
1319#define V4L2_CID_MPEG_STREAM_VBI_FMT            (V4L2_CID_MPEG_BASE+7)
1320enum&nbsp;v4l2_mpeg_stream_vbi_fmt {
1321        V4L2_MPEG_STREAM_VBI_FMT_NONE = 0,  /* No VBI in the MPEG stream */
1322        V4L2_MPEG_STREAM_VBI_FMT_IVTV = 1,  /* VBI in private packets, IVTV format */
1323};
1324
1325/*  MPEG audio */
1326#define V4L2_CID_MPEG_AUDIO_SAMPLING_FREQ       (V4L2_CID_MPEG_BASE+100)
1327enum&nbsp;v4l2_mpeg_audio_sampling_freq {
1328        V4L2_MPEG_AUDIO_SAMPLING_FREQ_44100 = 0,
1329        V4L2_MPEG_AUDIO_SAMPLING_FREQ_48000 = 1,
1330        V4L2_MPEG_AUDIO_SAMPLING_FREQ_32000 = 2,
1331};
1332#define V4L2_CID_MPEG_AUDIO_ENCODING            (V4L2_CID_MPEG_BASE+101)
1333enum&nbsp;v4l2_mpeg_audio_encoding {
1334        V4L2_MPEG_AUDIO_ENCODING_LAYER_1 = 0,
1335        V4L2_MPEG_AUDIO_ENCODING_LAYER_2 = 1,
1336        V4L2_MPEG_AUDIO_ENCODING_LAYER_3 = 2,
1337};
1338#define V4L2_CID_MPEG_AUDIO_L1_BITRATE          (V4L2_CID_MPEG_BASE+102)
1339enum&nbsp;v4l2_mpeg_audio_l1_bitrate {
1340        V4L2_MPEG_AUDIO_L1_BITRATE_32K  = 0,
1341        V4L2_MPEG_AUDIO_L1_BITRATE_64K  = 1,
1342        V4L2_MPEG_AUDIO_L1_BITRATE_96K  = 2,
1343        V4L2_MPEG_AUDIO_L1_BITRATE_128K = 3,
1344        V4L2_MPEG_AUDIO_L1_BITRATE_160K = 4,
1345        V4L2_MPEG_AUDIO_L1_BITRATE_192K = 5,
1346        V4L2_MPEG_AUDIO_L1_BITRATE_224K = 6,
1347        V4L2_MPEG_AUDIO_L1_BITRATE_256K = 7,
1348        V4L2_MPEG_AUDIO_L1_BITRATE_288K = 8,
1349        V4L2_MPEG_AUDIO_L1_BITRATE_320K = 9,
1350        V4L2_MPEG_AUDIO_L1_BITRATE_352K = 10,
1351        V4L2_MPEG_AUDIO_L1_BITRATE_384K = 11,
1352        V4L2_MPEG_AUDIO_L1_BITRATE_416K = 12,
1353        V4L2_MPEG_AUDIO_L1_BITRATE_448K = 13,
1354};
1355#define V4L2_CID_MPEG_AUDIO_L2_BITRATE          (V4L2_CID_MPEG_BASE+103)
1356enum&nbsp;v4l2_mpeg_audio_l2_bitrate {
1357        V4L2_MPEG_AUDIO_L2_BITRATE_32K  = 0,
1358        V4L2_MPEG_AUDIO_L2_BITRATE_48K  = 1,
1359        V4L2_MPEG_AUDIO_L2_BITRATE_56K  = 2,
1360        V4L2_MPEG_AUDIO_L2_BITRATE_64K  = 3,
1361        V4L2_MPEG_AUDIO_L2_BITRATE_80K  = 4,
1362        V4L2_MPEG_AUDIO_L2_BITRATE_96K  = 5,
1363        V4L2_MPEG_AUDIO_L2_BITRATE_112K = 6,
1364        V4L2_MPEG_AUDIO_L2_BITRATE_128K = 7,
1365        V4L2_MPEG_AUDIO_L2_BITRATE_160K = 8,
1366        V4L2_MPEG_AUDIO_L2_BITRATE_192K = 9,
1367        V4L2_MPEG_AUDIO_L2_BITRATE_224K = 10,
1368        V4L2_MPEG_AUDIO_L2_BITRATE_256K = 11,
1369        V4L2_MPEG_AUDIO_L2_BITRATE_320K = 12,
1370        V4L2_MPEG_AUDIO_L2_BITRATE_384K = 13,
1371};
1372#define V4L2_CID_MPEG_AUDIO_L3_BITRATE          (V4L2_CID_MPEG_BASE+104)
1373enum&nbsp;v4l2_mpeg_audio_l3_bitrate {
1374        V4L2_MPEG_AUDIO_L3_BITRATE_32K  = 0,
1375        V4L2_MPEG_AUDIO_L3_BITRATE_40K  = 1,
1376        V4L2_MPEG_AUDIO_L3_BITRATE_48K  = 2,
1377        V4L2_MPEG_AUDIO_L3_BITRATE_56K  = 3,
1378        V4L2_MPEG_AUDIO_L3_BITRATE_64K  = 4,
1379        V4L2_MPEG_AUDIO_L3_BITRATE_80K  = 5,
1380        V4L2_MPEG_AUDIO_L3_BITRATE_96K  = 6,
1381        V4L2_MPEG_AUDIO_L3_BITRATE_112K = 7,
1382        V4L2_MPEG_AUDIO_L3_BITRATE_128K = 8,
1383        V4L2_MPEG_AUDIO_L3_BITRATE_160K = 9,
1384        V4L2_MPEG_AUDIO_L3_BITRATE_192K = 10,
1385        V4L2_MPEG_AUDIO_L3_BITRATE_224K = 11,
1386        V4L2_MPEG_AUDIO_L3_BITRATE_256K = 12,
1387        V4L2_MPEG_AUDIO_L3_BITRATE_320K = 13,
1388};
1389#define V4L2_CID_MPEG_AUDIO_MODE                (V4L2_CID_MPEG_BASE+105)
1390enum&nbsp;v4l2_mpeg_audio_mode {
1391        V4L2_MPEG_AUDIO_MODE_STEREO       = 0,
1392        V4L2_MPEG_AUDIO_MODE_JOINT_STEREO = 1,
1393        V4L2_MPEG_AUDIO_MODE_DUAL         = 2,
1394        V4L2_MPEG_AUDIO_MODE_MONO         = 3,
1395};
1396#define V4L2_CID_MPEG_AUDIO_MODE_EXTENSION      (V4L2_CID_MPEG_BASE+106)
1397enum&nbsp;&nbsp;v4l2_mpeg_audio_mode_extension {
1398        V4L2_MPEG_AUDIO_MODE_EXTENSION_BOUND_4  = 0,
1399        V4L2_MPEG_AUDIO_MODE_EXTENSION_BOUND_8  = 1,
1400        V4L2_MPEG_AUDIO_MODE_EXTENSION_BOUND_12 = 2,
1401        V4L2_MPEG_AUDIO_MODE_EXTENSION_BOUND_16 = 3,
1402};
1403#define V4L2_CID_MPEG_AUDIO_EMPHASIS            (V4L2_CID_MPEG_BASE+107)
1404enum&nbsp;v4l2_mpeg_audio_emphasis {
1405        V4L2_MPEG_AUDIO_EMPHASIS_NONE         = 0,
1406        V4L2_MPEG_AUDIO_EMPHASIS_50_DIV_15_uS = 1,
1407        V4L2_MPEG_AUDIO_EMPHASIS_CCITT_J17    = 2,
1408};
1409#define V4L2_CID_MPEG_AUDIO_CRC                 (V4L2_CID_MPEG_BASE+108)
1410enum&nbsp;v4l2_mpeg_audio_crc {
1411        V4L2_MPEG_AUDIO_CRC_NONE  = 0,
1412        V4L2_MPEG_AUDIO_CRC_CRC16 = 1,
1413};
1414#define V4L2_CID_MPEG_AUDIO_MUTE                (V4L2_CID_MPEG_BASE+109)
1415
1416/*  MPEG video */
1417#define V4L2_CID_MPEG_VIDEO_ENCODING            (V4L2_CID_MPEG_BASE+200)
1418enum&nbsp;v4l2_mpeg_video_encoding {
1419        V4L2_MPEG_VIDEO_ENCODING_MPEG_1 = 0,
1420        V4L2_MPEG_VIDEO_ENCODING_MPEG_2 = 1,
1421};
1422#define V4L2_CID_MPEG_VIDEO_ASPECT              (V4L2_CID_MPEG_BASE+201)
1423enum&nbsp;v4l2_mpeg_video_aspect {
1424        V4L2_MPEG_VIDEO_ASPECT_1x1     = 0,
1425        V4L2_MPEG_VIDEO_ASPECT_4x3     = 1,
1426        V4L2_MPEG_VIDEO_ASPECT_16x9    = 2,
1427        V4L2_MPEG_VIDEO_ASPECT_221x100 = 3,
1428};
1429#define V4L2_CID_MPEG_VIDEO_B_FRAMES            (V4L2_CID_MPEG_BASE+202)
1430#define V4L2_CID_MPEG_VIDEO_GOP_SIZE            (V4L2_CID_MPEG_BASE+203)
1431#define V4L2_CID_MPEG_VIDEO_GOP_CLOSURE         (V4L2_CID_MPEG_BASE+204)
1432#define V4L2_CID_MPEG_VIDEO_PULLDOWN            (V4L2_CID_MPEG_BASE+205)
1433#define V4L2_CID_MPEG_VIDEO_BITRATE_MODE        (V4L2_CID_MPEG_BASE+206)
1434enum&nbsp;v4l2_mpeg_video_bitrate_mode {
1435        V4L2_MPEG_VIDEO_BITRATE_MODE_VBR = 0,
1436        V4L2_MPEG_VIDEO_BITRATE_MODE_CBR = 1,
1437};
1438#define V4L2_CID_MPEG_VIDEO_BITRATE             (V4L2_CID_MPEG_BASE+207)
1439#define V4L2_CID_MPEG_VIDEO_BITRATE_PEAK        (V4L2_CID_MPEG_BASE+208)
1440#define V4L2_CID_MPEG_VIDEO_TEMPORAL_DECIMATION (V4L2_CID_MPEG_BASE+209)
1441#define V4L2_CID_MPEG_VIDEO_MUTE                (V4L2_CID_MPEG_BASE+210)
1442#define V4L2_CID_MPEG_VIDEO_MUTE_YUV            (V4L2_CID_MPEG_BASE+211)
1443
1444/*  MPEG-class control IDs specific to the CX2584x driver as defined by V4L2 */
1445#define V4L2_CID_MPEG_CX2341X_BASE                              (V4L2_CTRL_CLASS_MPEG | 0x1000)
1446#define V4L2_CID_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE         (V4L2_CID_MPEG_CX2341X_BASE+0)
1447enum&nbsp;v4l2_mpeg_cx2341x_video_spatial_filter_mode {
1448        V4L2_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE_MANUAL = 0,
1449        V4L2_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE_AUTO   = 1,
1450};
1451#define V4L2_CID_MPEG_CX2341X_VIDEO_SPATIAL_FILTER              (V4L2_CID_MPEG_CX2341X_BASE+1)
1452#define V4L2_CID_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE    (V4L2_CID_MPEG_CX2341X_BASE+2)
1453enum&nbsp;v4l2_mpeg_cx2341x_video_luma_spatial_filter_type {
1454        V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_OFF                  = 0,
1455        V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_1D_HOR               = 1,
1456        V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_1D_VERT              = 2,
1457        V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_2D_HV_SEPARABLE      = 3,
1458        V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_2D_SYM_NON_SEPARABLE = 4,
1459};
1460#define V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_SPATIAL_FILTER_TYPE  (V4L2_CID_MPEG_CX2341X_BASE+3)
1461enum&nbsp;v4l2_mpeg_cx2341x_video_chroma_spatial_filter_type {
1462        V4L2_MPEG_CX2341X_VIDEO_CHROMA_SPATIAL_FILTER_TYPE_OFF    = 0,
1463        V4L2_MPEG_CX2341X_VIDEO_CHROMA_SPATIAL_FILTER_TYPE_1D_HOR = 1,
1464};
1465#define V4L2_CID_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER_MODE        (V4L2_CID_MPEG_CX2341X_BASE+4)
1466enum&nbsp;v4l2_mpeg_cx2341x_video_temporal_filter_mode {
1467        V4L2_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER_MODE_MANUAL = 0,
1468        V4L2_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER_MODE_AUTO   = 1,
1469};
1470#define V4L2_CID_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER             (V4L2_CID_MPEG_CX2341X_BASE+5)
1471#define V4L2_CID_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE          (V4L2_CID_MPEG_CX2341X_BASE+6)
1472enum&nbsp;v4l2_mpeg_cx2341x_video_median_filter_type {
1473        V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_OFF      = 0,
1474        V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_HOR      = 1,
1475        V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_VERT     = 2,
1476        V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_HOR_VERT = 3,
1477        V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_DIAG     = 4,
1478};
1479#define V4L2_CID_MPEG_CX2341X_VIDEO_LUMA_MEDIAN_FILTER_BOTTOM   (V4L2_CID_MPEG_CX2341X_BASE+7)
1480#define V4L2_CID_MPEG_CX2341X_VIDEO_LUMA_MEDIAN_FILTER_TOP      (V4L2_CID_MPEG_CX2341X_BASE+8)
1481#define V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_MEDIAN_FILTER_BOTTOM (V4L2_CID_MPEG_CX2341X_BASE+9)
1482#define V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_MEDIAN_FILTER_TOP    (V4L2_CID_MPEG_CX2341X_BASE+10)
1483#define V4L2_CID_MPEG_CX2341X_STREAM_INSERT_NAV_PACKETS         (V4L2_CID_MPEG_CX2341X_BASE+11)
1484
1485/*  Camera class control IDs */
1486#define V4L2_CID_CAMERA_CLASS_BASE      (V4L2_CTRL_CLASS_CAMERA | 0x900)
1487#define V4L2_CID_CAMERA_CLASS           (V4L2_CTRL_CLASS_CAMERA | 1)
1488
1489#define V4L2_CID_EXPOSURE_AUTO                  (V4L2_CID_CAMERA_CLASS_BASE+1)
1490enum&nbsp;v4l2_exposure_auto_type {
1491        V4L2_EXPOSURE_AUTO = 0,
1492        V4L2_EXPOSURE_MANUAL = 1,
1493        V4L2_EXPOSURE_SHUTTER_PRIORITY = 2,
1494        V4L2_EXPOSURE_APERTURE_PRIORITY = 3
1495};
1496#define V4L2_CID_EXPOSURE_ABSOLUTE              (V4L2_CID_CAMERA_CLASS_BASE+2)
1497#define V4L2_CID_EXPOSURE_AUTO_PRIORITY         (V4L2_CID_CAMERA_CLASS_BASE+3)
1498
1499#define V4L2_CID_PAN_RELATIVE                   (V4L2_CID_CAMERA_CLASS_BASE+4)
1500#define V4L2_CID_TILT_RELATIVE                  (V4L2_CID_CAMERA_CLASS_BASE+5)
1501#define V4L2_CID_PAN_RESET                      (V4L2_CID_CAMERA_CLASS_BASE+6)
1502#define V4L2_CID_TILT_RESET                     (V4L2_CID_CAMERA_CLASS_BASE+7)
1503
1504#define V4L2_CID_PAN_ABSOLUTE                   (V4L2_CID_CAMERA_CLASS_BASE+8)
1505#define V4L2_CID_TILT_ABSOLUTE                  (V4L2_CID_CAMERA_CLASS_BASE+9)
1506
1507#define V4L2_CID_FOCUS_ABSOLUTE                 (V4L2_CID_CAMERA_CLASS_BASE+10)
1508#define V4L2_CID_FOCUS_RELATIVE                 (V4L2_CID_CAMERA_CLASS_BASE+11)
1509#define V4L2_CID_FOCUS_AUTO                     (V4L2_CID_CAMERA_CLASS_BASE+12)
1510
1511/*
1512 *      T U N I N G
1513 */
1514struct <A
1515HREF="r12342.htm#V4L2-TUNER"
1516>v4l2_tuner</A
1517>
1518{
1519        __u32                   index;
1520        __u8                    name[32];
1521        enum <A
1522HREF="r12342.htm#V4L2-TUNER-TYPE"
1523>v4l2_tuner_type</A
1524>    type;
1525        __u32                   capability;
1526        __u32                   rangelow;
1527        __u32                   rangehigh;
1528        __u32                   rxsubchans;
1529        __u32                   audmode;
1530        __s32                   signal;
1531        __s32                   afc;
1532        __u32                   reserved[4];
1533};
1534
1535struct <A
1536HREF="r11430.htm#V4L2-MODULATOR"
1537>v4l2_modulator</A
1538>
1539{
1540        __u32                   index;
1541        __u8                    name[32];
1542        __u32                   capability;
1543        __u32                   rangelow;
1544        __u32                   rangehigh;
1545        __u32                   txsubchans;
1546        __u32                   reserved[4];
1547};
1548
1549/*  Flags for the 'capability' field */
1550#define V4L2_TUNER_CAP_LOW              0x0001
1551#define V4L2_TUNER_CAP_NORM             0x0002
1552#define V4L2_TUNER_CAP_STEREO           0x0010
1553#define V4L2_TUNER_CAP_LANG2            0x0020
1554#define V4L2_TUNER_CAP_SAP              0x0020
1555#define V4L2_TUNER_CAP_LANG1            0x0040
1556
1557/*  Flags for the 'rxsubchans' field */
1558#define V4L2_TUNER_SUB_MONO             0x0001
1559#define V4L2_TUNER_SUB_STEREO           0x0002
1560#define V4L2_TUNER_SUB_LANG2            0x0004
1561#define V4L2_TUNER_SUB_SAP              0x0004
1562#define V4L2_TUNER_SUB_LANG1            0x0008
1563
1564/*  Values for the 'audmode' field */
1565#define V4L2_TUNER_MODE_MONO            0x0000
1566#define V4L2_TUNER_MODE_STEREO          0x0001
1567#define V4L2_TUNER_MODE_LANG2           0x0002
1568#define V4L2_TUNER_MODE_SAP             0x0002
1569#define V4L2_TUNER_MODE_LANG1           0x0003
1570#define V4L2_TUNER_MODE_LANG1_LANG2     0x0004
1571
1572struct <A
1573HREF="r11094.htm#V4L2-FREQUENCY"
1574>v4l2_frequency</A
1575>
1576{
1577        __u32                 tuner;
1578        enum <A
1579HREF="r12342.htm#V4L2-TUNER-TYPE"
1580>v4l2_tuner_type</A
1581>  type;
1582        __u32                 frequency;
1583        __u32                 reserved[8];
1584};
1585
1586/*
1587 *      A U D I O
1588 */
1589struct <A
1590HREF="r9539.htm#V4L2-AUDIO"
1591>v4l2_audio</A
1592>
1593{
1594        __u32   index;
1595        __u8    name[32];
1596        __u32   capability;
1597        __u32   mode;
1598        __u32   reserved[2];
1599};
1600
1601/*  Flags for the 'capability' field */
1602#define V4L2_AUDCAP_STEREO              0x00001
1603#define V4L2_AUDCAP_AVL                 0x00002
1604
1605/*  Flags for the 'mode' field */
1606#define V4L2_AUDMODE_AVL                0x00001
1607
1608struct <A
1609HREF="r9688.htm#V4L2-AUDIOOUT"
1610>v4l2_audioout</A
1611>
1612{
1613        __u32   index;
1614        __u8    name[32];
1615        __u32   capability;
1616        __u32   mode;
1617        __u32   reserved[2];
1618};
1619
1620/*
1621 *      M P E G   S E R V I C E S
1622 *
1623 *      NOTE: EXPERIMENTAL API
1624 */
1625#if 1 /*KEEP*/
1626#define V4L2_ENC_IDX_FRAME_I    (0)
1627#define V4L2_ENC_IDX_FRAME_P    (1)
1628#define V4L2_ENC_IDX_FRAME_B    (2)
1629#define V4L2_ENC_IDX_FRAME_MASK (0xf)
1630
1631struct <A
1632HREF="r10211.htm#V4L2-ENC-IDX-ENTRY"
1633>v4l2_enc_idx_entry</A
1634> {
1635        __u64 offset;
1636        __u64 pts;
1637        __u32 length;
1638        __u32 flags;
1639        __u32 reserved[2];
1640};
1641
1642#define V4L2_ENC_IDX_ENTRIES (64)
1643struct <A
1644HREF="r10211.htm#V4L2-ENC-IDX"
1645>v4l2_enc_idx</A
1646> {
1647        __u32 entries;
1648        __u32 entries_cap;
1649        __u32 reserved[4];
1650        struct <A
1651HREF="r10211.htm#V4L2-ENC-IDX-ENTRY"
1652>v4l2_enc_idx_entry</A
1653> entry[V4L2_ENC_IDX_ENTRIES];
1654};
1655
1656
1657#define V4L2_ENC_CMD_START      (0)
1658#define V4L2_ENC_CMD_STOP       (1)
1659#define V4L2_ENC_CMD_PAUSE      (2)
1660#define V4L2_ENC_CMD_RESUME     (3)
1661
1662/* Flags for V4L2_ENC_CMD_STOP */
1663#define V4L2_ENC_CMD_STOP_AT_GOP_END    (1 &lt;&lt; 0)
1664
1665struct <A
1666HREF="r8087.htm#V4L2-ENCODER-CMD"
1667>v4l2_encoder_cmd</A
1668> {
1669        __u32 cmd;
1670        __u32 flags;
1671        union {
1672                struct {
1673                        __u32 data[8];
1674                } raw;
1675        };
1676};
1677
1678#endif
1679
1680
1681/*
1682 *      D A T A   S E R V I C E S   ( V B I )
1683 *
1684 *      Data services API by Michael Schimek
1685 */
1686
1687/* Raw VBI */
1688struct <A
1689HREF="x7013.htm#V4L2-VBI-FORMAT"
1690>v4l2_vbi_format</A
1691>
1692{
1693        __u32   sampling_rate;          /* in 1 Hz */
1694        __u32   offset;
1695        __u32   samples_per_line;
1696        __u32   sample_format;          /* V4L2_PIX_FMT_* */
1697        __s32   start[2];
1698        __u32   count[2];
1699        __u32   flags;                  /* V4L2_VBI_* */
1700        __u32   reserved[2];            /* must be zero */
1701};
1702
1703/*  VBI flags  */
1704#define V4L2_VBI_UNSYNC         (1&lt;&lt; 0)
1705#define V4L2_VBI_INTERLACED     (1&lt;&lt; 1)
1706
1707/* Sliced VBI
1708 *
1709 *    This implements is a proposal V4L2 API to allow SLICED VBI
1710 * required for some hardware encoders. It should change without
1711 * notice in the definitive implementation.
1712 */
1713
1714struct <A
1715HREF="x7236.htm#V4L2-SLICED-VBI-FORMAT"
1716>v4l2_sliced_vbi_format</A
1717>
1718{
1719        __u16   service_set;
1720        /* service_lines[0][...] specifies lines 0-23 (1-23 used) of the first field
1721           service_lines[1][...] specifies lines 0-23 (1-23 used) of the second field
1722                                 (equals frame lines 313-336 for 625 line video
1723                                  standards, 263-286 for 525 line standards) */
1724        __u16   service_lines[2][24];
1725        __u32   io_size;
1726        __u32   reserved[2];            /* must be zero */
1727};
1728
1729/* Teletext World System Teletext
1730   (WST), defined on ITU-R BT.653-2 */
1731#define V4L2_SLICED_TELETEXT_B          (0x0001)
1732/* Video Program System, defined on ETS 300 231*/
1733#define V4L2_SLICED_VPS                 (0x0400)
1734/* Closed Caption, defined on EIA-608 */
1735#define V4L2_SLICED_CAPTION_525         (0x1000)
1736/* Wide Screen System, defined on ITU-R BT1119.1 */
1737#define V4L2_SLICED_WSS_625             (0x4000)
1738
1739#define V4L2_SLICED_VBI_525             (V4L2_SLICED_CAPTION_525)
1740#define V4L2_SLICED_VBI_625             (V4L2_SLICED_TELETEXT_B | V4L2_SLICED_VPS | V4L2_SLICED_WSS_625)
1741
1742struct <A
1743HREF="r12051.htm#V4L2-SLICED-VBI-CAP"
1744>v4l2_sliced_vbi_cap</A
1745>
1746{
1747        __u16   service_set;
1748        /* service_lines[0][...] specifies lines 0-23 (1-23 used) of the first field
1749           service_lines[1][...] specifies lines 0-23 (1-23 used) of the second field
1750                                 (equals frame lines 313-336 for 625 line video
1751                                  standards, 263-286 for 525 line standards) */
1752        __u16   service_lines[2][24];
1753        enum <A
1754HREF="x5953.htm#V4L2-BUF-TYPE"
1755>v4l2_buf_type</A
1756> type;
1757        __u32   reserved[3];    /* must be 0 */
1758};
1759
1760struct <A
1761HREF="x7236.htm#V4L2-SLICED-VBI-DATA"
1762>v4l2_sliced_vbi_data</A
1763>
1764{
1765        __u32   id;
1766        __u32   field;          /* 0: first field, 1: second field */
1767        __u32   line;           /* 1-23 */
1768        __u32   reserved;       /* must be 0 */
1769        __u8    data[48];
1770};
1771
1772/*
1773 *      A G G R E G A T E   S T R U C T U R E S
1774 */
1775
1776/*      Stream data format
1777 */
1778struct <A
1779HREF="r10944.htm#V4L2-FORMAT"
1780>v4l2_format</A
1781>
1782{
1783        enum <A
1784HREF="x5953.htm#V4L2-BUF-TYPE"
1785>v4l2_buf_type</A
1786> type;
1787        union
1788        {
1789                struct <A
1790HREF="c2030.htm#V4L2-PIX-FORMAT"
1791>v4l2_pix_format</A
1792>          pix;     // V4L2_BUF_TYPE_VIDEO_CAPTURE
1793                struct <A
1794HREF="x6570.htm#V4L2-WINDOW"
1795>v4l2_window</A
1796>              win;     // V4L2_BUF_TYPE_VIDEO_OVERLAY
1797                struct <A
1798HREF="x7013.htm#V4L2-VBI-FORMAT"
1799>v4l2_vbi_format</A
1800>          vbi;     // V4L2_BUF_TYPE_VBI_CAPTURE
1801                struct <A
1802HREF="x7236.htm#V4L2-SLICED-VBI-FORMAT"
1803>v4l2_sliced_vbi_format</A
1804>   sliced;  // V4L2_BUF_TYPE_SLICED_VBI_CAPTURE
1805                __u8    raw_data[200];                   // user-defined
1806        } fmt;
1807};
1808
1809
1810/*      Stream type-dependent parameters
1811 */
1812struct <A
1813HREF="r11680.htm#V4L2-STREAMPARM"
1814>v4l2_streamparm</A
1815>
1816{
1817        enum <A
1818HREF="x5953.htm#V4L2-BUF-TYPE"
1819>v4l2_buf_type</A
1820> type;
1821        union
1822        {
1823                struct <A
1824HREF="r11680.htm#V4L2-CAPTUREPARM"
1825>v4l2_captureparm</A
1826> capture;
1827                struct <A
1828HREF="r11680.htm#V4L2-OUTPUTPARM"
1829>v4l2_outputparm</A
1830>  output;
1831                __u8    raw_data[200];  /* user-defined */
1832        } parm;
1833};
1834
1835/*
1836 *      A D V A N C E D   D E B U G G I N G
1837 *
1838 *      NOTE: EXPERIMENTAL API
1839 */
1840
1841/* VIDIOC_DBG_G_REGISTER and VIDIOC_DBG_S_REGISTER */
1842
1843#define V4L2_CHIP_MATCH_HOST       0  /* Match against chip ID on host (0 for the host) */
1844#define V4L2_CHIP_MATCH_I2C_DRIVER 1  /* Match against I2C driver ID */
1845#define V4L2_CHIP_MATCH_I2C_ADDR   2  /* Match against I2C 7-bit address */
1846
1847struct <A
1848HREF="r7900.htm#V4L2-REGISTER"
1849>v4l2_register</A
1850> {
1851        __u32 match_type; /* Match type */
1852        __u32 match_chip; /* Match this chip, meaning determined by match_type */
1853        __u64 reg;
1854        __u64 val;
1855};
1856
1857/* VIDIOC_G_CHIP_IDENT */
1858struct <A
1859HREF="r9804.htm#V4L2-CHIP-IDENT"
1860>v4l2_chip_ident</A
1861> {
1862        __u32 match_type;  /* Match type */
1863        __u32 match_chip;  /* Match this chip, meaning determined by match_type */
1864        __u32 ident;       /* chip identifier as specified in &lt;media/v4l2-chip-ident.h&gt; */
1865        __u32 revision;    /* chip revision, chip specific */
1866};
1867
1868/*
1869 *      I O C T L   C O D E S   F O R   V I D E O   D E V I C E S
1870 *
1871 */
1872#define VIDIOC_QUERYCAP         _IOR  ('V',  0, struct <A
1873HREF="r13105.htm#V4L2-CAPABILITY"
1874>v4l2_capability</A
1875>)
1876#define VIDIOC_RESERVED         _IO   ('V',  1)
1877#define VIDIOC_ENUM_FMT         _IOWR ('V',  2, struct <A
1878HREF="r8367.htm#V4L2-FMTDESC"
1879>v4l2_fmtdesc</A
1880>)
1881#define VIDIOC_G_FMT            _IOWR ('V',  4, struct <A
1882HREF="r10944.htm#V4L2-FORMAT"
1883>v4l2_format</A
1884>)
1885#define VIDIOC_S_FMT            _IOWR ('V',  5, struct <A
1886HREF="r10944.htm#V4L2-FORMAT"
1887>v4l2_format</A
1888>)
1889#define VIDIOC_REQBUFS          _IOWR ('V',  8, struct <A
1890HREF="r13696.htm#V4L2-REQUESTBUFFERS"
1891>v4l2_requestbuffers</A
1892>)
1893#define VIDIOC_QUERYBUF         _IOWR ('V',  9, struct <A
1894HREF="x5953.htm#V4L2-BUFFER"
1895>v4l2_buffer</A
1896>)
1897#define VIDIOC_G_FBUF           _IOR  ('V', 10, struct <A
1898HREF="r10595.htm#V4L2-FRAMEBUFFER"
1899>v4l2_framebuffer</A
1900>)
1901#define VIDIOC_S_FBUF           _IOW  ('V', 11, struct <A
1902HREF="r10595.htm#V4L2-FRAMEBUFFER"
1903>v4l2_framebuffer</A
1904>)
1905#define VIDIOC_OVERLAY          _IOW  ('V', 14, int)
1906#define VIDIOC_QBUF             _IOWR ('V', 15, struct <A
1907HREF="x5953.htm#V4L2-BUFFER"
1908>v4l2_buffer</A
1909>)
1910#define VIDIOC_DQBUF            _IOWR ('V', 17, struct <A
1911HREF="x5953.htm#V4L2-BUFFER"
1912>v4l2_buffer</A
1913>)
1914#define VIDIOC_STREAMON         _IOW  ('V', 18, int)
1915#define VIDIOC_STREAMOFF        _IOW  ('V', 19, int)
1916#define VIDIOC_G_PARM           _IOWR ('V', 21, struct <A
1917HREF="r11680.htm#V4L2-STREAMPARM"
1918>v4l2_streamparm</A
1919>)
1920#define VIDIOC_S_PARM           _IOWR ('V', 22, struct <A
1921HREF="r11680.htm#V4L2-STREAMPARM"
1922>v4l2_streamparm</A
1923>)
1924#define VIDIOC_G_STD            _IOR  ('V', 23, v4l2_std_id)
1925#define VIDIOC_S_STD            _IOW  ('V', 24, v4l2_std_id)
1926#define VIDIOC_ENUMSTD          _IOWR ('V', 25, struct <A
1927HREF="r9288.htm#V4L2-STANDARD"
1928>v4l2_standard</A
1929>)
1930#define VIDIOC_ENUMINPUT        _IOWR ('V', 26, struct <A
1931HREF="r8936.htm#V4L2-INPUT"
1932>v4l2_input</A
1933>)
1934#define VIDIOC_G_CTRL           _IOWR ('V', 27, struct <A
1935HREF="r10104.htm#V4L2-CONTROL"
1936>v4l2_control</A
1937>)
1938#define VIDIOC_S_CTRL           _IOWR ('V', 28, struct <A
1939HREF="r10104.htm#V4L2-CONTROL"
1940>v4l2_control</A
1941>)
1942#define VIDIOC_G_TUNER          _IOWR ('V', 29, struct <A
1943HREF="r12342.htm#V4L2-TUNER"
1944>v4l2_tuner</A
1945>)
1946#define VIDIOC_S_TUNER          _IOW  ('V', 30, struct <A
1947HREF="r12342.htm#V4L2-TUNER"
1948>v4l2_tuner</A
1949>)
1950#define VIDIOC_G_AUDIO          _IOR  ('V', 33, struct <A
1951HREF="r9539.htm#V4L2-AUDIO"
1952>v4l2_audio</A
1953>)
1954#define VIDIOC_S_AUDIO          _IOW  ('V', 34, struct <A
1955HREF="r9539.htm#V4L2-AUDIO"
1956>v4l2_audio</A
1957>)
1958#define VIDIOC_QUERYCTRL        _IOWR ('V', 36, struct <A
1959HREF="r13317.htm#V4L2-QUERYCTRL"
1960>v4l2_queryctrl</A
1961>)
1962#define VIDIOC_QUERYMENU        _IOWR ('V', 37, struct <A
1963HREF="r13317.htm#V4L2-QUERYMENU"
1964>v4l2_querymenu</A
1965>)
1966#define VIDIOC_G_INPUT          _IOR  ('V', 38, int)
1967#define VIDIOC_S_INPUT          _IOWR ('V', 39, int)
1968#define VIDIOC_G_OUTPUT         _IOR  ('V', 46, int)
1969#define VIDIOC_S_OUTPUT         _IOWR ('V', 47, int)
1970#define VIDIOC_ENUMOUTPUT       _IOWR ('V', 48, struct <A
1971HREF="r9149.htm#V4L2-OUTPUT"
1972>v4l2_output</A
1973>)
1974#define VIDIOC_G_AUDOUT         _IOR  ('V', 49, struct <A
1975HREF="r9688.htm#V4L2-AUDIOOUT"
1976>v4l2_audioout</A
1977>)
1978#define VIDIOC_S_AUDOUT         _IOW  ('V', 50, struct <A
1979HREF="r9688.htm#V4L2-AUDIOOUT"
1980>v4l2_audioout</A
1981>)
1982#define VIDIOC_G_MODULATOR      _IOWR ('V', 54, struct <A
1983HREF="r11430.htm#V4L2-MODULATOR"
1984>v4l2_modulator</A
1985>)
1986#define VIDIOC_S_MODULATOR      _IOW  ('V', 55, struct <A
1987HREF="r11430.htm#V4L2-MODULATOR"
1988>v4l2_modulator</A
1989>)
1990#define VIDIOC_G_FREQUENCY      _IOWR ('V', 56, struct <A
1991HREF="r11094.htm#V4L2-FREQUENCY"
1992>v4l2_frequency</A
1993>)
1994#define VIDIOC_S_FREQUENCY      _IOW  ('V', 57, struct <A
1995HREF="r11094.htm#V4L2-FREQUENCY"
1996>v4l2_frequency</A
1997>)
1998#define VIDIOC_CROPCAP          _IOWR ('V', 58, struct <A
1999HREF="r7771.htm#V4L2-CROPCAP"
2000>v4l2_cropcap</A
2001>)
2002#define VIDIOC_G_CROP           _IOWR ('V', 59, struct <A
2003HREF="r9994.htm#V4L2-CROP"
2004>v4l2_crop</A
2005>)
2006#define VIDIOC_S_CROP           _IOW  ('V', 60, struct <A
2007HREF="r9994.htm#V4L2-CROP"
2008>v4l2_crop</A
2009>)
2010#define VIDIOC_G_JPEGCOMP       _IOR  ('V', 61, struct <A
2011HREF="r11285.htm#V4L2-JPEGCOMPRESSION"
2012>v4l2_jpegcompression</A
2013>)
2014#define VIDIOC_S_JPEGCOMP       _IOW  ('V', 62, struct <A
2015HREF="r11285.htm#V4L2-JPEGCOMPRESSION"
2016>v4l2_jpegcompression</A
2017>)
2018#define VIDIOC_QUERYSTD         _IOR  ('V', 63, v4l2_std_id)
2019#define VIDIOC_TRY_FMT          _IOWR ('V', 64, struct <A
2020HREF="r10944.htm#V4L2-FORMAT"
2021>v4l2_format</A
2022>)
2023#define VIDIOC_ENUMAUDIO        _IOWR ('V', 65, struct <A
2024HREF="r9539.htm#V4L2-AUDIO"
2025>v4l2_audio</A
2026>)
2027#define VIDIOC_ENUMAUDOUT       _IOWR ('V', 66, struct <A
2028HREF="r9688.htm#V4L2-AUDIOOUT"
2029>v4l2_audioout</A
2030>)
2031#define VIDIOC_G_PRIORITY       _IOR  ('V', 67, enum <A
2032HREF="r11946.htm#V4L2-PRIORITY"
2033>v4l2_priority</A
2034>)
2035#define VIDIOC_S_PRIORITY       _IOW  ('V', 68, enum <A
2036HREF="r11946.htm#V4L2-PRIORITY"
2037>v4l2_priority</A
2038>)
2039#define VIDIOC_G_SLICED_VBI_CAP _IOWR ('V', 69, struct <A
2040HREF="r12051.htm#V4L2-SLICED-VBI-CAP"
2041>v4l2_sliced_vbi_cap</A
2042>)
2043#define VIDIOC_LOG_STATUS       _IO   ('V', 70)
2044#define VIDIOC_G_EXT_CTRLS      _IOWR ('V', 71, struct <A
2045HREF="r10386.htm#V4L2-EXT-CONTROLS"
2046>v4l2_ext_controls</A
2047>)
2048#define VIDIOC_S_EXT_CTRLS      _IOWR ('V', 72, struct <A
2049HREF="r10386.htm#V4L2-EXT-CONTROLS"
2050>v4l2_ext_controls</A
2051>)
2052#define VIDIOC_TRY_EXT_CTRLS    _IOWR ('V', 73, struct <A
2053HREF="r10386.htm#V4L2-EXT-CONTROLS"
2054>v4l2_ext_controls</A
2055>)
2056#if 1 /*KEEP*/
2057#define VIDIOC_ENUM_FRAMESIZES  _IOWR ('V', 74, struct <A
2058HREF="r8494.htm#V4L2-FRMSIZEENUM"
2059>v4l2_frmsizeenum</A
2060>)
2061#define VIDIOC_ENUM_FRAMEINTERVALS      _IOWR ('V', 75, struct <A
2062HREF="r8724.htm#V4L2-FRMIVALENUM"
2063>v4l2_frmivalenum</A
2064>)
2065#define VIDIOC_G_ENC_INDEX      _IOR  ('V', 76, struct <A
2066HREF="r10211.htm#V4L2-ENC-IDX"
2067>v4l2_enc_idx</A
2068>)
2069#define VIDIOC_ENCODER_CMD      _IOWR ('V', 77, struct <A
2070HREF="r8087.htm#V4L2-ENCODER-CMD"
2071>v4l2_encoder_cmd</A
2072>)
2073#define VIDIOC_TRY_ENCODER_CMD  _IOWR ('V', 78, struct <A
2074HREF="r8087.htm#V4L2-ENCODER-CMD"
2075>v4l2_encoder_cmd</A
2076>)
2077
2078/* Experimental, only implemented if CONFIG_VIDEO_ADV_DEBUG is defined */
2079#define VIDIOC_DBG_S_REGISTER   _IOW  ('V', 79, struct <A
2080HREF="r7900.htm#V4L2-REGISTER"
2081>v4l2_register</A
2082>)
2083#define VIDIOC_DBG_G_REGISTER   _IOWR ('V', 80, struct <A
2084HREF="r7900.htm#V4L2-REGISTER"
2085>v4l2_register</A
2086>)
2087
2088#define VIDIOC_G_CHIP_IDENT     _IOWR ('V', 81, struct <A
2089HREF="r9804.htm#V4L2-CHIP-IDENT"
2090>v4l2_chip_ident</A
2091>)
2092#endif
2093
2094#ifdef __OLD_VIDIOC_
2095/* for compatibility, will go away some day */
2096#define VIDIOC_OVERLAY_OLD      _IOWR ('V', 14, int)
2097#define VIDIOC_S_PARM_OLD       _IOW  ('V', 22, struct <A
2098HREF="r11680.htm#V4L2-STREAMPARM"
2099>v4l2_streamparm</A
2100>)
2101#define VIDIOC_S_CTRL_OLD       _IOW  ('V', 28, struct <A
2102HREF="r10104.htm#V4L2-CONTROL"
2103>v4l2_control</A
2104>)
2105#define VIDIOC_G_AUDIO_OLD      _IOWR ('V', 33, struct <A
2106HREF="r9539.htm#V4L2-AUDIO"
2107>v4l2_audio</A
2108>)
2109#define VIDIOC_G_AUDOUT_OLD     _IOWR ('V', 49, struct <A
2110HREF="r9688.htm#V4L2-AUDIOOUT"
2111>v4l2_audioout</A
2112>)
2113#define VIDIOC_CROPCAP_OLD      _IOR  ('V', 58, struct <A
2114HREF="r7771.htm#V4L2-CROPCAP"
2115>v4l2_cropcap</A
2116>)
2117#endif
2118
2119#define BASE_VIDIOC_PRIVATE     192             /* 192-255 are private */
2120
2121#endif /* __LINUX_VIDEODEV2_H */
2122
2123/*
2124 * Local variables:
2125 * c-basic-offset: 8
2126 * End:
2127 */</PRE
2128></DIV
2129><DIV
2130CLASS="NAVFOOTER"
2131><HR
2132ALIGN="LEFT"
2133WIDTH="100%"><TABLE
2134SUMMARY="Footer navigation table"
2135WIDTH="100%"
2136BORDER="0"
2137CELLPADDING="0"
2138CELLSPACING="0"
2139><TR
2140><TD
2141WIDTH="33%"
2142ALIGN="left"
2143VALIGN="top"
2144><A
2145HREF="x16497.htm"
2146ACCESSKEY="P"
2147>Prev</A
2148></TD
2149><TD
2150WIDTH="34%"
2151ALIGN="center"
2152VALIGN="top"
2153><A
2154HREF="book1.htm"
2155ACCESSKEY="H"
2156>Home</A
2157></TD
2158><TD
2159WIDTH="33%"
2160ALIGN="right"
2161VALIGN="top"
2162><A
2163HREF="a16706.htm"
2164ACCESSKEY="N"
2165>Next</A
2166></TD
2167></TR
2168><TR
2169><TD
2170WIDTH="33%"
2171ALIGN="left"
2172VALIGN="top"
2173>Obsolete API Elements</TD
2174><TD
2175WIDTH="34%"
2176ALIGN="center"
2177VALIGN="top"
2178>&nbsp;</TD
2179><TD
2180WIDTH="33%"
2181ALIGN="right"
2182VALIGN="top"
2183>Video Capture Example</TD
2184></TR
2185></TABLE
2186></DIV
2187></BODY
2188></HTML
2189>
2190