Release 0.41.92
[vala-gnome.git] / vapi / v4l2.vapi
blob43025988fd4f679bd8815202f601c07892f33595
1 /* v4l2.vapi
2  *
3  * Copyright (C) 2008  Matias De la Puente
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2.1 of the License, or (at your option) any later version.
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13  * Lesser General Public License for more details.
15  * You should have received a copy of the GNU Lesser General Public
16  * License along with this library; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
18  *
19  * Author:
20  *      Matias De la Puente <mfpuente.ar@gmail.com>
21  */
23 [CCode (lower_case_cprefix="", cprefix="", cheader_filename="linux/videodev2.h")]
24 namespace V4l2
26         [CCode (cprefix="V4L2_FIELD_", has_type_id = false)]
27         public enum Field
28         {
29                 ANY,
30                 NONE,
31                 TOP,
32                 BOTTOM,
33                 INTERLACED,
34                 SEQ_TB,
35                 SEQ_BT,
36                 ALTERNATE,
37                 INTERLACED_TB,
38                 INTERLACED_BT
39         }
41         [CCode (cname="V4L2_FIELD_HAS_TOP")]
42         public bool field_has_top (uint32 field);
43         [CCode (cname="V4L2_FIELD_HAS_BOTTOM")]
44         public bool field_has_bottom (uint32 field);
45         [CCode (cname="V4L2_FIELD_HAS_BOTH")]
46         public bool field_has_both (uint32 field);
48         [CCode (cprefix="V4L2_BUF_TYPE_", has_type_id = false)]
49         public enum BufferType
50         {
51                 VIDEO_CAPTURE,
52                 VIDEO_OUTPUT,
53                 VIDEO_OVERLAY,
54                 VBI_CAPTURE,
55                 VBI_OUTPUT,
56                 SLICED_VBI_CAPTURE,
57                 SLICED_VBI_OUTPUT,
58                 VIDEO_OUTPUT_OVERLAY,
59                 PRIVATE
60         }
62         [CCode (cprefix="V4L2_CTRL_TYPE_", has_type_id = false)]
63         public enum ControlType
64         {
65                 INTEGER,
66                 BOOLEAN,
67                 MENU,
68                 BUTTON,
69                 INTEGER64,
70                 CTRL_CLASS
71         }
73         [CCode (cprefix="V4L2_TUNER_", has_type_id = false)]
74         public enum TunerType
75         {
76                 RADIO,
77                 ANALOG_TV,
78                 DIGITAL_TV
79         }
81         [CCode (cprefix="V4L2_MEMORY_", has_type_id = false)]
82         public enum Memory
83         {
84                 MMAP,
85                 USERPTR,
86                 OVERLAY
87         }
89         [CCode (cprefix="V4L2_COLORSPACE_", has_type_id = false)]
90         public enum Colorspace
91         {
92                 SMPTE170M,
93                 SMPTE240M,
94                 REC709,
95                 BT878,
96                 470_SYSTEM_M,
97                 470_SYSTEM_BG,
98                 JPEG,
99                 SRGB
100         }
102         [CCode (cprefix="V4L2_PRIORITY_", has_type_id = false)]
103         public enum Priority
104         {
105                 UNSET,
106                 BACKGROUND,
107                 INTERACTIVE,
108                 RECORD,
109                 DEFAULT
110         }
112         [CCode (cname="struct v4l2_rect", has_type_id = false)]
113         public struct Rect
114         {
115                 public int32 left;
116                 public int32 top;
117                 public int32 width;
118                 public int32 height;
119         }
121         [CCode (cname="struct v4l2_fract", has_type_id = false)]
122         public struct Fraction
123         {
124                 public uint32 numerator;
125                 public uint32 denominator;
126         }
128         [CCode (cprefix="V4L2_CAP_", has_type_id = false)]
129         public enum Capabilities
130         {
131                 VIDEO_CAPTURE,
132                 VIDEO_OUTPUT,
133                 VIDEO_OVERLAY,
134                 VBI_CAPTURE,
135                 VBI_OUTPUT,
136                 SLICED_VBI_CAPTURE,
137                 SLICED_VBI_OUTPUT,
138                 RDS_CAPTURE,
139                 VIDEO_OUTPUT_OVERLAY,
140                 HW_FREQ_SEEK,
141                 TUNER,
142                 AUDIO,
143                 RADIO,
144                 READWRITE,
145                 ASYNCIO,
146                 STREAMING
147         }
149         [CCode (cname="struct v4l2_capability", has_type_id = false)]
150         public struct Capability
151         {
152                 public unowned string driver;
153                 public unowned string card;
154                 public unowned string bus_info;
155                 public uint32 version;
156                 public uint32 capabilities;
157                 public uint32[] reserved;
158         }
160         [CCode (cprefix="V4L2_PIX_FMT_", has_type_id = false)]
161         public enum PixelFormatType
162         {
163                 RGB332,
164                 RGB444,
165                 RGB555,
166                 RGB565,
167                 RGB555X,
168                 RGB565X,
169                 BGR24,
170                 RGB24,
171                 BGR32,
172                 RGB32,
173                 GREY,
174                 Y16,
175                 PAL8,
176                 YVU410,
177                 YVU420,
178                 YUYV,
179                 UYVY,
180                 YUV422P,
181                 YUV411P,
182                 Y41P,
183                 YUV444,
184                 YUV555,
185                 YUV565,
186                 YUV32,
187                 NV12,
188                 NV21,
189                 YUV410,
190                 YUV420,
191                 YYUV,
192                 HI240,
193                 HM12,
194                 SBGGR8,
195                 SGBRG8,
196                 SBGGR16,
197                 MJPEG,
198                 JPEG,
199                 DV,
200                 MPEG,
201                 WNVA,
202                 SN9C10X,
203                 PWC1,
204                 PWC2,
205                 ET61X251,
206                 SPCA501,
207                 SPCA505,
208                 SPCA508,
209                 SPCA561,
210                 PAC207,
211                 PJPG,
212                 YVYU
213         }
215         [CCode (cname="struct v4l2_pix_format", has_type_id = false)]
216         public struct PixelFormat
217         {
218                 public uint32 width;
219                 public uint32 height;
220                 public uint32 pixelformat;
221                 public Field field;
222                 public uint32 bytesperline;
223                 public uint32 sizeimage;
224                 public Colorspace colorspace;
225                 public uint32 priv;
226         }
228         [CCode (cprefix="V4L2_FMT_FLAG_", has_type_id = false)]
229         public enum FormatFlag
230         {
231                 COMPRESSED
232         }
234         [CCode (cname="struct v4l2_fmtdesc", has_type_id = false)]
235         public struct FormatDescriptor
236         {
237                 public uint32 index;
238                 public BufferType type;
239                 public uint32 flags;
240                 public unowned string description;
241                 public uint pixelformat;
242         }
244         [CCode (cprefix="V4L2_FRMSIZE_TYPE_", has_type_id = false)]
245         public enum FramesizeTypes
246         {
247                 DISCRETE,
248                 CONTINUOUS,
249                 STEPWISE
250         }
252         [CCode (cname="struct v4l2_frmsize_discrete", has_type_id = false)]
253         public struct FramesizeDiscrete
254         {
255                 public uint32 width;
256                 public uint32 height;
257         }
259         [CCode (cname="struct v4l2_frmsize_stepwise", has_type_id = false)]
260         public struct FramesizeStepwise
261         {
262                 public uint32 min_width;
263                 public uint32 max_width;
264                 public uint32 step_width;
265                 public uint32 min_height;
266                 public uint32 max_height;
267                 public uint32 step_height;
268         }
270         [CCode (cname="struct v4l2_frmsizeenum", has_type_id = false)]
271         public struct FramsizeEnum
272         {
273                 public uint32 index;
274                 public uint32 pixel_format;
275                 public uint32 type;
276                 public FramesizeDiscrete discrete;
277                 public FramesizeStepwise stepwise;
278         }
280         [CCode (cprefix="V4L2_FRMIVAL_TYPE_", has_type_id = false)]
281         public enum FrameivalTypes
282         {
283                 DISCRETE,
284                 CONTINUOUS,
285                 STEPWISE
286         }
288         [CCode (cname="struct v4l2_frmival_stepwise", has_type_id = false)]
289         public struct FrameivalStepwise
290         {
291                 public Fraction min;
292                 public Fraction max;
293                 public Fraction step;
294         }
296         [CCode (cname="struct v4l2_frmivalenum", has_type_id = false)]
297         public struct FrameivalEnum
298         {
299                 public uint32 index;
300                 public uint32 pixel_format;
301                 public uint32 width;
302                 public uint32 height;
303                 public uint32 type;
304                 public Fraction discrete;
305                 public Fraction stepwise;
306         }
308         [CCode (cname="struct v4l2_timecode", has_type_id = false)]
309         public struct Timecode
310         {
311                 public uint     type;
312                 public uint32 flags;
313                 public uint8 frames;
314                 public uint8 seconds;
315                 public uint8 minutes;
316                 public uint8 hours;
317                 public uint8 userbits[4];
318         }
320         [CCode (cprefix="V4L2_TC_TYPE_", has_type_id = false)]
321         public enum TimecodeType
322         {
323                 24FPS,
324                 25FPS,
325                 30FPS,
326                 50FPS,
327                 60FPS
328         }
330         [CCode (cprefix="V4L2_TC_FLAGS_", has_type_id = false)]
331         public enum TimecodeFlags
332         {
333                 DROPFRAME,
334                 COLORFRAME
335         }
337         [CCode (cprefix="V4L2_TC_USERBITS_", has_type_id = false)]
338         public enum TimecodeUserbits
339         {
340                 field,
341                 USERDEFINED,
342                 8BITCHARS
343         }
346         [CCode (cname="struct v4l2_jpegcompression", has_type_id = false)]
347         public struct JpegCompression
348         {
349                 public int quality;
350                 public int APPn;
351                 public int APP_len;
352                 public char APP_data[60];
353                 public int COM_len;
354                 public char COM_data[60];
355                 public uint32 jpeg_markers;
356         }
358         [CCode (cprefix="V4L2_JPEG_MARKER_", has_type_id = false)]
359         public enum JpegMarker
360         {
361                 DHT,
362                 DQT,
363                 DRI,
364                 COM,
365                 APP
366         }
368         [CCode (cname="struct v4l2_requestbuffers", has_type_id = false)]
369         public struct RequestBuffers
370         {
371                 public uint32 count;
372                 public BufferType type;
373                 public Memory memory;
374         }
376         [CCode (cname="m", has_type_id = false)]
377         public struct M
378         {
379                 public uint32 offset;
380                 public ulong userptr;
381         }
383         [CCode (cname="struct v4l2_buffer", has_type_id = false)]
384         public struct Buffer
385         {
386                 public uint32 index;
387                 public BufferType type;
388                 public uint32 bytesused;
389                 public uint32 flags;
390                 public Field field;
391                 public GLib.TimeVal timestamp;
392                 public Timecode timecode;
393                 public uint32 sequence;
394                 public Memory memory;
395                 public M m;
396                 public uint32 length;
397                 public uint32 input;
398                 public uint32 reserved;
399         }
401         [CCode (cprefix="V4L2_BUF_FLAG_", has_type_id = false)]
402         public enum BufferFlags
403         {
404                 MAPPED,
405                 QUEUED,
406                 DONE,
407                 KEYFRAME,
408                 PFRAME,
409                 BFRAME,
410                 TIMECODE,
411                 INPUT
412         }
414         [CCode (cname="struct v4l2_framebuffer", has_type_id = false)]
415         public struct FrameBuffer
416         {
417                 public uint32 capability;
418                 public uint32 flags;
419                 public void* @base;
420                 public PixelFormat fmt;
421         }
423         [CCode (cprefix="V4L2_FBUF_CAP_", has_type_id = false)]
424         public enum FrameBufferCapabilites
425         {
426                 EXTERNOVERLAY,
427                 CHROMAKEY,
428                 LIST_CLIPPING,
429                 BITMAP_CLIPPING,
430                 LOCAL_ALPHA,
431                 GLOBAL_ALPHA,
432                 LOCAL_INV_ALPHA
433         }
435         [CCode (cprefix="V4L2_FBUF_FLAG_", has_type_id = false)]
436         public enum FrameBufferFlags
437         {
438                 PRIMARY,
439                 OVERLAY,
440                 CHROMAKEY,
441                 LOCAL_ALPHA,
442                 GLOBAL_ALPHA,
443                 LOCAL_INV_ALPHA
444         }
446         [CCode (cname="struct v4l2_clip", has_type_id = false)]
447         public struct Clip
448         {
449                 public Rect c;
450                 public Clip* next;
451         }
453         [CCode (cname="struct v4l2_window", has_type_id = false)]
454         public struct Window
455         {
456                 public Rect w;
457                 public Field field;
458                 public uint32 chromakey;
459                 public Clip* clips;
460                 public uint32 clipcount;
461                 public void* bitmap;
462                 public uint8 global_alpha;
463         }
465         [CCode (cname="struct v4l2_captureparm", has_type_id = false)]
466         public struct CaptureParm
467         {
468                 public uint32 capability;
469                 public uint32 capturemode;
470                 public Fraction timeperframe;
471                 public uint32 extendedmode;
472                 public uint32 readbuffers;
473         }
475         [CCode (cprefix="V4L2_")]
476         public const uint32 MODE_HIGHQUALITY;
477         [CCode (cprefix="V4L2_")]
478         public const uint32 CAP_TIMEPERFRAME;
480         [CCode (cname="struct v4l2_outputparm", has_type_id = false)]
481         public struct OutputParm
482         {
483                 public uint32 capability;
484                 public uint32 outputmode;
485                 public Fraction timeperframe;
486                 public uint32 extendedmode;
487                 public uint32 writebuffers;
488         }
490         [CCode (cname="struct v4l2_cropcap", has_type_id = false)]
491         public struct CropCap
492         {
493                 public BufferType  type;
494                 public Rect bounds;
495                 public Rect defrect;
496                 public Fraction pixelaspect;
497         }
499         [CCode (cname="struct v4l2_crop", has_type_id = false)]
500         public struct Crop
501         {
502                 public BufferType type;
503                 public Rect c;
504         }
506         [CCode (cprefix="V4L2_STD_", has_type_id = false)]
507         public enum Standards
508         {
509                 PAL_B,
510                 PAL_B1,
511                 PAL_G,
512                 PAL_H,
513                 PAL_I,
514                 PAL_D,
515                 PAL_D1,
516                 PAL_K,
517                 PAL_M,
518                 PAL_N,
519                 PAL_Nc,
520                 PAL_60,
521                 NTSC_M,
522                 NTSC_M_JP,
523                 NTSC_443,
524                 NTSC_M_KR,
525                 SECAM_B,
526                 SECAM_D,
527                 SECAM_G,
528                 SECAM_H,
529                 SECAM_K,
530                 SECAM_K1,
531                 SECAM_L,
532                 SECAM_LC,
533                 ATSC_8_VSB,
534                 ATSC_16_VSB,
535                 MN,
536                 B,
537                 GH,
538                 DK,
539                 PAL_BG,
540                 PAL_DK,
541                 PAL,
542                 NTSC,
543                 SECAM_DK,
544                 SECAM,
545                 525_60,
546                 625_50,
547                 ATSC,
548                 UNKNOWN,
549                 ALL
550         }
552         [CCode (cname="v4l2_std_id", has_type_id = false)]
553         public struct StdId : uint64 { }
555         [CCode (cname="struct v4l2_standard", has_type_id = false)]
556         public struct Standard
557         {
558                 public uint32 index;
559                 public StdId id;
560                 public unowned string name;
561                 public Fraction frameperiod;
562                 public uint32 framelines;
563         }
565         [CCode (cname="struct v4l2_input", has_type_id = false)]
566         public struct Input
567         {
568                 public uint32 index;
569                 public unowned string name;
570                 public uint32 type;
571                 public uint32 audioset;
572                 public uint32 tuner;
573                 public StdId std;
574                 public uint32 status;
575         }
577         [CCode (cprefix="V4L2_INPUT_TYPE_", has_type_id = false)]
578         public enum InputType
579         {
580                 TUNER,
581                 CAMERA
582         }
584         [CCode (cprefix="V4L2_IN_ST_", has_type_id = false)]
585         public enum InputStatus
586         {
587                 NO_POWER,
588                 NO_SIGNAL,
589                 NO_COLOR,
590                 NO_H_LOCK,
591                 COLOR_KILL,
592                 NO_SYNC,
593                 NO_EQU,
594                 NO_CARRIER,
595                 MACROVISION,
596                 NO_ACCESS,
597                 VTR
598         }
600         [CCode (cname="struct v4l2_output", has_type_id = false)]
601         public struct Output
602         {
603                 public uint32  index;
604                 public unowned string name;
605                 public uint32 type;
606                 public uint32 audioset;
607                 public uint32 modulator;
608                 public StdId std;
609         }
611         [CCode (cprefix="V4L2_OUTPUT_TYPE_", has_type_id = false)]
612         public enum OutputType
613         {
614                 MODULATOR,
615                 ANALOG,
616                 ANALOGVGAOVERLAY
617         }
619         [CCode (cname="struct v4l2_control", has_type_id = false)]
620         public struct Control
621         {
622                 public uint32 id;
623                 public int32 @value;
624         }
626         [CCode (cname="struct v4l2_ext_control", has_type_id = false)]
627         public struct ExtControl
628         {
629                 public uint32 id;
630                 public int32 @value;
631                 public int64 value64;
632                 public void* reserved;
633         }
635         [CCode (cname="struct v4l2_ext_controls", has_type_id = false)]
636         public struct ExtControls
637         {
638                 public uint32 ctrl_class;
639                 public uint32 count;
640                 public uint32 error_idx;
641                 public ExtControl* controls;
642         }
644         [CCode (cprefix="V4L2_CTRL_CLASS_", has_type_id = false)]
645         public enum ControlClass
646         {
647                 USER,
648                 MPEG,
649                 CAMERA
650         }
652         [CCode (cprefix="V4L2_")]
653         public const uint32 CTRL_ID_MASK;
654         [CCode (cname="V4L2_CTRL_ID2CLASS")]
655         public uint32 ctrl_id2class (uint32 id);
656         [CCode (cname="V4L2_CTRL_DRIVER_PRIV")]
657         public uint32 ctrl_driver_priv (uint32 id);
659         [CCode (cname="struct v4l2_queryctrl", has_type_id = false)]
660         public struct QueryControl
661         {
662                 public uint32 id;
663                 public ControlType type;
664                 public unowned string name;
665                 public int32 minimum;
666                 public int32 maximum;
667                 public int32 step;
668                 public int32 default_value;
669                 public uint32 flags;
670         }
672         [CCode (cname="struct v4l2_querymenu", has_type_id = false)]
673         public struct QueryMenu
674         {
675                 public uint32 id;
676                 public uint32 index;
677                 public unowned string name;
678                 public uint32 reserved;
679         }
681         [CCode (cprefix="V4L2_CTRL_FLAG_", has_type_id = false)]
682         public enum ControlFlags
683         {
684                 DISABLED,
685                 GRABBED,
686                 READ_ONLY,
687                 UPDATE,
688                 INACTIVE,
689                 SLIDER,
690                 NEXT_CTRL
691         }
693         [CCode (cprefix="V4L2_CID_", has_type_id = false)]
694         public enum UserClassControlIds
695         {
696                 BASE,
697                 USER_BASE,
698                 PRIVATE_BASE,
699                 USER_CLASS,
700                 BRIGHTNESS,
701                 CONTRAST,
702                 SATURATION,
703                 HUE,
704                 AUDIO_VOLUME,
705                 AUDIO_BALANCE,
706                 AUDIO_BASS,
707                 AUDIO_TREBLE,
708                 AUDIO_MUTE,
709                 AUDIO_LOUDNESS,
710                 AUTO_WHITE_BALANCE,
711                 DO_WHITE_BALANCE,
712                 RED_BALANCE,
713                 BLUE_BALANCE,
714                 GAMMA,
715                 EXPOSURE,
716                 AUTOGAIN,
717                 GAIN,
718                 HFLIP,
719                 VFLIP,
720                 POWER_LINE_FREQUENCY,
721                 HUE_AUTO,
722                 WHITE_BALANCE_TEMPERATURE,
723                 SHARPNESS,
724                 BACKLIGHT_COMPENSATION,
725                 CHROMA_AGC,
726                 COLOR_KILLER,
727                 LASTP1
728         }
730         [CCode (cprefix="V4L2_CID_POWER_LINE_FREQUENCY_", has_type_id = false)]
731         public enum PowerLineFrequency
732         {
733                 DISABLED,
734                 50HZ,
735                 60HZ
736         }
738         [CCode (cprefix="V4L2_CID_MPEG_", has_type_id = false)]
739         public enum MpegClassControlIds
740         {
741                 BASE,
742                 CLASS,
743                 STREAM_TYPE,
744                 STREAM_PID_PMT,
745                 STREAM_PID_AUDIO,
746                 STREAM_PID_VIDEO,
747                 STREAM_PID_PCR,
748                 STREAM_PES_ID_AUDIO,
749                 STREAM_PES_ID_VIDEO,
750                 STREAM_VBI_FMT,
751                 AUDIO_SAMPLING_FREQ,
752                 AUDIO_ENCODING,
753                 AUDIO_L1_BITRATE,
754                 AUDIO_L2_BITRATE,
755                 AUDIO_L3_BITRATE,
756                 AUDIO_MODE,
757                 AUDIO_MODE_EXTENSION,
758                 AUDIO_EMPHASIS,
759                 AUDIO_CRC,
760                 AUDIO_MUTE,
761                 VIDEO_ENCODING,
762                 VIDEO_ASPECT,
763                 VIDEO_B_FRAMES,
764                 VIDEO_GOP_SIZE,
765                 VIDEO_GOP_CLOSURE,
766                 VIDEO_PULLDOWN,
767                 VIDEO_BITRATE_MODE,
768                 VIDEO_BITRATE,
769                 VIDEO_BITRATE_PEAK,
770                 VIDEO_TEMPORAL_DECIMATION,
771                 VIDEO_MUTE,
772                 VIDEO_MUTE_YUV
773         }
775         [CCode (cprefix="V4L2_MPEG_STREAM_TYPE_", has_type_id = false)]
776         public enum MpegStreamType
777         {
778                 MPEG2_PS,
779                 MPEG2_TS,
780                 MPEG1_SS,
781                 MPEG2_DVD,
782                 MPEG1_VCD,
783                 MPEG2_SVCD
784         }
786         [CCode (cprefix="V4L2_MPEG_STREAM_VBI_FMT_", has_type_id = false)]
787         public enum MpegStreamVbiFmt
788         {
789                 NONE,
790                 IVTV
791         }
793         [CCode (cprefix="V4L2_MPEG_AUDIO_SAMPLING_FREQ_", has_type_id = false)]
794         public enum MpegAudioSamplingFreq
795         {
796                 @44100,
797                 @48000,
798                 @32000
799         }
801         [CCode (cprefix="V4L2_MPEG_AUDIO_ENCODING_", has_type_id = false)]
802         public enum MpegAudioEncoding
803         {
804                 LAYER_1,
805                 LAYER_2,
806                 LAYER_3
807         }
809         [CCode (cprefix="V4L2_MPEG_AUDIO_L1_BITRATE_", has_type_id = false)]
810         public enum MpegAudioL1Bitrate
811         {
812                 32K,
813                 64K,
814                 96K,
815                 128K,
816                 160K,
817                 192K,
818                 224K,
819                 256K,
820                 288K,
821                 320K,
822                 352K,
823                 384K,
824                 416K,
825                 448K
826         }
828         [CCode (cprefix="V4L2_MPEG_AUDIO_L2_BITRATE_", has_type_id = false)]
829         public enum MpegAudioL2Bitrate
830         {
831                 32K,
832                 48K,
833                 56K,
834                 64K,
835                 80K,
836                 96K,
837                 112K,
838                 128K,
839                 160K,
840                 192K,
841                 224K,
842                 256K,
843                 320K,
844                 384K
845         }
847         [CCode (cprefix="V4L2_MPEG_AUDIO_L3_BITRATE_", has_type_id = false)]
848         public enum MpegAudioL3Bitrate
849         {
850                 32K,
851                 40K,
852                 48K,
853                 56K,
854                 64K,
855                 80K,
856                 96K,
857                 112K,
858                 128K,
859                 160K,
860                 192K,
861                 224K,
862                 256K,
863                 320K,
864         }
866         [CCode (cprefix="V4L2_MPEG_AUDIO_MODE_", has_type_id = false)]
867         public enum MpegAudioMode
868         {
869                 STEREO,
870                 JOINT_STEREO,
871                 DUAL,
872                 MONO
873         }
875         [CCode (cprefix="V4L2_MPEG_AUDIO_MODE_EXTENSION_", has_type_id = false)]
876         public enum MpegAudioModeExtension
877         {
878                 BOUND_4,
879                 BOUND_8,
880                 BOUND_12,
881                 BOUND_16
882         }
884         [CCode (cprefix="V4L2_MPEG_AUDIO_EMPHASIS_", has_type_id = false)]
885         public enum MpegAudioEmphasis
886         {
887                 NONE,
888                 50_DIV_15_uS,
889                 CCITT_J17,
890         }
892         [CCode (cprefix="V4L2_MPEG_AUDIO_CRC_", has_type_id = false)]
893         public enum MpegAudioCrc
894         {
895                 NONE,
896                 CRC16
897         }
899         [CCode (cprefix="V4L2_MPEG_VIDEO_ENCODING_", has_type_id = false)]
900         public enum MpegVideoEncoding
901         {
902                 MPEG_1,
903                 MPEG_2
904         }
906         [CCode (cprefix="V4L2_MPEG_VIDEO_ASPECT_", has_type_id = false)]
907         public enum MpegVideoAspect
908         {
909                 1x1,
910                 4x3,
911                 16x9,
912                 221x100
913         }
915         [CCode (cprefix="V4L2_MPEG_VIDEO_BITRATE_MODE_", has_type_id = false)]
916         public enum MpegVideoBitrateMode
917         {
918                 VBR,
919                 CBR
920         }
922         [CCode (cprefix="V4L2_CID_MPEG_CX2341X_", has_type_id = false)]
923         public enum MpegCx2341xClassControlIds
924         {
925                 BASE,
926                 VIDEO_SPATIAL_FILTER_MODE,
927                 VIDEO_SPATIAL_FILTER,
928                 VIDEO_LUMA_SPATIAL_FILTER_TYPE,
929                 VIDEO_CHROMA_SPATIAL_FILTER_TYPE,
930                 VIDEO_TEMPORAL_FILTER_MODE,
931                 VIDEO_TEMPORAL_FILTER,
932                 VIDEO_MEDIAN_FILTER_TYPE,
933                 VIDEO_LUMA_MEDIAN_FILTER_BOTTOM,
934                 VIDEO_LUMA_MEDIAN_FILTER_TOP,
935                 VIDEO_CHROMA_MEDIAN_FILTER_BOTTOM,
936                 VIDEO_CHROMA_MEDIAN_FILTER_TOP,
937                 STREAM_INSERT_NAV_PACKETS
938         }
940         [CCode (cprefix="V4L2_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE_", has_type_id = false)]
941         public enum MpegCx2341xVideoSpatialFilterMode
942         {
943                 MANUAL,
944                 AUTO,
945         }
947         [CCode (cprefix="V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_", has_type_id = false)]
948         public enum MpegCx2341xVideoLumaSpatialFilterType
949         {
950                 OFF,
951                 1D_HOR,
952                 1D_VERT,
953                 2D_HV_SEPARABLE,
954                 2D_SYM_NON_SEPARABLE,
955         }
957         [CCode (cprefix="V4L2_MPEG_CX2341X_VIDEO_CHROMA_SPATIAL_FILTER_TYPE_", has_type_id = false)]
958         public enum MpegCx2341xVideoChromaSpatialFilterType
959         {
960                 OFF,
961                 1D_HOR
962         }
964         [CCode (cprefix="V4L2_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER_MODE_", has_type_id = false)]
965         public enum MpegCx2341xVideoTemporalFilterMode
966         {
967                 MANUAL,
968                 AUTO
969         }
971         [CCode (cprefix="V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_", has_type_id = false)]
972         public enum MpegCx2341xVideoMedianFilterType
973         {
974                 OFF,
975                 HOR,
976                 VERT,
977                 HOR_VERT,
978                 DIAG
979         }
981         [CCode (cprefix="V4L2_CID_", has_type_id = false)]
982         public enum CameraClassControlIds
983         {
984                 CAMERA_CLASS_BASE,
985                 CAMERA_CLASS,
986                 EXPOSURE_AUTO,
987                 EXPOSURE_ABSOLUTE,
988                 EXPOSURE_AUTO_PRIORITY,
989                 PAN_RELATIVE,
990                 TILT_RELATIVE,
991                 PAN_RESET,
992                 TILT_RESET,
993                 PAN_ABSOLUTE,
994                 TILT_ABSOLUTE,
995                 FOCUS_ABSOLUTE,
996                 FOCUS_RELATIVE,
997                 FOCUS_AUTO
998         }
1000         [CCode (cprefix="V4L2_EXPOSURE_", has_type_id = false)]
1001         public enum ExposureAutoType
1002         {
1003                 AUTO,
1004                 MANUAL,
1005                 SHUTTER_PRIORITY,
1006                 APERTURE_PRIORITY
1007         }
1009         [CCode (cname="struct v4l2_tuner", has_type_id = false)]
1010         public struct Tuner
1011         {
1012                 public uint32 index;
1013                 public unowned string name;
1014                 public TunerType type;
1015                 public uint32 capability;
1016                 public uint32 rangelow;
1017                 public uint32 rangehigh;
1018                 public uint32 rxsubchans;
1019                 public uint32 audmode;
1020                 public int32 @signal;
1021                 public int32 afc;
1022         }
1024         [CCode (cname="struct v4l2_modulator", has_type_id = false)]
1025         public struct Modulator
1026         {
1027                 public uint32 index;
1028                 public unowned string name;
1029                 public uint32 capability;
1030                 public uint32 rangelow;
1031                 public uint32 rangehigh;
1032                 public uint32 txsubchans;
1033         }
1035         [CCode (cprefix="V4L2_TUNER_CAP_", has_type_id = false)]
1036         public enum TunerCapabilities
1037         {
1038                 LOW,
1039                 NORM,
1040                 STEREO,
1041                 LANG2,
1042                 SAP,
1043                 LANG1
1044         }
1046         [CCode (cprefix="V4L2_TUNER_SUB_", has_type_id = false)]
1047         public enum TunerSubs
1048         {
1049                 MONO,
1050                 STEREO,
1051                 LANG2,
1052                 SAP,
1053                 LANG1
1054         }
1056         [CCode (cprefix="V4L2_TUNER_MODE_", has_type_id = false)]
1057         public enum TunerModes
1058         {
1059                 MONO,
1060                 STEREO,
1061                 LANG2,
1062                 SAP,
1063                 LANG1,
1064                 LANG1_LANG2
1065         }
1067         [CCode (cname="struct v4l2_frequency", has_type_id = false)]
1068         public struct Frequency
1069         {
1070                 public uint32 tuner;
1071                 public TunerType type;
1072                 public uint32 frequency;
1073         }
1075         [CCode (cname="struct v4l2_hw_freq_seek", has_type_id = false)]
1076         public struct HwFreqSeek
1077         {
1078                 public uint32 tuner;
1079                 public TunerType type;
1080                 public uint32 seek_upward;
1081                 public uint32 wrap_around;
1082         }
1084         [CCode (cname="struct v4l2_audio", has_type_id = false)]
1085         public struct Audio
1086         {
1087                 public uint32 index;
1088                 public unowned string name;
1089                 public uint32 capability;
1090                 public uint32 mode;
1091         }
1093         [CCode (cprefix="V4L2_AUDCAP_", has_type_id = false)]
1094         public enum AudioCapabilities
1095         {
1096                 STEREO,
1097                 AVL
1098         }
1100         [CCode (cprefix="V4L2_")]
1101         public const uint32 AUDMODE_AVL;
1103         [CCode (cname="struct v4l2_audioout", has_type_id = false)]
1104         public struct AudioOut
1105         {
1106                 public uint32 index;
1107                 public unowned string name;
1108                 public uint32 capability;
1109                 public uint32 mode;
1110         }
1112         [CCode (cprefix="V4L2_ENC_IDX_FRAME_", has_type_id = false)]
1113         public enum EncIdxFrame
1114         {
1115                 I,
1116                 P,
1117                 B,
1118                 MASK
1119         }
1121         [CCode (cname="struct v4l2_enc_idx_entry", has_type_id = false)]
1122         public struct EncIdxEntry
1123         {
1124                 public uint64 offset;
1125                 public uint64 pts;
1126                 public uint32 length;
1127                 public uint32 flags;
1128         }
1130         [CCode (cprefix="V4L2_")]
1131         public const int ENC_IDX_ENTRIES;
1133         [CCode (cname="struct v4l2_enc_idx", has_type_id = false)]
1134         public struct EncIdx
1135         {
1136                 public uint32 entries;
1137                 public uint32 entries_cap;
1138                 public EncIdxEntry[] entry;
1139         }
1141         [CCode (cprefix="V4L2_ENC_CMD_", has_type_id = false)]
1142         public enum EncCmd
1143         {
1144                 START,
1145                 STOP,
1146                 PAUSE,
1147                 RESUME,
1148                 STOP_AT_GOP_END
1149         }
1151         [CCode (cname="struct raw", has_type_id = false)]
1152         public struct Raw
1153         {
1154                 public uint32 data[8];
1155         }
1157         [CCode (cname="struct v4l2_encoder_cmd", has_type_id = false)]
1158         public struct EncoderCmd
1159         {
1160                 public uint32 cmd;
1161                 public uint32 flags;
1162                 public Raw raw;
1163         }
1165         [CCode (cname="struct v4l2_vbi_format", has_type_id = false)]
1166         public struct VbiFormat
1167         {
1168                 public uint32 sampling_rate;
1169                 public uint32 offset;
1170                 public uint32 samples_per_line;
1171                 public uint32 sample_format;
1172                 public int32 start[2];
1173                 public uint32 count[2];
1174                 public uint32 flags;
1175         }
1177         [CCode (cprefix="V4L2_VBI_", has_type_id = false)]
1178         public enum VbiFlags
1179         {
1180                 UNSYNC,
1181                 INTERLACED
1182         }
1184         [CCode (cname="struct v4l2_sliced_vbi_format", has_type_id = false)]
1185         public struct SlicedVbiFormat
1186         {
1187                 public uint16 service_set;
1188                 public uint16[] service_lines;
1189                 public uint32 io_size;
1190                 public uint32[] reserved;
1191         }
1193         [CCode (cprefix="V4L2_SLICED_", has_type_id = false)]
1194         public enum SlicedType
1195         {
1196                 ELETEXT_B,
1197                 VPS,
1198                 CAPTION_525,
1199                 WSS_625,
1200                 VBI_525,
1201                 VBI_625,
1202                 T
1203         }
1205         [CCode (cname="struct v4l2_sliced_vbi_cap", has_type_id = false)]
1206         public struct SlicedVbiCap
1207         {
1208                 public uint16 service_set;
1209                 public uint16[] service_lines;
1210                 public BufferType type;
1211         }
1213         [CCode (cname="struct v4l2_sliced_vbi_data", has_type_id = false)]
1214         public struct SlicedVbiData
1215         {
1216                 public uint32 id;
1217                 public uint32 field;
1218                 public uint32 line;
1219                 public uint8 data[48];
1220         }
1222         [CCode (has_type_id = false)]
1223         public struct Fmt
1224         {
1225                 public PixelFormat pix;
1226                 public Window win;
1227                 public VbiFormat vbi;
1228                 public SlicedVbiFormat sliced;
1229                 public uint8 raw_data[200];
1230         }
1232         [CCode (cname="struct v4l2_format", has_type_id = false)]
1233         public struct Format
1234         {
1235                 public BufferType type;
1236                 public Fmt fmt;
1237         }
1239         [CCode (has_type_id = false)]
1240         public struct Parm
1241         {
1242                 public CaptureParm capture;
1243                 public OutputParm output;
1244                 public uint8 raw_data[200];
1245         }
1247         [CCode (cname="struct v4l2_streamparm", has_type_id = false)]
1248         public struct StreamParm
1249         {
1250                 public BufferType type;
1251                 public unowned Parm parm;
1252         }
1254         [CCode (cprefix="V4L2_CHIP_MATCH_", has_type_id = false)]
1255         public enum ChipMatch
1256         {
1257                 HOST,
1258                 I2C_DRIVER,
1259                 I2C_ADDR
1260         }
1262         [CCode (cname="struct v4l2_register", has_type_id = false)]
1263         public struct Register
1264         {
1265                 public uint32 match_type;
1266                 public uint32 match_chip;
1267                 public uint64 reg;
1268                 public uint64 val;
1269         }
1271         [CCode (cname="struct v4l2_chip_ident", has_type_id = false)]
1272         public struct ChipIdent
1273         {
1274                 public uint32 match_type;
1275                 public uint32 match_chip;
1276                 public uint32 ident;
1277                 public uint32 revision;
1278         }
1280         public const int VIDIOC_QUERYCAP;
1281         public const int VIDIOC_RESERVED;
1282         public const int VIDIOC_ENUM_FMT;
1283         public const int VIDIOC_G_FMT;
1284         public const int VIDIOC_S_FMT;
1285         public const int VIDIOC_REQBUFS;
1286         public const int VIDIOC_QUERYBUF;
1287         public const int VIDIOC_G_FBUF;
1288         public const int VIDIOC_S_FBUF;
1289         public const int VIDIOC_OVERLAY;
1290         public const int VIDIOC_QBUF;
1291         public const int VIDIOC_DQBUF;
1292         public const int VIDIOC_STREAMON;
1293         public const int VIDIOC_STREAMOFF;
1294         public const int VIDIOC_G_PARM;
1295         public const int VIDIOC_S_PARM;
1296         public const int VIDIOC_G_STD;
1297         public const int VIDIOC_S_STD;
1298         public const int VIDIOC_ENUMSTD;
1299         public const int VIDIOC_ENUMINPUT;
1300         public const int VIDIOC_G_CTRL;
1301         public const int VIDIOC_S_CTRL;
1302         public const int VIDIOC_G_TUNER;
1303         public const int VIDIOC_S_TUNER;
1304         public const int VIDIOC_G_AUDIO;
1305         public const int VIDIOC_S_AUDIO;
1306         public const int VIDIOC_QUERYCTRL;
1307         public const int VIDIOC_QUERYMENU;
1308         public const int VIDIOC_G_INPUT;
1309         public const int VIDIOC_S_INPUT;
1310         public const int VIDIOC_G_OUTPUT;
1311         public const int VIDIOC_S_OUTPUT;
1312         public const int VIDIOC_ENUMOUTPUT;
1313         public const int VIDIOC_G_AUDOUT;
1314         public const int VIDIOC_S_AUDOUT;
1315         public const int VIDIOC_G_MODULATOR;
1316         public const int VIDIOC_S_MODULATOR;
1317         public const int VIDIOC_G_FREQUENCY;
1318         public const int VIDIOC_S_FREQUENCY;
1319         public const int VIDIOC_CROPCAP;
1320         public const int VIDIOC_G_CROP;
1321         public const int VIDIOC_S_CROP;
1322         public const int VIDIOC_G_JPEGCOMP;
1323         public const int VIDIOC_S_JPEGCOMP;
1324         public const int VIDIOC_QUERYSTD;
1325         public const int VIDIOC_TRY_FMT;
1326         public const int VIDIOC_ENUMAUDIO;
1327         public const int VIDIOC_ENUMAUDOUT;
1328         public const int VIDIOC_G_PRIORITY;
1329         public const int VIDIOC_S_PRIORITY;
1330         public const int VIDIOC_G_SLICED_VBI_CAP;
1331         public const int VIDIOC_LOG_STATUS;
1332         public const int VIDIOC_G_EXT_CTRLS;
1333         public const int VIDIOC_S_EXT_CTRLS;
1334         public const int VIDIOC_TRY_EXT_CTRLS;
1335         public const int VIDIOC_ENUM_FRAMESIZES;
1336         public const int VIDIOC_ENUM_FRAMEINTERVALS;
1337         public const int VIDIOC_G_ENC_INDEX;
1338         public const int VIDIOC_ENCODER_CMD;
1339         public const int VIDIOC_TRY_ENCODER_CMD;
1340         public const int VIDIOC_DBG_S_REGISTER;
1341         public const int VIDIOC_DBG_G_REGISTER;
1342         public const int VIDIOC_G_CHIP_IDENT;
1343         public const int VIDIOC_S_HW_FREQ_SEEK;
1344         public const int VIDIOC_OVERLAY_OLD;
1345         public const int VIDIOC_S_PARM_OLD;
1346         public const int VIDIOC_S_CTRL_OLD;
1347         public const int VIDIOC_G_AUDIO_OLD;
1348         public const int VIDIOC_G_AUDOUT_OLD;
1349         public const int VIDIOC_CROPCAP_OLD;
1350         public const int BASE_VIDIOC_PRIVATE;