This file is indexed.

/usr/share/vala-0.14/vapi/v4l2.vapi is in valac-0.14 0.14.2-2ubuntu2.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

   1
   2
   3
   4
   5
   6
   7
   8
   9
  10
  11
  12
  13
  14
  15
  16
  17
  18
  19
  20
  21
  22
  23
  24
  25
  26
  27
  28
  29
  30
  31
  32
  33
  34
  35
  36
  37
  38
  39
  40
  41
  42
  43
  44
  45
  46
  47
  48
  49
  50
  51
  52
  53
  54
  55
  56
  57
  58
  59
  60
  61
  62
  63
  64
  65
  66
  67
  68
  69
  70
  71
  72
  73
  74
  75
  76
  77
  78
  79
  80
  81
  82
  83
  84
  85
  86
  87
  88
  89
  90
  91
  92
  93
  94
  95
  96
  97
  98
  99
 100
 101
 102
 103
 104
 105
 106
 107
 108
 109
 110
 111
 112
 113
 114
 115
 116
 117
 118
 119
 120
 121
 122
 123
 124
 125
 126
 127
 128
 129
 130
 131
 132
 133
 134
 135
 136
 137
 138
 139
 140
 141
 142
 143
 144
 145
 146
 147
 148
 149
 150
 151
 152
 153
 154
 155
 156
 157
 158
 159
 160
 161
 162
 163
 164
 165
 166
 167
 168
 169
 170
 171
 172
 173
 174
 175
 176
 177
 178
 179
 180
 181
 182
 183
 184
 185
 186
 187
 188
 189
 190
 191
 192
 193
 194
 195
 196
 197
 198
 199
 200
 201
 202
 203
 204
 205
 206
 207
 208
 209
 210
 211
 212
 213
 214
 215
 216
 217
 218
 219
 220
 221
 222
 223
 224
 225
 226
 227
 228
 229
 230
 231
 232
 233
 234
 235
 236
 237
 238
 239
 240
 241
 242
 243
 244
 245
 246
 247
 248
 249
 250
 251
 252
 253
 254
 255
 256
 257
 258
 259
 260
 261
 262
 263
 264
 265
 266
 267
 268
 269
 270
 271
 272
 273
 274
 275
 276
 277
 278
 279
 280
 281
 282
 283
 284
 285
 286
 287
 288
 289
 290
 291
 292
 293
 294
 295
 296
 297
 298
 299
 300
 301
 302
 303
 304
 305
 306
 307
 308
 309
 310
 311
 312
 313
 314
 315
 316
 317
 318
 319
 320
 321
 322
 323
 324
 325
 326
 327
 328
 329
 330
 331
 332
 333
 334
 335
 336
 337
 338
 339
 340
 341
 342
 343
 344
 345
 346
 347
 348
 349
 350
 351
 352
 353
 354
 355
 356
 357
 358
 359
 360
 361
 362
 363
 364
 365
 366
 367
 368
 369
 370
 371
 372
 373
 374
 375
 376
 377
 378
 379
 380
 381
 382
 383
 384
 385
 386
 387
 388
 389
 390
 391
 392
 393
 394
 395
 396
 397
 398
 399
 400
 401
 402
 403
 404
 405
 406
 407
 408
 409
 410
 411
 412
 413
 414
 415
 416
 417
 418
 419
 420
 421
 422
 423
 424
 425
 426
 427
 428
 429
 430
 431
 432
 433
 434
 435
 436
 437
 438
 439
 440
 441
 442
 443
 444
 445
 446
 447
 448
 449
 450
 451
 452
 453
 454
 455
 456
 457
 458
 459
 460
 461
 462
 463
 464
 465
 466
 467
 468
 469
 470
 471
 472
 473
 474
 475
 476
 477
 478
 479
 480
 481
 482
 483
 484
 485
 486
 487
 488
 489
 490
 491
 492
 493
 494
 495
 496
 497
 498
 499
 500
 501
 502
 503
 504
 505
 506
 507
 508
 509
 510
 511
 512
 513
 514
 515
 516
 517
 518
 519
 520
 521
 522
 523
 524
 525
 526
 527
 528
 529
 530
 531
 532
 533
 534
 535
 536
 537
 538
 539
 540
 541
 542
 543
 544
 545
 546
 547
 548
 549
 550
 551
 552
 553
 554
 555
 556
 557
 558
 559
 560
 561
 562
 563
 564
 565
 566
 567
 568
 569
 570
 571
 572
 573
 574
 575
 576
 577
 578
 579
 580
 581
 582
 583
 584
 585
 586
 587
 588
 589
 590
 591
 592
 593
 594
 595
 596
 597
 598
 599
 600
 601
 602
 603
 604
 605
 606
 607
 608
 609
 610
 611
 612
 613
 614
 615
 616
 617
 618
 619
 620
 621
 622
 623
 624
 625
 626
 627
 628
 629
 630
 631
 632
 633
 634
 635
 636
 637
 638
 639
 640
 641
 642
 643
 644
 645
 646
 647
 648
 649
 650
 651
 652
 653
 654
 655
 656
 657
 658
 659
 660
 661
 662
 663
 664
 665
 666
 667
 668
 669
 670
 671
 672
 673
 674
 675
 676
 677
 678
 679
 680
 681
 682
 683
 684
 685
 686
 687
 688
 689
 690
 691
 692
 693
 694
 695
 696
 697
 698
 699
 700
 701
 702
 703
 704
 705
 706
 707
 708
 709
 710
 711
 712
 713
 714
 715
 716
 717
 718
 719
 720
 721
 722
 723
 724
 725
 726
 727
 728
 729
 730
 731
 732
 733
 734
 735
 736
 737
 738
 739
 740
 741
 742
 743
 744
 745
 746
 747
 748
 749
 750
 751
 752
 753
 754
 755
 756
 757
 758
 759
 760
 761
 762
 763
 764
 765
 766
 767
 768
 769
 770
 771
 772
 773
 774
 775
 776
 777
 778
 779
 780
 781
 782
 783
 784
 785
 786
 787
 788
 789
 790
 791
 792
 793
 794
 795
 796
 797
 798
 799
 800
 801
 802
 803
 804
 805
 806
 807
 808
 809
 810
 811
 812
 813
 814
 815
 816
 817
 818
 819
 820
 821
 822
 823
 824
 825
 826
 827
 828
 829
 830
 831
 832
 833
 834
 835
 836
 837
 838
 839
 840
 841
 842
 843
 844
 845
 846
 847
 848
 849
 850
 851
 852
 853
 854
 855
 856
 857
 858
 859
 860
 861
 862
 863
 864
 865
 866
 867
 868
 869
 870
 871
 872
 873
 874
 875
 876
 877
 878
 879
 880
 881
 882
 883
 884
 885
 886
 887
 888
 889
 890
 891
 892
 893
 894
 895
 896
 897
 898
 899
 900
 901
 902
 903
 904
 905
 906
 907
 908
 909
 910
 911
 912
 913
 914
 915
 916
 917
 918
 919
 920
 921
 922
 923
 924
 925
 926
 927
 928
 929
 930
 931
 932
 933
 934
 935
 936
 937
 938
 939
 940
 941
 942
 943
 944
 945
 946
 947
 948
 949
 950
 951
 952
 953
 954
 955
 956
 957
 958
 959
 960
 961
 962
 963
 964
 965
 966
 967
 968
 969
 970
 971
 972
 973
 974
 975
 976
 977
 978
 979
 980
 981
 982
 983
 984
 985
 986
 987
 988
 989
 990
 991
 992
 993
 994
 995
 996
 997
 998
 999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
/* v4l2.vapi
 *
 * Copyright (C) 2008  Matias De la Puente
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.

 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.

 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
 *
 * Author:
 * 	Matias De la Puente <mfpuente.ar@gmail.com>
 */

[CCode (lower_case_cprefix="", cprefix="", cheader_filename="linux/videodev2.h")]
namespace V4l2
{
	[CCode (cprefix="V4L2_FIELD_")]
	public enum Field
	{
		ANY,
		NONE,
		TOP,
		BOTTOM,
		INTERLACED,
		SEQ_TB,
		SEQ_BT,
		ALTERNATE,
		INTERLACED_TB,
		INTERLACED_BT
	}
	
	[CCode (cname="V4L2_FIELD_HAS_TOP")]
	public bool field_has_top (uint32 field);
	[CCode (cname="V4L2_FIELD_HAS_BOTTOM")]
	public bool field_has_bottom (uint32 field);
	[CCode (cname="V4L2_FIELD_HAS_BOTH")]
	public bool field_has_both (uint32 field);
	
	[CCode (cprefix="V4L2_BUF_TYPE_")]
	public enum BufferType
	{
		VIDEO_CAPTURE,
		VIDEO_OUTPUT,
		VIDEO_OVERLAY,
		VBI_CAPTURE,
		VBI_OUTPUT,
		SLICED_VBI_CAPTURE,
		SLICED_VBI_OUTPUT,
		VIDEO_OUTPUT_OVERLAY,
		PRIVATE
	}
	
	[CCode (cprefix="V4L2_CTRL_TYPE_")]
	public enum ControlType
	{
		INTEGER,
		BOOLEAN,
		MENU,
		BUTTON,
		INTEGER64,
		CTRL_CLASS
	}
	
	[CCode (cprefix="V4L2_TUNER_")]
	public enum TunerType
	{
		RADIO,
		ANALOG_TV,
		DIGITAL_TV
	}
	
	[CCode (cprefix="V4L2_MEMORY_")]
	public enum Memory
	{
		MMAP,
		USERPTR,
		OVERLAY
	}
	
	[CCode (cprefix="V4L2_COLORSPACE_")]
	public enum Colorspace
	{
		SMPTE170M,
		SMPTE240M,
		REC709,
		BT878,
		470_SYSTEM_M,
		470_SYSTEM_BG,
		JPEG,
		SRGB
	}
	
	[CCode (cprefix="V4L2_PRIORITY_")]
	public enum Priority
	{
		UNSET,
		BACKGROUND,
		INTERACTIVE,
		RECORD,
		DEFAULT
	}
	
	[CCode (cname="struct v4l2_rect")]
	public struct Rect
	{
		public int32 left;
		public int32 top;
		public int32 width;
		public int32 height;
	}
	
	[CCode (cname="struct v4l2_fract")]
	public struct Fraction
	{
		public uint32 numerator;
		public uint32 denominator;
	}
	
	[CCode (cprefix="V4L2_CAP_")]
	public enum Capabilities
	{
		VIDEO_CAPTURE,
		VIDEO_OUTPUT,
		VIDEO_OVERLAY,
		VBI_CAPTURE,
		VBI_OUTPUT,
		SLICED_VBI_CAPTURE,
		SLICED_VBI_OUTPUT,
		RDS_CAPTURE,
		VIDEO_OUTPUT_OVERLAY,
		HW_FREQ_SEEK,
		TUNER,
		AUDIO,
		RADIO,
		READWRITE,
		ASYNCIO,
		STREAMING
	}
	
	[CCode (cname="struct v4l2_capability")]
	public struct Capability
	{
		public unowned string driver;
		public unowned string card;
		public unowned string bus_info;
		public uint32 version;
		public uint32 capabilities;
		public uint32[] reserved;
	}
	
	[CCode (cprefix="V4L2_PIX_FMT_")]
	public enum PixelFormatType
	{
		RGB332,
		RGB444,
		RGB555,
		RGB565,
		RGB555X,
		RGB565X,
		BGR24,
		RGB24,
		BGR32,
		RGB32,
		GREY,
		Y16,
		PAL8,
		YVU410,
		YVU420,
		YUYV,
		UYVY,
		YUV422P,
		YUV411P,
		Y41P,
		YUV444,
		YUV555,
		YUV565,
		YUV32,
		NV12,
		NV21,
		YUV410,
		YUV420,
		YYUV,
		HI240,
		HM12,
		SBGGR8,
		SGBRG8,
		SBGGR16,
		MJPEG,
		JPEG,
		DV,
		MPEG,
		WNVA,
		SN9C10X,
		PWC1,
		PWC2,
		ET61X251,
		SPCA501,
		SPCA505,
		SPCA508,
		SPCA561,
		PAC207,
		PJPG,
		YVYU
	}
	
	[CCode (cname="struct v4l2_pix_format")]
	public struct PixelFormat
	{
		public uint32 width;
		public uint32 height;
		public uint32 pixelformat;
		public Field field;
		public uint32 bytesperline;
		public uint32 sizeimage;
		public Colorspace colorspace;
		public uint32 priv;
	}
	
	[CCode (cprefix="V4L2_FMT_FLAG_")]
	public enum FormatFlag
	{
		COMPRESSED
	}
	
	[CCode (cname="struct v4l2_fmtdesc")]
	public struct FormatDescriptor
	{
		public uint32 index;
		public BufferType type;
		public uint32 flags;
		public unowned string description;
		public uint pixelformat;
	}
	
	[CCode (cprefix="V4L2_FRMSIZE_TYPE_")]
	public enum FramesizeTypes
	{
		DISCRETE,
		CONTINUOUS,
		STEPWISE
	}
	
	[CCode (cname="struct v4l2_frmsize_discrete")]
	public struct FramesizeDiscrete
	{
		public uint32 width;
		public uint32 height;
	}
	
	[CCode (cname="struct v4l2_frmsize_stepwise")]
	public struct FramesizeStepwise
	{
		public uint32 min_width;
		public uint32 max_width;
		public uint32 step_width;
		public uint32 min_height;
		public uint32 max_height;
		public uint32 step_height;
	}
	
	[CCode (cname="struct v4l2_frmsizeenum")]
	public struct FramsizeEnum
	{
		public uint32 index;
		public uint32 pixel_format;
		public uint32 type;
		public FramesizeDiscrete discrete;
		public FramesizeStepwise stepwise;
	}
	
	[CCode (cprefix="V4L2_FRMIVAL_TYPE_")]
	public enum FrameivalTypes
	{
		DISCRETE,
		CONTINUOUS,
		STEPWISE
	}
	
	[CCode (cname="struct v4l2_frmival_stepwise")]
	public struct FrameivalStepwise
	{
		public Fraction min;
		public Fraction max;
		public Fraction step;
	}
	
	[CCode (cname="struct v4l2_frmivalenum")]
	public struct FrameivalEnum
	{
		public uint32 index;
		public uint32 pixel_format;
		public uint32 width;
		public uint32 height;
		public uint32 type;
		public Fraction discrete;
		public Fraction stepwise;
	}
	
	[CCode (cname="struct v4l2_timecode")]
	public struct Timecode
	{
		public uint	type;
		public uint32 flags;
		public uint8 frames;
		public uint8 seconds;
		public uint8 minutes;
		public uint8 hours;
		public uint8 userbits[4];
	}
	
	[CCode (cprefix="V4L2_TC_TYPE_")]
	public enum TimecodeType
	{
		24FPS,
		25FPS,
		30FPS,
		50FPS,
		60FPS
	}
	
	[CCode (cprefix="V4L2_TC_FLAGS_")]
	public enum TimecodeFlags
	{
		DROPFRAME,
		COLORFRAME
	}
	
	[CCode (cprefix="V4L2_TC_USERBITS_")]
	public enum TimecodeUserbits
	{
		field,
		USERDEFINED,
		8BITCHARS
	}
	
	
	[CCode (cname="struct v4l2_jpegcompression")]
	public struct JpegCompression
	{
		public int quality;
		public int APPn;
		public int APP_len;
		public char APP_data[60];
		public int COM_len;
		public char COM_data[60];
		public uint32 jpeg_markers;
	}
	
	[CCode (cprefix="V4L2_JPEG_MARKER_")]
	public enum JpegMarker
	{
		DHT,
		DQT,
		DRI,
		COM,
		APP
	}
	
	[CCode (cname="struct v4l2_requestbuffers")]
	public struct RequestBuffers
	{
		public uint32 count;
		public BufferType type;
		public Memory memory;
	}
	
	[CCode (cname="m")]
	public struct M
	{
		public uint32 offset;
		public ulong userptr;
	}
	
	[CCode (cname="struct v4l2_buffer")]
	public struct Buffer
	{
		public uint32 index;
		public BufferType type;
		public uint32 bytesused;
		public uint32 flags;
		public Field field;
		public GLib.TimeVal timestamp;
		public Timecode	timecode;
		public uint32 sequence;
		public Memory memory;
		public M m;
		public uint32 length;
		public uint32 input;
		public uint32 reserved;
	}
	
	[CCode (cprefix="V4L2_BUF_FLAG_")]
	public enum BufferFlags
	{
		MAPPED,
		QUEUED,
		DONE,
		KEYFRAME,
		PFRAME,
		BFRAME,
		TIMECODE,
		INPUT
	}
	
	[CCode (cname="struct v4l2_framebuffer")]
	public struct FrameBuffer
	{
		public uint32 capability;
		public uint32 flags;
		public void* @base;
		public PixelFormat fmt;
	}
	
	[CCode (cprefix="V4L2_FBUF_CAP_")]
	public enum FrameBufferCapabilites
	{
		EXTERNOVERLAY,
		CHROMAKEY,
		LIST_CLIPPING,
		BITMAP_CLIPPING,
		LOCAL_ALPHA,
		GLOBAL_ALPHA,
		LOCAL_INV_ALPHA
	}
	
	[CCode (cprefix="V4L2_FBUF_FLAG_")]
	public enum FrameBufferFlags
	{
		PRIMARY,
		OVERLAY,
		CHROMAKEY,
		LOCAL_ALPHA,
		GLOBAL_ALPHA,
		LOCAL_INV_ALPHA
	}
	
	[CCode (cname="struct v4l2_clip")]
	public struct Clip
	{
		public Rect c;
		public Clip* next;
	}
	
	[CCode (cname="struct v4l2_window")]
	public struct Window
	{
		public Rect w;
		public Field field;
		public uint32 chromakey;
		public Clip* clips;
		public uint32 clipcount;
		public void* bitmap;
		public uint8 global_alpha;
	}
	
	[CCode (cname="struct v4l2_captureparm")]
	public struct CaptureParm
	{
		public uint32 capability;
		public uint32 capturemode;
		public Fraction timeperframe;
		public uint32 extendedmode;
		public uint32 readbuffers;
	}
	
	[CCode (cprefix="V4L2_")]
	public const uint32 MODE_HIGHQUALITY;
	[CCode (cprefix="V4L2_")]
	public const uint32 CAP_TIMEPERFRAME;
	
	[CCode (cname="struct v4l2_outputparm")]
	public struct OutputParm
	{
		public uint32 capability;
		public uint32 outputmode;
		public Fraction timeperframe;
		public uint32 extendedmode;
		public uint32 writebuffers;
	}
	
	[CCode (cname="struct v4l2_cropcap")]
	public struct CropCap
	{
		public BufferType  type;
		public Rect bounds;
		public Rect defrect;
		public Fraction pixelaspect;
	}
	
	[CCode (cname="struct v4l2_crop")]
	public struct Crop
	{
		public BufferType type;
		public Rect c;
	}
	
	[CCode (cprefix="V4L2_STD_")]
	public enum Standards
	{
		PAL_B,
		PAL_B1,
		PAL_G,
		PAL_H,
		PAL_I,
		PAL_D,
		PAL_D1,
		PAL_K,
		PAL_M,
		PAL_N,
		PAL_Nc,
		PAL_60,
		NTSC_M,
		NTSC_M_JP,
		NTSC_443,
		NTSC_M_KR,
		SECAM_B,
		SECAM_D,
		SECAM_G,
		SECAM_H,
		SECAM_K,
		SECAM_K1,
		SECAM_L,
		SECAM_LC,
		ATSC_8_VSB,
		ATSC_16_VSB,
		MN,
		B,
		GH,
		DK,
		PAL_BG,
		PAL_DK,
		PAL,
		NTSC,
		SECAM_DK,
		SECAM,
		525_60,
		625_50,
		ATSC,
		UNKNOWN,
		ALL
	}
	
	[CCode (cname="v4l2_std_id")]
	public struct StdId : uint64 { }

	[CCode (cname="struct v4l2_standard")]
	public struct Standard
	{
		public uint32 index;
		public StdId id;
		public unowned string name;
		public Fraction frameperiod;
		public uint32 framelines;
	}
	
	[CCode (cname="struct v4l2_input")]
	public struct Input
	{
		public uint32 index;
		public unowned string name;
		public uint32 type;
		public uint32 audioset;
		public uint32 tuner;
		public StdId std;
		public uint32 status;
	}
	
	[CCode (cprefix="V4L2_INPUT_TYPE_")]
	public enum InputType
	{
		TUNER,
		CAMERA
	}
	
	[CCode (cprefix="V4L2_IN_ST_")]
	public enum InputStatus
	{
		NO_POWER,
		NO_SIGNAL,
		NO_COLOR,
		NO_H_LOCK,
		COLOR_KILL,
		NO_SYNC,
		NO_EQU,
		NO_CARRIER,
		MACROVISION,
		NO_ACCESS,
		VTR
	}
	
	[CCode (cname="struct v4l2_output")]
	public struct Output
	{
		public uint32  index;
		public unowned string name;
		public uint32 type;
		public uint32 audioset;
		public uint32 modulator;
		public StdId std;
	}
	
	[CCode (cprefix="V4L2_OUTPUT_TYPE_")]
	public enum OutputType
	{
		MODULATOR,
		ANALOG,
		ANALOGVGAOVERLAY
	}
	
	[CCode (cname="struct v4l2_control")]
	public struct Control
	{
		public uint32 id;
		public int32 @value;
	}
	
	[CCode (cname="struct v4l2_ext_control")]
	public struct ExtControl
	{
		public uint32 id;
		public int32 @value;
		public int64 value64;
		public void* reserved;
	}
	
	[CCode (cname="struct v4l2_ext_controls")]
	public struct ExtControls
	{
		public uint32 ctrl_class;
		public uint32 count;
		public uint32 error_idx;
		public ExtControl* controls;
	}
	
	[CCode (cprefix="V4L2_CTRL_CLASS_")]
	public enum ControlClass
	{
		USER,
		MPEG,
		CAMERA
	}
	
	[CCode (cprefix="V4L2_")]
	public const uint32 CTRL_ID_MASK;
	[CCode (cname="V4L2_CTRL_ID2CLASS")]
	public uint32 ctrl_id2class (uint32 id);
	[CCode (cname="V4L2_CTRL_DRIVER_PRIV")]
	public uint32 ctrl_driver_priv (uint32 id);
	
	[CCode (cname="struct v4l2_queryctrl")]
	public struct QueryControl
	{
		public uint32 id;
		public ControlType type;
		public unowned string name;
		public int32 minimum;
		public int32 maximum;
		public int32 step;
		public int32 default_value;
		public uint32 flags;
	}
	
	[CCode (cname="struct v4l2_querymenu")]
	public struct QueryMenu
	{
		public uint32 id;
		public uint32 index;
		public unowned string name;
		public uint32 reserved;
	}
	
	[CCode (cprefix="V4L2_CTRL_FLAG_")]
	public enum ControlFlags
	{
		DISABLED,
		GRABBED,
		READ_ONLY,
		UPDATE,
		INACTIVE,
		SLIDER,
		NEXT_CTRL
	}
	
	[CCode (cprefix="V4L2_CID_")]
	public enum UserClassControlIds
	{
		BASE,
		USER_BASE,
		PRIVATE_BASE,
		USER_CLASS,
		BRIGHTNESS,
		CONTRAST,
		SATURATION,
		HUE,
		AUDIO_VOLUME,
		AUDIO_BALANCE,
		AUDIO_BASS,
		AUDIO_TREBLE,
		AUDIO_MUTE,
		AUDIO_LOUDNESS,
		AUTO_WHITE_BALANCE,
		DO_WHITE_BALANCE,
		RED_BALANCE,
		BLUE_BALANCE,
		GAMMA,
		EXPOSURE,
		AUTOGAIN,
		GAIN,
		HFLIP,
		VFLIP,
		POWER_LINE_FREQUENCY,
		HUE_AUTO,
		WHITE_BALANCE_TEMPERATURE,
		SHARPNESS,
		BACKLIGHT_COMPENSATION,
		CHROMA_AGC,
		COLOR_KILLER,
		LASTP1
	}
	
	[CCode (cprefix="V4L2_CID_POWER_LINE_FREQUENCY_")]
	public enum PowerLineFrequency
	{
		DISABLED,
		50HZ,
		60HZ
	}
	
	[CCode (cprefix="V4L2_CID_MPEG_")]
	public enum MpegClassControlIds
	{
		BASE,
		CLASS,
		STREAM_TYPE,
		STREAM_PID_PMT,
		STREAM_PID_AUDIO,
		STREAM_PID_VIDEO,
		STREAM_PID_PCR,
		STREAM_PES_ID_AUDIO,
		STREAM_PES_ID_VIDEO,
		STREAM_VBI_FMT,
		AUDIO_SAMPLING_FREQ,
		AUDIO_ENCODING,
		AUDIO_L1_BITRATE,
		AUDIO_L2_BITRATE,
		AUDIO_L3_BITRATE,
		AUDIO_MODE,
		AUDIO_MODE_EXTENSION,
		AUDIO_EMPHASIS,
		AUDIO_CRC,
		AUDIO_MUTE,
		VIDEO_ENCODING,
		VIDEO_ASPECT,
		VIDEO_B_FRAMES,
		VIDEO_GOP_SIZE,
		VIDEO_GOP_CLOSURE,
		VIDEO_PULLDOWN,
		VIDEO_BITRATE_MODE,
		VIDEO_BITRATE,
		VIDEO_BITRATE_PEAK,
		VIDEO_TEMPORAL_DECIMATION,
		VIDEO_MUTE,
		VIDEO_MUTE_YUV 
	}
	
	[CCode (cprefix="V4L2_MPEG_STREAM_TYPE_")]
	public enum MpegStreamType
	{
		MPEG2_PS,
		MPEG2_TS,
		MPEG1_SS,
		MPEG2_DVD,
		MPEG1_VCD,
		MPEG2_SVCD
	}
	
	[CCode (cprefix="V4L2_MPEG_STREAM_VBI_FMT_")]
	public enum MpegStreamVbiFmt
	{
		NONE,
		IVTV
	}
	
	[CCode (cprefix="V4L2_MPEG_AUDIO_SAMPLING_FREQ_")]
	public enum MpegAudioSamplingFreq
	{
		@44100,
		@48000,
		@32000
	}
	
	[CCode (cprefix="V4L2_MPEG_AUDIO_ENCODING_")]
	public enum MpegAudioEncoding
	{
		LAYER_1,
		LAYER_2,
		LAYER_3
	}
	
	[CCode (cprefix="V4L2_MPEG_AUDIO_L1_BITRATE_")]
	public enum MpegAudioL1Bitrate
	{
		32K,
		64K,
		96K,
		128K,
		160K,
		192K,
		224K,
		256K,
		288K,
		320K,
		352K,
		384K,
		416K,
		448K
	}
	
	[CCode (cprefix="V4L2_MPEG_AUDIO_L2_BITRATE_")]
	public enum MpegAudioL2Bitrate
	{
		32K,
		48K,
		56K,
		64K,
		80K,
		96K,
		112K,
		128K,
		160K,
		192K,
		224K,
		256K,
		320K,
		384K
	}
	
	[CCode (cprefix="V4L2_MPEG_AUDIO_L3_BITRATE_")]
	public enum MpegAudioL3Bitrate
	{
		32K,
		40K,
		48K,
		56K,
		64K,
		80K,
		96K,
		112K,
		128K,
		160K,
		192K,
		224K,
		256K,
		320K,
	}
	
	[CCode (cprefix="V4L2_MPEG_AUDIO_MODE_")]
	public enum MpegAudioMode
	{
		STEREO,
		JOINT_STEREO,
		DUAL,
		MONO
	}
	
	[CCode (cprefix="V4L2_MPEG_AUDIO_MODE_EXTENSION_")]
	public enum MpegAudioModeExtension
	{
		BOUND_4,
		BOUND_8,
		BOUND_12,
		BOUND_16
	}
	
	[CCode (cprefix="V4L2_MPEG_AUDIO_EMPHASIS_")]
	public enum MpegAudioEmphasis
	{
		NONE,
		50_DIV_15_uS,
		CCITT_J17,
	}
	
	[CCode (cprefix="V4L2_MPEG_AUDIO_CRC_")]
	public enum MpegAudioCrc
	{
		NONE,
		CRC16
	}
	
	[CCode (cprefix="V4L2_MPEG_VIDEO_ENCODING_")]
	public enum MpegVideoEncoding
	{
		MPEG_1,
		MPEG_2
	}
	
	[CCode (cprefix="V4L2_MPEG_VIDEO_ASPECT_")]
	public enum MpegVideoAspect
	{
		1x1,
		4x3,
		16x9,
		221x100
	}
	
	[CCode (cprefix="V4L2_MPEG_VIDEO_BITRATE_MODE_")]
	public enum MpegVideoBitrateMode
	{
		VBR,
		CBR
	}
	
	[CCode (cprefix="V4L2_CID_MPEG_CX2341X_")]
	public enum MpegCx2341xClassControlIds
	{
		BASE,
		VIDEO_SPATIAL_FILTER_MODE,
		VIDEO_SPATIAL_FILTER,
		VIDEO_LUMA_SPATIAL_FILTER_TYPE,
		VIDEO_CHROMA_SPATIAL_FILTER_TYPE,
		VIDEO_TEMPORAL_FILTER_MODE,
		VIDEO_TEMPORAL_FILTER,
		VIDEO_MEDIAN_FILTER_TYPE,
		VIDEO_LUMA_MEDIAN_FILTER_BOTTOM,
		VIDEO_LUMA_MEDIAN_FILTER_TOP,
		VIDEO_CHROMA_MEDIAN_FILTER_BOTTOM,
		VIDEO_CHROMA_MEDIAN_FILTER_TOP,
		STREAM_INSERT_NAV_PACKETS
	}
	
	[CCode (cprefix="V4L2_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE_")]
	public enum MpegCx2341xVideoSpatialFilterMode
	{
		MANUAL,
		AUTO,
	}
	
	[CCode (cprefix="V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_")]
	public enum MpegCx2341xVideoLumaSpatialFilterType
	{
		OFF,
		1D_HOR,
		1D_VERT,
		2D_HV_SEPARABLE,
		2D_SYM_NON_SEPARABLE,
	}
	
	[CCode (cprefix="V4L2_MPEG_CX2341X_VIDEO_CHROMA_SPATIAL_FILTER_TYPE_")]
	public enum MpegCx2341xVideoChromaSpatialFilterType
	{
		OFF,
		1D_HOR
	}
	
	[CCode (cprefix="V4L2_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER_MODE_")]
	public enum MpegCx2341xVideoTemporalFilterMode
	{
		MANUAL,
		AUTO
	}
	
	[CCode (cprefix="V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_")]
	public enum MpegCx2341xVideoMedianFilterType
	{
		OFF,
		HOR,
		VERT,
		HOR_VERT,
		DIAG
	}
	
	[CCode (cprefix="V4L2_CID_")]
	public enum CameraClassControlIds
	{
		CAMERA_CLASS_BASE,
		CAMERA_CLASS,
		EXPOSURE_AUTO,
		EXPOSURE_ABSOLUTE,
		EXPOSURE_AUTO_PRIORITY,
		PAN_RELATIVE,
		TILT_RELATIVE,
		PAN_RESET,
		TILT_RESET,
		PAN_ABSOLUTE,
		TILT_ABSOLUTE,
		FOCUS_ABSOLUTE,
		FOCUS_RELATIVE,
		FOCUS_AUTO
	}
	
	[CCode (cprefix="V4L2_EXPOSURE_")]
	public enum ExposureAutoType
	{
		AUTO,
		MANUAL,
		SHUTTER_PRIORITY,
		APERTURE_PRIORITY
	}

	[CCode (cname="struct v4l2_tuner")]
	public struct Tuner
	{
		public uint32 index;
		public unowned string name;
		public TunerType type;
		public uint32 capability;
		public uint32 rangelow;
		public uint32 rangehigh;
		public uint32 rxsubchans;
		public uint32 audmode;
		public int32 @signal;
		public int32 afc;
	}
	
	[CCode (cname="struct v4l2_modulator")]
	public struct Modulator
	{
		public uint32 index;
		public unowned string name;
		public uint32 capability;
		public uint32 rangelow;
		public uint32 rangehigh;
		public uint32 txsubchans;
	}
	
	[CCode (cprefix="V4L2_TUNER_CAP_")]
	public enum TunerCapabilities
	{
		LOW,
		NORM,
		STEREO,
		LANG2,
		SAP,
		LANG1
	}
	
	[CCode (cprefix="V4L2_TUNER_SUB_")]
	public enum TunerSubs
	{
		MONO,
		STEREO,
		LANG2,
		SAP,
		LANG1
	}
	
	[CCode (cprefix="V4L2_TUNER_MODE_")]
	public enum TunerModes
	{
		MONO,
		STEREO,
		LANG2,
		SAP,
		LANG1,
		LANG1_LANG2
	}
	
	[CCode (cname="struct v4l2_frequency")]
	public struct Frequency
	{
		public uint32 tuner;
		public TunerType type;
		public uint32 frequency;
	}
	
	[CCode (cname="struct v4l2_hw_freq_seek")]
	public struct HwFreqSeek
	{
		public uint32 tuner;
		public TunerType type;
		public uint32 seek_upward;
		public uint32 wrap_around;
	}
	
	[CCode (cname="struct v4l2_audio")]
	public struct Audio
	{
		public uint32 index;
		public unowned string name;
		public uint32 capability;
		public uint32 mode;
	}
	
	[CCode (cprefix="V4L2_AUDCAP_")]
	public enum AudioCapabilities
	{
		STEREO,
		AVL
	}

	[CCode (cprefix="V4L2_")]
	public const uint32 AUDMODE_AVL;
	
	[CCode (cname="struct v4l2_audioout")]
	public struct AudioOut
	{
		public uint32 index;
		public unowned string name;
		public uint32 capability;
		public uint32 mode;
	}
	
	[CCode (cprefix="V4L2_ENC_IDX_FRAME_")]
	public enum EncIdxFrame
	{
		I,
		P,
		B,
		MASK
	}
	
	[CCode (cname="struct v4l2_enc_idx_entry")]
	public struct EncIdxEntry
	{
		public uint64 offset;
		public uint64 pts;
		public uint32 length;
		public uint32 flags;
	}
	
	[CCode (cprefix="V4L2_")]
	public const int ENC_IDX_ENTRIES;
	
	[CCode (cname="struct v4l2_enc_idx")]
	public struct EncIdx
	{
		public uint32 entries;
		public uint32 entries_cap;
		public EncIdxEntry[] entry;
	}
	
	[CCode (cprefix="V4L2_ENC_CMD_")]
	public enum EncCmd
	{
		START,
		STOP,
		PAUSE,
		RESUME,
		STOP_AT_GOP_END
	}
	
	[CCode (cname="struct raw")]
	public struct Raw
	{
		public uint32 data[8];
	}
	
	[CCode (cname="struct v4l2_encoder_cmd")]
	public struct EncoderCmd
	{
		public uint32 cmd;
		public uint32 flags;
		public Raw raw;
	}
	
	[CCode (cname="struct v4l2_vbi_format")]
	public struct VbiFormat
	{
		public uint32 sampling_rate;
		public uint32 offset;
		public uint32 samples_per_line;
		public uint32 sample_format;
		public int32 start[2];
		public uint32 count[2];
		public uint32 flags;
	}
	
	[CCode (cprefix="V4L2_VBI_")]
	public enum VbiFlags
	{
		UNSYNC,
		INTERLACED
	}
	
	[CCode (cname="struct v4l2_sliced_vbi_format")]
	public struct SlicedVbiFormat
	{
		public uint16 service_set;
		public uint16[] service_lines;
		public uint32 io_size;
		public uint32[] reserved;
	}
	
	[CCode (cprefix="V4L2_SLICED_")]
	public enum SlicedType
	{
		ELETEXT_B,
		VPS,
		CAPTION_525,
		WSS_625,
		VBI_525,
		VBI_625,
		T
	}
	
	[CCode (cname="struct v4l2_sliced_vbi_cap")]
	public struct SlicedVbiCap
	{
		public uint16 service_set;
		public uint16[] service_lines;
		public BufferType type;
	}
	
	[CCode (cname="struct v4l2_sliced_vbi_data")]
	public struct SlicedVbiData
	{
		public uint32 id;
		public uint32 field;
		public uint32 line;
		public uint8 data[48];
	}
	
	public struct Fmt
	{
		public PixelFormat pix;
		public Window win;
		public VbiFormat vbi;
		public SlicedVbiFormat sliced;
		public uint8 raw_data[200];
	}
	
	[CCode (cname="struct v4l2_format")]
	public struct Format
	{
		public BufferType type;
		public Fmt fmt;
	}
	
	public struct Parm
	{
		public CaptureParm capture;
		public OutputParm output;
		public uint8 raw_data[200];
	}
	
	[CCode (cname="struct v4l2_streamparm")]
	public struct StreamParm
	{
		public BufferType type;
		public unowned Parm parm;
	}
	
	[CCode (cprefix="V4L2_CHIP_MATCH_")]
	public enum ChipMatch
	{
		HOST,
		I2C_DRIVER,
		I2C_ADDR
	}
	
	[CCode (cname="struct v4l2_register")]
	public struct Register
	{
		public uint32 match_type;
		public uint32 match_chip;
		public uint64 reg;
		public uint64 val;
	}
	
	[CCode (cname="struct v4l2_chip_ident")]
	public struct ChipIdent
	{
		public uint32 match_type;
		public uint32 match_chip;
		public uint32 ident;
		public uint32 revision;
	}
	
	public const int VIDIOC_QUERYCAP;
	public const int VIDIOC_RESERVED;
	public const int VIDIOC_ENUM_FMT;
	public const int VIDIOC_G_FMT;
	public const int VIDIOC_S_FMT;
	public const int VIDIOC_REQBUFS;
	public const int VIDIOC_QUERYBUF;
	public const int VIDIOC_G_FBUF;
	public const int VIDIOC_S_FBUF;
	public const int VIDIOC_OVERLAY;
	public const int VIDIOC_QBUF;
	public const int VIDIOC_DQBUF;
	public const int VIDIOC_STREAMON;
	public const int VIDIOC_STREAMOFF;
	public const int VIDIOC_G_PARM;
	public const int VIDIOC_S_PARM;
	public const int VIDIOC_G_STD;
	public const int VIDIOC_S_STD;
	public const int VIDIOC_ENUMSTD;
	public const int VIDIOC_ENUMINPUT;
	public const int VIDIOC_G_CTRL;
	public const int VIDIOC_S_CTRL;
	public const int VIDIOC_G_TUNER;
	public const int VIDIOC_S_TUNER;
	public const int VIDIOC_G_AUDIO;
	public const int VIDIOC_S_AUDIO;
	public const int VIDIOC_QUERYCTRL;
	public const int VIDIOC_QUERYMENU;
	public const int VIDIOC_G_INPUT;
	public const int VIDIOC_S_INPUT;
	public const int VIDIOC_G_OUTPUT;
	public const int VIDIOC_S_OUTPUT;
	public const int VIDIOC_ENUMOUTPUT;
	public const int VIDIOC_G_AUDOUT;
	public const int VIDIOC_S_AUDOUT;
	public const int VIDIOC_G_MODULATOR;
	public const int VIDIOC_S_MODULATOR;
	public const int VIDIOC_G_FREQUENCY;
	public const int VIDIOC_S_FREQUENCY;
	public const int VIDIOC_CROPCAP;
	public const int VIDIOC_G_CROP;
	public const int VIDIOC_S_CROP;
	public const int VIDIOC_G_JPEGCOMP;
	public const int VIDIOC_S_JPEGCOMP;
	public const int VIDIOC_QUERYSTD;
	public const int VIDIOC_TRY_FMT;
	public const int VIDIOC_ENUMAUDIO;
	public const int VIDIOC_ENUMAUDOUT;
	public const int VIDIOC_G_PRIORITY;
	public const int VIDIOC_S_PRIORITY;
	public const int VIDIOC_G_SLICED_VBI_CAP;
	public const int VIDIOC_LOG_STATUS;
	public const int VIDIOC_G_EXT_CTRLS;
	public const int VIDIOC_S_EXT_CTRLS;
	public const int VIDIOC_TRY_EXT_CTRLS;
	public const int VIDIOC_ENUM_FRAMESIZES;
	public const int VIDIOC_ENUM_FRAMEINTERVALS;
	public const int VIDIOC_G_ENC_INDEX;
	public const int VIDIOC_ENCODER_CMD;
	public const int VIDIOC_TRY_ENCODER_CMD;
	public const int VIDIOC_DBG_S_REGISTER;
	public const int VIDIOC_DBG_G_REGISTER;
	public const int VIDIOC_G_CHIP_IDENT;
	public const int VIDIOC_S_HW_FREQ_SEEK;
	public const int VIDIOC_OVERLAY_OLD;
	public const int VIDIOC_S_PARM_OLD;
	public const int VIDIOC_S_CTRL_OLD;
	public const int VIDIOC_G_AUDIO_OLD;
	public const int VIDIOC_G_AUDOUT_OLD;
	public const int VIDIOC_CROPCAP_OLD;
	public const int BASE_VIDIOC_PRIVATE;
}