codegen: Replace get_unref_expression_ with destroy_variable
[vala-lang.git] / vapi / v4l2.vapi
blob4b1a8498bd42c70dc09f8b066b81a6cb2dc08900
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_")]
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         }
40         
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);
47         
48         [CCode (cprefix="V4L2_BUF_TYPE_")]
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         }
61         
62         [CCode (cprefix="V4L2_CTRL_TYPE_")]
63         public enum ControlType
64         {
65                 INTEGER,
66                 BOOLEAN,
67                 MENU,
68                 BUTTON,
69                 INTEGER64,
70                 CTRL_CLASS
71         }
72         
73         [CCode (cprefix="V4L2_TUNER_")]
74         public enum TunerType
75         {
76                 RADIO,
77                 ANALOG_TV,
78                 DIGITAL_TV
79         }
80         
81         [CCode (cprefix="V4L2_MEMORY_")]
82         public enum Memory
83         {
84                 MMAP,
85                 USERPTR,
86                 OVERLAY
87         }
88         
89         [CCode (cprefix="V4L2_COLORSPACE_")]
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         }
101         
102         [CCode (cprefix="V4L2_PRIORITY_")]
103         public enum Priority
104         {
105                 UNSET,
106                 BACKGROUND,
107                 INTERACTIVE,
108                 RECORD,
109                 DEFAULT
110         }
111         
112         [CCode (cname="struct v4l2_rect")]
113         public struct Rect
114         {
115                 public int32 left;
116                 public int32 top;
117                 public int32 width;
118                 public int32 height;
119         }
120         
121         [CCode (cname="struct v4l2_fract")]
122         public struct Fraction
123         {
124                 public uint32 numerator;
125                 public uint32 denominator;
126         }
127         
128         [CCode (cprefix="V4L2_CAP_")]
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         }
148         
149         [CCode (cname="struct v4l2_capability")]
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         }
159         
160         [CCode (cprefix="V4L2_PIX_FMT_")]
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         }
214         
215         [CCode (cname="struct v4l2_pix_format")]
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         }
227         
228         [CCode (cprefix="V4L2_FMT_FLAG_")]
229         public enum FormatFlag
230         {
231                 COMPRESSED
232         }
233         
234         [CCode (cname="struct v4l2_fmtdesc")]
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         }
243         
244         [CCode (cprefix="V4L2_FRMSIZE_TYPE_")]
245         public enum FramesizeTypes
246         {
247                 DISCRETE,
248                 CONTINUOUS,
249                 STEPWISE
250         }
251         
252         [CCode (cname="struct v4l2_frmsize_discrete")]
253         public struct FramesizeDiscrete
254         {
255                 public uint32 width;
256                 public uint32 height;
257         }
258         
259         [CCode (cname="struct v4l2_frmsize_stepwise")]
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         }
269         
270         [CCode (cname="struct v4l2_frmsizeenum")]
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         }
279         
280         [CCode (cprefix="V4L2_FRMIVAL_TYPE_")]
281         public enum FrameivalTypes
282         {
283                 DISCRETE,
284                 CONTINUOUS,
285                 STEPWISE
286         }
287         
288         [CCode (cname="struct v4l2_frmival_stepwise")]
289         public struct FrameivalStepwise
290         {
291                 public Fraction min;
292                 public Fraction max;
293                 public Fraction step;
294         }
295         
296         [CCode (cname="struct v4l2_frmivalenum")]
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         }
307         
308         [CCode (cname="struct v4l2_timecode")]
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         }
319         
320         [CCode (cprefix="V4L2_TC_TYPE_")]
321         public enum TimecodeType
322         {
323                 24FPS,
324                 25FPS,
325                 30FPS,
326                 50FPS,
327                 60FPS
328         }
329         
330         [CCode (cprefix="V4L2_TC_FLAGS_")]
331         public enum TimecodeFlags
332         {
333                 DROPFRAME,
334                 COLORFRAME
335         }
336         
337         [CCode (cprefix="V4L2_TC_USERBITS_")]
338         public enum TimecodeUserbits
339         {
340                 field,
341                 USERDEFINED,
342                 8BITCHARS
343         }
344         
345         
346         [CCode (cname="struct v4l2_jpegcompression")]
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         }
357         
358         [CCode (cprefix="V4L2_JPEG_MARKER_")]
359         public enum JpegMarker
360         {
361                 DHT,
362                 DQT,
363                 DRI,
364                 COM,
365                 APP
366         }
367         
368         [CCode (cname="struct v4l2_requestbuffers")]
369         public struct RequestBuffers
370         {
371                 public uint32 count;
372                 public BufferType type;
373                 public Memory memory;
374         }
375         
376         [CCode (cname="m")]
377         public struct M
378         {
379                 public uint32 offset;
380                 public ulong userptr;
381         }
382         
383         [CCode (cname="struct v4l2_buffer")]
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         }
400         
401         [CCode (cprefix="V4L2_BUF_FLAG_")]
402         public enum BufferFlags
403         {
404                 MAPPED,
405                 QUEUED,
406                 DONE,
407                 KEYFRAME,
408                 PFRAME,
409                 BFRAME,
410                 TIMECODE,
411                 INPUT
412         }
413         
414         [CCode (cname="struct v4l2_framebuffer")]
415         public struct FrameBuffer
416         {
417                 public uint32 capability;
418                 public uint32 flags;
419                 public void* @base;
420                 public PixelFormat fmt;
421         }
422         
423         [CCode (cprefix="V4L2_FBUF_CAP_")]
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         }
434         
435         [CCode (cprefix="V4L2_FBUF_FLAG_")]
436         public enum FrameBufferFlags
437         {
438                 PRIMARY,
439                 OVERLAY,
440                 CHROMAKEY,
441                 LOCAL_ALPHA,
442                 GLOBAL_ALPHA,
443                 LOCAL_INV_ALPHA
444         }
445         
446         [CCode (cname="struct v4l2_clip")]
447         public struct Clip
448         {
449                 public Rect c;
450                 public Clip* next;
451         }
452         
453         [CCode (cname="struct v4l2_window")]
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         }
464         
465         [CCode (cname="struct v4l2_captureparm")]
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         }
474         
475         [CCode (cprefix="V4L2_")]
476         public const uint32 MODE_HIGHQUALITY;
477         [CCode (cprefix="V4L2_")]
478         public const uint32 CAP_TIMEPERFRAME;
479         
480         [CCode (cname="struct v4l2_outputparm")]
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         }
489         
490         [CCode (cname="struct v4l2_cropcap")]
491         public struct CropCap
492         {
493                 public BufferType  type;
494                 public Rect bounds;
495                 public Rect defrect;
496                 public Fraction pixelaspect;
497         }
498         
499         [CCode (cname="struct v4l2_crop")]
500         public struct Crop
501         {
502                 public BufferType type;
503                 public Rect c;
504         }
505         
506         [CCode (cprefix="V4L2_STD_")]
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         }
551         
552         [CCode (cname="v4l2_std_id")]
553         public struct StdId : uint64 { }
555         [CCode (cname="struct v4l2_standard")]
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         }
564         
565         [CCode (cname="struct v4l2_input")]
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         }
576         
577         [CCode (cprefix="V4L2_INPUT_TYPE_")]
578         public enum InputType
579         {
580                 TUNER,
581                 CAMERA
582         }
583         
584         [CCode (cprefix="V4L2_IN_ST_")]
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         }
599         
600         [CCode (cname="struct v4l2_output")]
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         }
610         
611         [CCode (cprefix="V4L2_OUTPUT_TYPE_")]
612         public enum OutputType
613         {
614                 MODULATOR,
615                 ANALOG,
616                 ANALOGVGAOVERLAY
617         }
618         
619         [CCode (cname="struct v4l2_control")]
620         public struct Control
621         {
622                 public uint32 id;
623                 public int32 @value;
624         }
625         
626         [CCode (cname="struct v4l2_ext_control")]
627         public struct ExtControl
628         {
629                 public uint32 id;
630                 public int32 @value;
631                 public int64 value64;
632                 public void* reserved;
633         }
634         
635         [CCode (cname="struct v4l2_ext_controls")]
636         public struct ExtControls
637         {
638                 public uint32 ctrl_class;
639                 public uint32 count;
640                 public uint32 error_idx;
641                 public ExtControl* controls;
642         }
643         
644         [CCode (cprefix="V4L2_CTRL_CLASS_")]
645         public enum ControlClass
646         {
647                 USER,
648                 MPEG,
649                 CAMERA
650         }
651         
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);
658         
659         [CCode (cname="struct v4l2_queryctrl")]
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         }
671         
672         [CCode (cname="struct v4l2_querymenu")]
673         public struct QueryMenu
674         {
675                 public uint32 id;
676                 public uint32 index;
677                 public unowned string name;
678                 public uint32 reserved;
679         }
680         
681         [CCode (cprefix="V4L2_CTRL_FLAG_")]
682         public enum ControlFlags
683         {
684                 DISABLED,
685                 GRABBED,
686                 READ_ONLY,
687                 UPDATE,
688                 INACTIVE,
689                 SLIDER,
690                 NEXT_CTRL
691         }
692         
693         [CCode (cprefix="V4L2_CID_")]
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         }
729         
730         [CCode (cprefix="V4L2_CID_POWER_LINE_FREQUENCY_")]
731         public enum PowerLineFrequency
732         {
733                 DISABLED,
734                 50HZ,
735                 60HZ
736         }
737         
738         [CCode (cprefix="V4L2_CID_MPEG_")]
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         }
774         
775         [CCode (cprefix="V4L2_MPEG_STREAM_TYPE_")]
776         public enum MpegStreamType
777         {
778                 MPEG2_PS,
779                 MPEG2_TS,
780                 MPEG1_SS,
781                 MPEG2_DVD,
782                 MPEG1_VCD,
783                 MPEG2_SVCD
784         }
785         
786         [CCode (cprefix="V4L2_MPEG_STREAM_VBI_FMT_")]
787         public enum MpegStreamVbiFmt
788         {
789                 NONE,
790                 IVTV
791         }
792         
793         [CCode (cprefix="V4L2_MPEG_AUDIO_SAMPLING_FREQ_")]
794         public enum MpegAudioSamplingFreq
795         {
796                 @44100,
797                 @48000,
798                 @32000
799         }
800         
801         [CCode (cprefix="V4L2_MPEG_AUDIO_ENCODING_")]
802         public enum MpegAudioEncoding
803         {
804                 LAYER_1,
805                 LAYER_2,
806                 LAYER_3
807         }
808         
809         [CCode (cprefix="V4L2_MPEG_AUDIO_L1_BITRATE_")]
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         }
827         
828         [CCode (cprefix="V4L2_MPEG_AUDIO_L2_BITRATE_")]
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         }
846         
847         [CCode (cprefix="V4L2_MPEG_AUDIO_L3_BITRATE_")]
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         }
865         
866         [CCode (cprefix="V4L2_MPEG_AUDIO_MODE_")]
867         public enum MpegAudioMode
868         {
869                 STEREO,
870                 JOINT_STEREO,
871                 DUAL,
872                 MONO
873         }
874         
875         [CCode (cprefix="V4L2_MPEG_AUDIO_MODE_EXTENSION_")]
876         public enum MpegAudioModeExtension
877         {
878                 BOUND_4,
879                 BOUND_8,
880                 BOUND_12,
881                 BOUND_16
882         }
883         
884         [CCode (cprefix="V4L2_MPEG_AUDIO_EMPHASIS_")]
885         public enum MpegAudioEmphasis
886         {
887                 NONE,
888                 50_DIV_15_uS,
889                 CCITT_J17,
890         }
891         
892         [CCode (cprefix="V4L2_MPEG_AUDIO_CRC_")]
893         public enum MpegAudioCrc
894         {
895                 NONE,
896                 CRC16
897         }
898         
899         [CCode (cprefix="V4L2_MPEG_VIDEO_ENCODING_")]
900         public enum MpegVideoEncoding
901         {
902                 MPEG_1,
903                 MPEG_2
904         }
905         
906         [CCode (cprefix="V4L2_MPEG_VIDEO_ASPECT_")]
907         public enum MpegVideoAspect
908         {
909                 1x1,
910                 4x3,
911                 16x9,
912                 221x100
913         }
914         
915         [CCode (cprefix="V4L2_MPEG_VIDEO_BITRATE_MODE_")]
916         public enum MpegVideoBitrateMode
917         {
918                 VBR,
919                 CBR
920         }
921         
922         [CCode (cprefix="V4L2_CID_MPEG_CX2341X_")]
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         }
939         
940         [CCode (cprefix="V4L2_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE_")]
941         public enum MpegCx2341xVideoSpatialFilterMode
942         {
943                 MANUAL,
944                 AUTO,
945         }
946         
947         [CCode (cprefix="V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_")]
948         public enum MpegCx2341xVideoLumaSpatialFilterType
949         {
950                 OFF,
951                 1D_HOR,
952                 1D_VERT,
953                 2D_HV_SEPARABLE,
954                 2D_SYM_NON_SEPARABLE,
955         }
956         
957         [CCode (cprefix="V4L2_MPEG_CX2341X_VIDEO_CHROMA_SPATIAL_FILTER_TYPE_")]
958         public enum MpegCx2341xVideoChromaSpatialFilterType
959         {
960                 OFF,
961                 1D_HOR
962         }
963         
964         [CCode (cprefix="V4L2_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER_MODE_")]
965         public enum MpegCx2341xVideoTemporalFilterMode
966         {
967                 MANUAL,
968                 AUTO
969         }
970         
971         [CCode (cprefix="V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_")]
972         public enum MpegCx2341xVideoMedianFilterType
973         {
974                 OFF,
975                 HOR,
976                 VERT,
977                 HOR_VERT,
978                 DIAG
979         }
980         
981         [CCode (cprefix="V4L2_CID_")]
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         }
999         
1000         [CCode (cprefix="V4L2_EXPOSURE_")]
1001         public enum ExposureAutoType
1002         {
1003                 AUTO,
1004                 MANUAL,
1005                 SHUTTER_PRIORITY,
1006                 APERTURE_PRIORITY
1007         }
1009         [CCode (cname="struct v4l2_tuner")]
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         }
1023         
1024         [CCode (cname="struct v4l2_modulator")]
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         }
1034         
1035         [CCode (cprefix="V4L2_TUNER_CAP_")]
1036         public enum TunerCapabilities
1037         {
1038                 LOW,
1039                 NORM,
1040                 STEREO,
1041                 LANG2,
1042                 SAP,
1043                 LANG1
1044         }
1045         
1046         [CCode (cprefix="V4L2_TUNER_SUB_")]
1047         public enum TunerSubs
1048         {
1049                 MONO,
1050                 STEREO,
1051                 LANG2,
1052                 SAP,
1053                 LANG1
1054         }
1055         
1056         [CCode (cprefix="V4L2_TUNER_MODE_")]
1057         public enum TunerModes
1058         {
1059                 MONO,
1060                 STEREO,
1061                 LANG2,
1062                 SAP,
1063                 LANG1,
1064                 LANG1_LANG2
1065         }
1066         
1067         [CCode (cname="struct v4l2_frequency")]
1068         public struct Frequency
1069         {
1070                 public uint32 tuner;
1071                 public TunerType type;
1072                 public uint32 frequency;
1073         }
1074         
1075         [CCode (cname="struct v4l2_hw_freq_seek")]
1076         public struct HwFreqSeek
1077         {
1078                 public uint32 tuner;
1079                 public TunerType type;
1080                 public uint32 seek_upward;
1081                 public uint32 wrap_around;
1082         }
1083         
1084         [CCode (cname="struct v4l2_audio")]
1085         public struct Audio
1086         {
1087                 public uint32 index;
1088                 public unowned string name;
1089                 public uint32 capability;
1090                 public uint32 mode;
1091         }
1092         
1093         [CCode (cprefix="V4L2_AUDCAP_")]
1094         public enum AudioCapabilities
1095         {
1096                 STEREO,
1097                 AVL
1098         }
1100         [CCode (cprefix="V4L2_")]
1101         public const uint32 AUDMODE_AVL;
1102         
1103         [CCode (cname="struct v4l2_audioout")]
1104         public struct AudioOut
1105         {
1106                 public uint32 index;
1107                 public unowned string name;
1108                 public uint32 capability;
1109                 public uint32 mode;
1110         }
1111         
1112         [CCode (cprefix="V4L2_ENC_IDX_FRAME_")]
1113         public enum EncIdxFrame
1114         {
1115                 I,
1116                 P,
1117                 B,
1118                 MASK
1119         }
1120         
1121         [CCode (cname="struct v4l2_enc_idx_entry")]
1122         public struct EncIdxEntry
1123         {
1124                 public uint64 offset;
1125                 public uint64 pts;
1126                 public uint32 length;
1127                 public uint32 flags;
1128         }
1129         
1130         [CCode (cprefix="V4L2_")]
1131         public const int ENC_IDX_ENTRIES;
1132         
1133         [CCode (cname="struct v4l2_enc_idx")]
1134         public struct EncIdx
1135         {
1136                 public uint32 entries;
1137                 public uint32 entries_cap;
1138                 public EncIdxEntry[] entry;
1139         }
1140         
1141         [CCode (cprefix="V4L2_ENC_CMD_")]
1142         public enum EncCmd
1143         {
1144                 START,
1145                 STOP,
1146                 PAUSE,
1147                 RESUME,
1148                 STOP_AT_GOP_END
1149         }
1150         
1151         [CCode (cname="struct raw")]
1152         public struct Raw
1153         {
1154                 public uint32 data[8];
1155         }
1156         
1157         [CCode (cname="struct v4l2_encoder_cmd")]
1158         public struct EncoderCmd
1159         {
1160                 public uint32 cmd;
1161                 public uint32 flags;
1162                 public Raw raw;
1163         }
1164         
1165         [CCode (cname="struct v4l2_vbi_format")]
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         }
1176         
1177         [CCode (cprefix="V4L2_VBI_")]
1178         public enum VbiFlags
1179         {
1180                 UNSYNC,
1181                 INTERLACED
1182         }
1183         
1184         [CCode (cname="struct v4l2_sliced_vbi_format")]
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         }
1192         
1193         [CCode (cprefix="V4L2_SLICED_")]
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         }
1204         
1205         [CCode (cname="struct v4l2_sliced_vbi_cap")]
1206         public struct SlicedVbiCap
1207         {
1208                 public uint16 service_set;
1209                 public uint16[] service_lines;
1210                 public BufferType type;
1211         }
1212         
1213         [CCode (cname="struct v4l2_sliced_vbi_data")]
1214         public struct SlicedVbiData
1215         {
1216                 public uint32 id;
1217                 public uint32 field;
1218                 public uint32 line;
1219                 public uint8 data[48];
1220         }
1221         
1222         public struct Fmt
1223         {
1224                 public PixelFormat pix;
1225                 public Window win;
1226                 public VbiFormat vbi;
1227                 public SlicedVbiFormat sliced;
1228                 public uint8 raw_data[200];
1229         }
1230         
1231         [CCode (cname="struct v4l2_format")]
1232         public struct Format
1233         {
1234                 public BufferType type;
1235                 public Fmt fmt;
1236         }
1237         
1238         public struct Parm
1239         {
1240                 public CaptureParm capture;
1241                 public OutputParm output;
1242                 public uint8 raw_data[200];
1243         }
1244         
1245         [CCode (cname="struct v4l2_streamparm")]
1246         public struct StreamParm
1247         {
1248                 public BufferType type;
1249                 public unowned Parm parm;
1250         }
1251         
1252         [CCode (cprefix="V4L2_CHIP_MATCH_")]
1253         public enum ChipMatch
1254         {
1255                 HOST,
1256                 I2C_DRIVER,
1257                 I2C_ADDR
1258         }
1259         
1260         [CCode (cname="struct v4l2_register")]
1261         public struct Register
1262         {
1263                 public uint32 match_type;
1264                 public uint32 match_chip;
1265                 public uint64 reg;
1266                 public uint64 val;
1267         }
1268         
1269         [CCode (cname="struct v4l2_chip_ident")]
1270         public struct ChipIdent
1271         {
1272                 public uint32 match_type;
1273                 public uint32 match_chip;
1274                 public uint32 ident;
1275                 public uint32 revision;
1276         }
1277         
1278         public const int VIDIOC_QUERYCAP;
1279         public const int VIDIOC_RESERVED;
1280         public const int VIDIOC_ENUM_FMT;
1281         public const int VIDIOC_G_FMT;
1282         public const int VIDIOC_S_FMT;
1283         public const int VIDIOC_REQBUFS;
1284         public const int VIDIOC_QUERYBUF;
1285         public const int VIDIOC_G_FBUF;
1286         public const int VIDIOC_S_FBUF;
1287         public const int VIDIOC_OVERLAY;
1288         public const int VIDIOC_QBUF;
1289         public const int VIDIOC_DQBUF;
1290         public const int VIDIOC_STREAMON;
1291         public const int VIDIOC_STREAMOFF;
1292         public const int VIDIOC_G_PARM;
1293         public const int VIDIOC_S_PARM;
1294         public const int VIDIOC_G_STD;
1295         public const int VIDIOC_S_STD;
1296         public const int VIDIOC_ENUMSTD;
1297         public const int VIDIOC_ENUMINPUT;
1298         public const int VIDIOC_G_CTRL;
1299         public const int VIDIOC_S_CTRL;
1300         public const int VIDIOC_G_TUNER;
1301         public const int VIDIOC_S_TUNER;
1302         public const int VIDIOC_G_AUDIO;
1303         public const int VIDIOC_S_AUDIO;
1304         public const int VIDIOC_QUERYCTRL;
1305         public const int VIDIOC_QUERYMENU;
1306         public const int VIDIOC_G_INPUT;
1307         public const int VIDIOC_S_INPUT;
1308         public const int VIDIOC_G_OUTPUT;
1309         public const int VIDIOC_S_OUTPUT;
1310         public const int VIDIOC_ENUMOUTPUT;
1311         public const int VIDIOC_G_AUDOUT;
1312         public const int VIDIOC_S_AUDOUT;
1313         public const int VIDIOC_G_MODULATOR;
1314         public const int VIDIOC_S_MODULATOR;
1315         public const int VIDIOC_G_FREQUENCY;
1316         public const int VIDIOC_S_FREQUENCY;
1317         public const int VIDIOC_CROPCAP;
1318         public const int VIDIOC_G_CROP;
1319         public const int VIDIOC_S_CROP;
1320         public const int VIDIOC_G_JPEGCOMP;
1321         public const int VIDIOC_S_JPEGCOMP;
1322         public const int VIDIOC_QUERYSTD;
1323         public const int VIDIOC_TRY_FMT;
1324         public const int VIDIOC_ENUMAUDIO;
1325         public const int VIDIOC_ENUMAUDOUT;
1326         public const int VIDIOC_G_PRIORITY;
1327         public const int VIDIOC_S_PRIORITY;
1328         public const int VIDIOC_G_SLICED_VBI_CAP;
1329         public const int VIDIOC_LOG_STATUS;
1330         public const int VIDIOC_G_EXT_CTRLS;
1331         public const int VIDIOC_S_EXT_CTRLS;
1332         public const int VIDIOC_TRY_EXT_CTRLS;
1333         public const int VIDIOC_ENUM_FRAMESIZES;
1334         public const int VIDIOC_ENUM_FRAMEINTERVALS;
1335         public const int VIDIOC_G_ENC_INDEX;
1336         public const int VIDIOC_ENCODER_CMD;
1337         public const int VIDIOC_TRY_ENCODER_CMD;
1338         public const int VIDIOC_DBG_S_REGISTER;
1339         public const int VIDIOC_DBG_G_REGISTER;
1340         public const int VIDIOC_G_CHIP_IDENT;
1341         public const int VIDIOC_S_HW_FREQ_SEEK;
1342         public const int VIDIOC_OVERLAY_OLD;
1343         public const int VIDIOC_S_PARM_OLD;
1344         public const int VIDIOC_S_CTRL_OLD;
1345         public const int VIDIOC_G_AUDIO_OLD;
1346         public const int VIDIOC_G_AUDOUT_OLD;
1347         public const int VIDIOC_CROPCAP_OLD;
1348         public const int BASE_VIDIOC_PRIVATE;