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
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666/****************************************************************************
* include/sys/videoio.h
*
* SPDX-License-Identifier: Apache-2.0
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership. The
* ASF licenses this file to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the
* License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*
****************************************************************************/
#ifndef __INCLUDE_SYS_VIDEOIO_H
#define __INCLUDE_SYS_VIDEOIO_H
/****************************************************************************
* Included Files
****************************************************************************/
#include <stdint.h>
#include <sys/time.h>
#include <sys/types.h>
#include <sys/video_controls.h>
#include <nuttx/fs/ioctl.h>
#ifdef __cplusplus
extern "C"
{
#endif
/****************************************************************************
* Pre-processor Definitions
****************************************************************************/
#define VIDEO_MAX_FRAME 32
#define VIDEO_MAX_PLANES 8
/* Four-character-code (FOURCC) */
#define v4l2_fourcc(a, b, c, d)\
((uint32_t)(a) | ((uint32_t)(b) << 8) | \
((uint32_t)(c) << 16) | ((uint32_t)(d) << 24))
#define v4l2_fourcc_be(a, b, c, d) (v4l2_fourcc(a, b, c, d) | (1 << 31))
/* RGB formats */
#define V4L2_PIX_FMT_RGB332 v4l2_fourcc('R', 'G', 'B', '1')
#define V4L2_PIX_FMT_RGB444 v4l2_fourcc('R', '4', '4', '4')
#define V4L2_PIX_FMT_ARGB444 v4l2_fourcc('A', 'R', '1', '2')
#define V4L2_PIX_FMT_XRGB444 v4l2_fourcc('X', 'R', '1', '2')
#define V4L2_PIX_FMT_RGB555 v4l2_fourcc('R', 'G', 'B', 'O')
#define V4L2_PIX_FMT_ARGB555 v4l2_fourcc('A', 'R', '1', '5')
#define V4L2_PIX_FMT_XRGB555 v4l2_fourcc('X', 'R', '1', '5')
#define V4L2_PIX_FMT_RGB565 v4l2_fourcc('R', 'G', 'B', 'P')
#define V4L2_PIX_FMT_RGB555X v4l2_fourcc('R', 'G', 'B', 'Q')
#define V4L2_PIX_FMT_ARGB555X v4l2_fourcc_be('A', 'R', '1', '5')
#define V4L2_PIX_FMT_XRGB555X v4l2_fourcc_be('X', 'R', '1', '5')
#define V4L2_PIX_FMT_RGB565X v4l2_fourcc('R', 'G', 'B', 'R')
#define V4L2_PIX_FMT_BGR666 v4l2_fourcc('B', 'G', 'R', 'H')
#define V4L2_PIX_FMT_BGR24 v4l2_fourcc('B', 'G', 'R', '3')
#define V4L2_PIX_FMT_RGB24 v4l2_fourcc('R', 'G', 'B', '3')
#define V4L2_PIX_FMT_BGR32 v4l2_fourcc('B', 'G', 'R', '4')
#define V4L2_PIX_FMT_ABGR32 v4l2_fourcc('A', 'R', '2', '4')
#define V4L2_PIX_FMT_XBGR32 v4l2_fourcc('X', 'R', '2', '4')
#define V4L2_PIX_FMT_RGB32 v4l2_fourcc('R', 'G', 'B', '4')
#define V4L2_PIX_FMT_ARGB32 v4l2_fourcc('B', 'A', '2', '4')
#define V4L2_PIX_FMT_XRGB32 v4l2_fourcc('B', 'X', '2', '4')
/* Grey formats */
#define V4L2_PIX_FMT_GREY v4l2_fourcc('G', 'R', 'E', 'Y')
#define V4L2_PIX_FMT_Y4 v4l2_fourcc('Y', '0', '4', ' ')
#define V4L2_PIX_FMT_Y6 v4l2_fourcc('Y', '0', '6', ' ')
#define V4L2_PIX_FMT_Y10 v4l2_fourcc('Y', '1', '0', ' ')
#define V4L2_PIX_FMT_Y12 v4l2_fourcc('Y', '1', '2', ' ')
#define V4L2_PIX_FMT_Y16 v4l2_fourcc('Y', '1', '6', ' ')
#define V4L2_PIX_FMT_Y16_BE v4l2_fourcc_be('Y', '1', '6', ' ')
/* Grey bit-packed formats */
#define V4L2_PIX_FMT_Y10BPACK v4l2_fourcc('Y', '1', '0', 'B')
/* Palette formats */
#define V4L2_PIX_FMT_PAL8 v4l2_fourcc('P', 'A', 'L', '8')
/* Chrominance formats */
#define V4L2_PIX_FMT_UV8 v4l2_fourcc('U', 'V', '8', ' ')
/* Luminance+Chrominance formats */
#define V4L2_PIX_FMT_YUYV v4l2_fourcc('Y', 'U', 'Y', 'V')
#define V4L2_PIX_FMT_YYUV v4l2_fourcc('Y', 'Y', 'U', 'V')
#define V4L2_PIX_FMT_YVYU v4l2_fourcc('Y', 'V', 'Y', 'U')
#define V4L2_PIX_FMT_UYVY v4l2_fourcc('U', 'Y', 'V', 'Y')
#define V4L2_PIX_FMT_VYUY v4l2_fourcc('V', 'Y', 'U', 'Y')
#define V4L2_PIX_FMT_Y41P v4l2_fourcc('Y', '4', '1', 'P')
#define V4L2_PIX_FMT_YUV444 v4l2_fourcc('Y', '4', '4', '4')
#define V4L2_PIX_FMT_YUV555 v4l2_fourcc('Y', 'U', 'V', 'O')
#define V4L2_PIX_FMT_YUV565 v4l2_fourcc('Y', 'U', 'V', 'P')
#define V4L2_PIX_FMT_YUV32 v4l2_fourcc('Y', 'U', 'V', '4')
#define V4L2_PIX_FMT_HI240 v4l2_fourcc('H', 'I', '2', '4')
#define V4L2_PIX_FMT_HM12 v4l2_fourcc('H', 'M', '1', '2')
#define V4L2_PIX_FMT_M420 v4l2_fourcc('M', '4', '2', '0')
/* Two planes -- one Y, one Cr + Cb interleaved */
#define V4L2_PIX_FMT_NV12 v4l2_fourcc('N', 'V', '1', '2')
#define V4L2_PIX_FMT_NV21 v4l2_fourcc('N', 'V', '2', '1')
#define V4L2_PIX_FMT_NV16 v4l2_fourcc('N', 'V', '1', '6')
#define V4L2_PIX_FMT_NV61 v4l2_fourcc('N', 'V', '6', '1')
#define V4L2_PIX_FMT_NV24 v4l2_fourcc('N', 'V', '2', '4')
#define V4L2_PIX_FMT_NV42 v4l2_fourcc('N', 'V', '4', '2')
/* Two non contiguous planes - one Y, one Cr + Cb interleaved */
#define V4L2_PIX_FMT_NV12M v4l2_fourcc('N', 'M', '1', '2')
#define V4L2_PIX_FMT_NV21M v4l2_fourcc('N', 'M', '2', '1')
#define V4L2_PIX_FMT_NV16M v4l2_fourcc('N', 'M', '1', '6')
#define V4L2_PIX_FMT_NV61M v4l2_fourcc('N', 'M', '6', '1')
#define V4L2_PIX_FMT_NV12MT v4l2_fourcc('T', 'M', '1', '2')
#define V4L2_PIX_FMT_NV12MT_16X16 v4l2_fourcc('V', 'M', '1', '2')
/* Three planes - Y Cb, Cr */
#define V4L2_PIX_FMT_YUV410 v4l2_fourcc('Y', 'U', 'V', '9')
#define V4L2_PIX_FMT_YVU410 v4l2_fourcc('Y', 'V', 'U', '9')
#define V4L2_PIX_FMT_YUV411P v4l2_fourcc('4', '1', '1', 'P')
#define V4L2_PIX_FMT_YUV420 v4l2_fourcc('Y', 'U', '1', '2')
#define V4L2_PIX_FMT_YVU420 v4l2_fourcc('Y', 'V', '1', '2')
#define V4L2_PIX_FMT_YUV422P v4l2_fourcc('4', '2', '2', 'P')
/* Three non contiguous planes - Y, Cb, Cr */
#define V4L2_PIX_FMT_YUV420M v4l2_fourcc('Y', 'M', '1', '2')
#define V4L2_PIX_FMT_YVU420M v4l2_fourcc('Y', 'M', '2', '1')
#define V4L2_PIX_FMT_YUV422M v4l2_fourcc('Y', 'M', '1', '6')
#define V4L2_PIX_FMT_YVU422M v4l2_fourcc('Y', 'M', '6', '1')
#define V4L2_PIX_FMT_YUV444M v4l2_fourcc('Y', 'M', '2', '4')
#define V4L2_PIX_FMT_YVU444M v4l2_fourcc('Y', 'M', '4', '2')
/* Bayer formats - see http://www.siliconimaging.com/RGB%20Bayer.htm */
#define V4L2_PIX_FMT_SBGGR8 v4l2_fourcc('B', 'A', '8', '1')
#define V4L2_PIX_FMT_SGBRG8 v4l2_fourcc('G', 'B', 'R', 'G')
#define V4L2_PIX_FMT_SGRBG8 v4l2_fourcc('G', 'R', 'B', 'G')
#define V4L2_PIX_FMT_SRGGB8 v4l2_fourcc('R', 'G', 'G', 'B')
#define V4L2_PIX_FMT_SBGGR10 v4l2_fourcc('B', 'G', '1', '0')
#define V4L2_PIX_FMT_SGBRG10 v4l2_fourcc('G', 'B', '1', '0')
#define V4L2_PIX_FMT_SGRBG10 v4l2_fourcc('B', 'A', '1', '0')
#define V4L2_PIX_FMT_SRGGB10 v4l2_fourcc('R', 'G', '1', '0')
/* 10bit raw bayer packed, 5 bytes for every 4 pixels */
#define V4L2_PIX_FMT_SBGGR10P v4l2_fourcc('p', 'B', 'A', 'A')
#define V4L2_PIX_FMT_SGBRG10P v4l2_fourcc('p', 'G', 'A', 'A')
#define V4L2_PIX_FMT_SGRBG10P v4l2_fourcc('p', 'g', 'A', 'A')
#define V4L2_PIX_FMT_SRGGB10P v4l2_fourcc('p', 'R', 'A', 'A')
/* 10bit raw bayer a-law compressed to 8 bits */
#define V4L2_PIX_FMT_SBGGR10ALAW8 v4l2_fourcc('a', 'B', 'A', '8')
#define V4L2_PIX_FMT_SGBRG10ALAW8 v4l2_fourcc('a', 'G', 'A', '8')
#define V4L2_PIX_FMT_SGRBG10ALAW8 v4l2_fourcc('a', 'g', 'A', '8')
#define V4L2_PIX_FMT_SRGGB10ALAW8 v4l2_fourcc('a', 'R', 'A', '8')
/* 10bit raw bayer DPCM compressed to 8 bits */
#define V4L2_PIX_FMT_SBGGR10DPCM8 v4l2_fourcc('b', 'B', 'A', '8')
#define V4L2_PIX_FMT_SGBRG10DPCM8 v4l2_fourcc('b', 'G', 'A', '8')
#define V4L2_PIX_FMT_SGRBG10DPCM8 v4l2_fourcc('B', 'D', '1', '0')
#define V4L2_PIX_FMT_SRGGB10DPCM8 v4l2_fourcc('b', 'R', 'A', '8')
#define V4L2_PIX_FMT_SBGGR12 v4l2_fourcc('B', 'G', '1', '2')
#define V4L2_PIX_FMT_SGBRG12 v4l2_fourcc('G', 'B', '1', '2')
#define V4L2_PIX_FMT_SGRBG12 v4l2_fourcc('B', 'A', '1', '2')
#define V4L2_PIX_FMT_SRGGB12 v4l2_fourcc('R', 'G', '1', '2')
#define V4L2_PIX_FMT_SBGGR16 v4l2_fourcc('B', 'Y', 'R', '2')
#define V4L2_PIX_FMT_SGBRG16 v4l2_fourcc('G', 'B', '1', '6')
#define V4L2_PIX_FMT_SGRBG16 v4l2_fourcc('G', 'R', '1', '6')
#define V4L2_PIX_FMT_SRGGB16 v4l2_fourcc('R', 'G', '1', '6')
/* HSV formats */
#define V4L2_PIX_FMT_HSV24 v4l2_fourcc('H', 'S', 'V', '3')
#define V4L2_PIX_FMT_HSV32 v4l2_fourcc('H', 'S', 'V', '4')
/* Compressed formats */
#define V4L2_PIX_FMT_MJPEG v4l2_fourcc('M', 'J', 'P', 'G')
#define V4L2_PIX_FMT_JPEG v4l2_fourcc('J', 'P', 'E', 'G')
#define V4L2_PIX_FMT_DV v4l2_fourcc('d', 'v', 's', 'd')
#define V4L2_PIX_FMT_MPEG v4l2_fourcc('M', 'P', 'E', 'G')
#define V4L2_PIX_FMT_H264 v4l2_fourcc('H', '2', '6', '4')
#define V4L2_PIX_FMT_H264_NO_SC v4l2_fourcc('A', 'V', 'C', '1')
#define V4L2_PIX_FMT_H264_MVC v4l2_fourcc('M', '2', '6', '4')
#define V4L2_PIX_FMT_H263 v4l2_fourcc('H', '2', '6', '3')
#define V4L2_PIX_FMT_MPEG1 v4l2_fourcc('M', 'P', 'G', '1')
#define V4L2_PIX_FMT_MPEG2 v4l2_fourcc('M', 'P', 'G', '2')
#define V4L2_PIX_FMT_MPEG4 v4l2_fourcc('M', 'P', 'G', '4')
#define V4L2_PIX_FMT_XVID v4l2_fourcc('X', 'V', 'I', 'D')
#define V4L2_PIX_FMT_VC1_ANNEX_G v4l2_fourcc('V', 'C', '1', 'G')
#define V4L2_PIX_FMT_VC1_ANNEX_L v4l2_fourcc('V', 'C', '1', 'L')
#define V4L2_PIX_FMT_VP8 v4l2_fourcc('V', 'P', '8', '0')
#define V4L2_PIX_FMT_VP9 v4l2_fourcc('V', 'P', '9', '0')
#define V4L2_PIX_FMT_HEVC v4l2_fourcc('H', 'E', 'V', 'C')
/* JPEG + sub image */
#define V4L2_PIX_FMT_JPEG_WITH_SUBIMG v4l2_fourcc('J', 'S', 'U', 'B')
/* YUV 4:2:2 for sub image */
#define V4L2_PIX_FMT_SUBIMG_UYVY v4l2_fourcc('S', 'Y', 'U', 'V')
/* RGB565 for sub image */
#define V4L2_PIX_FMT_SUBIMG_RGB565 v4l2_fourcc('S', 'R', 'G', 'B')
/* MAX length of v4l2_fmtdesc description string */
#define V4L2_FMT_DSC_MAX (32)
/* MAX length of v4l2_query_ext_ctrl dims array */
#define V4L2_CTRL_MAX_DIMS (4)
/* MAX value of VIDIOC_REQBUFS count parameter */
#define V4L2_REQBUFS_COUNT_MAX CONFIG_VIDEO_REQBUFS_COUNT_MAX
/* Buffer error flag */
#define V4L2_BUF_FLAG_ERROR (0x0001)
/* Values for v4l2_std_id */
/* One bit for each */
#define V4L2_STD_PAL_B ((v4l2_std_id)0x00000001)
#define V4L2_STD_PAL_B1 ((v4l2_std_id)0x00000002)
#define V4L2_STD_PAL_G ((v4l2_std_id)0x00000004)
#define V4L2_STD_PAL_H ((v4l2_std_id)0x00000008)
#define V4L2_STD_PAL_I ((v4l2_std_id)0x00000010)
#define V4L2_STD_PAL_D ((v4l2_std_id)0x00000020)
#define V4L2_STD_PAL_D1 ((v4l2_std_id)0x00000040)
#define V4L2_STD_PAL_K ((v4l2_std_id)0x00000080)
#define V4L2_STD_PAL_M ((v4l2_std_id)0x00000100)
#define V4L2_STD_PAL_N ((v4l2_std_id)0x00000200)
#define V4L2_STD_PAL_Nc ((v4l2_std_id)0x00000400)
#define V4L2_STD_PAL_60 ((v4l2_std_id)0x00000800)
#define V4L2_STD_NTSC_M ((v4l2_std_id)0x00001000) /* BTSC */
#define V4L2_STD_NTSC_M_JP ((v4l2_std_id)0x00002000) /* EIA-J */
#define V4L2_STD_NTSC_443 ((v4l2_std_id)0x00004000)
#define V4L2_STD_NTSC_M_KR ((v4l2_std_id)0x00008000) /* FM A2 */
#define V4L2_STD_SECAM_B ((v4l2_std_id)0x00010000)
#define V4L2_STD_SECAM_D ((v4l2_std_id)0x00020000)
#define V4L2_STD_SECAM_G ((v4l2_std_id)0x00040000)
#define V4L2_STD_SECAM_H ((v4l2_std_id)0x00080000)
#define V4L2_STD_SECAM_K ((v4l2_std_id)0x00100000)
#define V4L2_STD_SECAM_K1 ((v4l2_std_id)0x00200000)
#define V4L2_STD_SECAM_L ((v4l2_std_id)0x00400000)
#define V4L2_STD_SECAM_LC ((v4l2_std_id)0x00800000)
/* ATSC/HDTV */
#define V4L2_STD_ATSC_8_VSB ((v4l2_std_id)0x01000000)
#define V4L2_STD_ATSC_16_VSB ((v4l2_std_id)0x02000000)
/* Some macros to merge video standards in order to make live easier for the
* drivers and V4L2 applications
*/
/* "Common" NTSC/M - It should be noticed that V4L2_STD_NTSC_443 is
* Missing here.
*/
#define V4L2_STD_NTSC (V4L2_STD_NTSC_M | \
V4L2_STD_NTSC_M_JP | \
V4L2_STD_NTSC_M_KR)
/* Secam macros */
#define V4L2_STD_SECAM_DK (V4L2_STD_SECAM_D | \
V4L2_STD_SECAM_K | \
V4L2_STD_SECAM_K1)
/* All Secam Standards */
#define V4L2_STD_SECAM (V4L2_STD_SECAM_B | \
V4L2_STD_SECAM_G | \
V4L2_STD_SECAM_H | \
V4L2_STD_SECAM_DK | \
V4L2_STD_SECAM_L | \
V4L2_STD_SECAM_LC)
/* PAL macros */
#define V4L2_STD_PAL_BG (V4L2_STD_PAL_B | \
V4L2_STD_PAL_B1 | \
V4L2_STD_PAL_G)
#define V4L2_STD_PAL_DK (V4L2_STD_PAL_D | \
V4L2_STD_PAL_D1 | \
V4L2_STD_PAL_K)
/* "Common" PAL - This macro is there to be compatible with the old
* V4L1 concept of "PAL": /BGDKHI.
* Several PAL standards are missing here: /M, /N and /Nc
*/
#define V4L2_STD_PAL (V4L2_STD_PAL_BG | \
V4L2_STD_PAL_DK | \
V4L2_STD_PAL_H | \
V4L2_STD_PAL_I)
/* Chroma "agnostic" standards */
#define V4L2_STD_B (V4L2_STD_PAL_B | \
V4L2_STD_PAL_B1 | \
V4L2_STD_SECAM_B)
#define V4L2_STD_G (V4L2_STD_PAL_G | \
V4L2_STD_SECAM_G)
#define V4L2_STD_H (V4L2_STD_PAL_H | \
V4L2_STD_SECAM_H)
#define V4L2_STD_L (V4L2_STD_SECAM_L | \
V4L2_STD_SECAM_LC)
#define V4L2_STD_GH (V4L2_STD_G | \
V4L2_STD_H)
#define V4L2_STD_DK (V4L2_STD_PAL_DK | \
V4L2_STD_SECAM_DK)
#define V4L2_STD_BG (V4L2_STD_B | \
V4L2_STD_G)
#define V4L2_STD_MN (V4L2_STD_PAL_M | \
V4L2_STD_PAL_N | \
V4L2_STD_PAL_Nc | \
V4L2_STD_NTSC)
/* Standards where MTS/BTSC stereo could be found */
#define V4L2_STD_MTS (V4L2_STD_NTSC_M | \
V4L2_STD_PAL_M | \
V4L2_STD_PAL_N | \
V4L2_STD_PAL_Nc)
/* Standards for Countries with 60Hz Line frequency */
#define V4L2_STD_525_60 (V4L2_STD_PAL_M | \
V4L2_STD_PAL_60 | \
V4L2_STD_NTSC | \
V4L2_STD_NTSC_443)
/* Standards for Countries with 50Hz Line frequency */
#define V4L2_STD_625_50 (V4L2_STD_PAL | \
V4L2_STD_PAL_N | \
V4L2_STD_PAL_Nc | \
V4L2_STD_SECAM)
#define V4L2_STD_ATSC (V4L2_STD_ATSC_8_VSB | \
V4L2_STD_ATSC_16_VSB)
/* Macros with none and all analog standards */
#define V4L2_STD_UNKNOWN 0
#define V4L2_STD_ALL (V4L2_STD_525_60 | \
V4L2_STD_625_50)
/****************************************************************************
* Public Types
****************************************************************************/
/* V4L2 device capabilities for VIDIOC_QUERYCAP.
* Currently, only member "driver" is supported.
*/
struct v4l2_capability
{
uint8_t driver[16]; /* Name of driver module(e.g. "bttv" */
uint8_t card[32]; /* Name of the card(e.g. "Yoyodyne TV/FM" */
uint8_t bus_info[32]; /* Name of the bus(e.g. "PCI:0000:05:06.0" */
uint32_t version; /* Version number of the driver */
uint32_t capabilities; /* Available capabilities of the physical device */
uint32_t device_caps; /* Device capabilities of the opened device */
};
/* Values for 'capabilities' field */
enum v4l2_capabilities
{
V4L2_CAP_VIDEO_CAPTURE = 0x00000001, /* Is a video capture device */
V4L2_CAP_VIDEO_OUTPUT = 0x00000002, /* Is a video output device */
V4L2_CAP_VIDEO_OVERLAY = 0x00000004, /* Can do video overlay */
V4L2_CAP_VBI_CAPTURE = 0x00000010, /* Is a raw VBI capture device */
V4L2_CAP_VBI_OUTPUT = 0x00000020, /* Is a raw VBI output device */
V4L2_CAP_SLICED_VBI_CAPTURE = 0x00000040, /* Is a sliced VBI capture device */
V4L2_CAP_SLICED_VBI_OUTPUT = 0x00000080, /* Is a sliced VBI output device */
V4L2_CAP_RDS_CAPTURE = 0x00000100, /* RDS data capture */
V4L2_CAP_VIDEO_OUTPUT_OVERLAY = 0x00000200, /* Can do video output overlay */
V4L2_CAP_HW_FREQ_SEEK = 0x00000400, /* Can do hardware frequency seek */
V4L2_CAP_RDS_OUTPUT = 0x00000800, /* Is an RDS encoder */
V4L2_CAP_VIDEO_CAPTURE_MPLANE = 0x00001000, /* Is a video capture device that supports multiplanar formats */
V4L2_CAP_VIDEO_OUTPUT_MPLANE = 0x00002000, /* Is a video output device that supports multiplanar formats */
V4L2_CAP_VIDEO_M2M_MPLANE = 0x00004000, /* Is a video mem-to-mem device that supports multiplanar formats */
V4L2_CAP_VIDEO_M2M = 0x00008000, /* Is a video mem-to-mem device */
V4L2_CAP_TUNER = 0x00010000, /* Has a tuner */
V4L2_CAP_AUDIO = 0x00020000, /* Has audio support */
V4L2_CAP_RADIO = 0x00040000, /* Is a radio device */
V4L2_CAP_MODULATOR = 0x00080000, /* Has a modulator */
V4L2_CAP_SDR_CAPTURE = 0x00100000, /* Is a SDR capture device */
V4L2_CAP_EXT_PIX_FORMAT = 0x00200000, /* Supports the extended pixel format */
V4L2_CAP_SDR_OUTPUT = 0x00400000, /* Is a SDR output device */
V4L2_CAP_READWRITE = 0x01000000, /* Read/write systemcalls */
V4L2_CAP_ASYNCIO = 0x02000000, /* Async I/O */
V4L2_CAP_STREAMING = 0x04000000, /* Streaming I/O ioctls */
V4L2_CAP_TOUCH = 0x10000000, /* Is a touch device */
V4L2_CAP_DEVICE_CAPS = 0x80000000, /* Sets device capabilities field */
};
/* Rectangle information */
struct v4l2_rect
{
/* Horizontal offset of the top, left corner of the rectangle, in pixels. */
int32_t left;
/* Vertical offset of the top, left corner of the rectangle, in pixels. */
int32_t top;
/* Width of the rectangle, in pixels. */
uint32_t width;
/* Height of the rectangle, in pixels. */
uint32_t height;
};
/* Fraction */
struct v4l2_fract
{
uint32_t numerator; /* Numerator */
uint32_t denominator; /* Denominator */
};
/* V4L2 selection info for VIDIOC_S_SELECTION and VIDIOC_G_SELECTION.
* Currently, only member type and r are supported.
*/
struct v4l2_selection
{
uint32_t type; /* Buffer type */
uint32_t target;
uint32_t flags;
struct v4l2_rect r; /* The selection rectangle. */
};
typedef uint64_t v4l2_std_id;
struct v4l2_standard
{
uint32_t index;
v4l2_std_id id;
uint8_t name[24];
struct v4l2_fract frameperiod; /* Frames, not fields */
uint32_t framelines;
uint32_t reserved[4];
};
/* Buffer type.
* Currently, support only V4L2_BUF_TYPE_VIDEO_CAPTURE and
* V4L2_BUF_TYPE_STILL_CAPTURE.
*/
enum v4l2_buf_type
{
V4L2_BUF_TYPE_VIDEO_CAPTURE = 1, /* Single-planar video capture stream */
V4L2_BUF_TYPE_VIDEO_OUTPUT = 2, /* Single-planar video output stream */
V4L2_BUF_TYPE_VIDEO_OVERLAY = 3, /* Video overlay */
V4L2_BUF_TYPE_VBI_CAPTURE = 4, /* Raw VBI capture stream */
V4L2_BUF_TYPE_VBI_OUTPUT = 5, /* Raw VBI output stream */
V4L2_BUF_TYPE_SLICED_VBI_CAPTURE = 6, /* Sliced VBI capture stream */
V4L2_BUF_TYPE_SLICED_VBI_OUTPUT = 7, /* Sliced VBI output stream */
V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY = 8, /* Video output overlay */
V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE = 9, /* Multi-planar video capture stream */
V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE = 10, /* Multi-planar video output stream */
V4L2_BUF_TYPE_SDR_CAPTURE = 11, /* Software Defined Radio capture stream */
V4L2_BUF_TYPE_SDR_OUTPUT = 12, /* Software Defined Radio output stream */
V4L2_BUF_TYPE_META_CAPTURE = 13, /* Metadata capture */
V4L2_BUF_TYPE_META_OUTPUT = 14, /* Metadata output */
V4L2_BUF_TYPE_PRIVATE = 0x80, /* Deprecated, do not use */
V4L2_BUF_TYPE_STILL_CAPTURE = 0x81 /* Single-planar still capture stream */
};
#define V4L2_TYPE_IS_MULTIPLANAR(type) \
((type) == V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE \
|| (type) == V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE)
#define V4L2_TYPE_IS_OUTPUT(type) \
((type) == V4L2_BUF_TYPE_VIDEO_OUTPUT \
|| (type) == V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE \
|| (type) == V4L2_BUF_TYPE_VIDEO_OVERLAY \
|| (type) == V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY \
|| (type) == V4L2_BUF_TYPE_VBI_OUTPUT \
|| (type) == V4L2_BUF_TYPE_SLICED_VBI_OUTPUT \
|| (type) == V4L2_BUF_TYPE_SDR_OUTPUT \
|| (type) == V4L2_BUF_TYPE_META_OUTPUT)
#define V4L2_TYPE_IS_CAPTURE(type) (!V4L2_TYPE_IS_OUTPUT(type))
/* Memory I/O method. Currently, support only V4L2_MEMORY_USERPTR. */
enum v4l2_memory
{
V4L2_MEMORY_MMAP = 1, /* Memory mapping I/O */
V4L2_MEMORY_USERPTR = 2, /* User pointer I/O */
V4L2_MEMORY_OVERLAY = 3, /* Overlay I/O */
V4L2_MEMORY_DMABUF = 4, /* DMA shared buffer I/O */
};
/* See also http://vektor.theorem.ca/graphics/ycbcr/ */
enum v4l2_colorspace
{
/* Default colorspace, i.e. let the driver figure it out.
* Can only be used with video capture.
*/
V4L2_COLORSPACE_DEFAULT = 0,
/* SMPTE 170M: used for broadcast NTSC/PAL SDTV */
V4L2_COLORSPACE_SMPTE170M = 1,
/* Obsolete pre-1998 SMPTE 240M HDTV standard, superseded by Rec 709 */
V4L2_COLORSPACE_SMPTE240M = 2,
/* Rec.709: used for HDTV */
V4L2_COLORSPACE_REC709 = 3,
/* Deprecated, do not use. No driver will ever return this. This was
* based on a misunderstanding of the bt878 datasheet.
*/
V4L2_COLORSPACE_BT878 = 4,
/* NTSC 1953 colorspace. This only makes sense when dealing with
* really, really old NTSC recordings. Superseded by SMPTE 170M.
*/
V4L2_COLORSPACE_470_SYSTEM_M = 5,
/* EBU Tech 3213 PAL/SECAM colorspace. This only makes sense when
* dealing with really old PAL/SECAM recordings. Superseded by
* SMPTE 170M.
*/
V4L2_COLORSPACE_470_SYSTEM_BG = 6,
/* Effectively shorthand for V4L2_COLORSPACE_SRGB, V4L2_YCBCR_ENC_601
* and V4L2_QUANTIZATION_FULL_RANGE. To be used for (Motion-)JPEG.
*/
V4L2_COLORSPACE_JPEG = 7,
/* For RGB colorspaces such as produces by most webcams. */
V4L2_COLORSPACE_SRGB = 8,
/* opRGB colorspace */
V4L2_COLORSPACE_OPRGB = 9,
/* BT.2020 colorspace, used for UHDTV. */
V4L2_COLORSPACE_BT2020 = 10,
/* Raw colorspace: for RAW unprocessed images */
V4L2_COLORSPACE_RAW = 11,
/* DCI-P3 colorspace, used by cinema projectors */
V4L2_COLORSPACE_DCI_P3 = 12,
};
/* Determine how COLORSPACE_DEFAULT should map to a proper colorspace.
* This depends on whether this is a SDTV image (use SMPTE 170M), an
* HDTV image (use Rec. 709), or something else (use sRGB).
*/
#define V4L2_MAP_COLORSPACE_DEFAULT(is_sdtv, is_hdtv) \
((is_sdtv) ? V4L2_COLORSPACE_SMPTE170M : \
((is_hdtv) ? V4L2_COLORSPACE_REC709 : V4L2_COLORSPACE_SRGB))
enum v4l2_xfer_func
{
/* Mapping of V4L2_XFER_FUNC_DEFAULT to actual transfer functions
* for the various colorspaces:
*
* V4L2_COLORSPACE_SMPTE170M, V4L2_COLORSPACE_470_SYSTEM_M,
* V4L2_COLORSPACE_470_SYSTEM_BG, V4L2_COLORSPACE_REC709 and
* V4L2_COLORSPACE_BT2020: V4L2_XFER_FUNC_709
*
* V4L2_COLORSPACE_SRGB, V4L2_COLORSPACE_JPEG: V4L2_XFER_FUNC_SRGB
*
* V4L2_COLORSPACE_OPRGB: V4L2_XFER_FUNC_OPRGB
*
* V4L2_COLORSPACE_SMPTE240M: V4L2_XFER_FUNC_SMPTE240M
*
* V4L2_COLORSPACE_RAW: V4L2_XFER_FUNC_NONE
*
* V4L2_COLORSPACE_DCI_P3: V4L2_XFER_FUNC_DCI_P3
*/
V4L2_XFER_FUNC_DEFAULT = 0,
V4L2_XFER_FUNC_709 = 1,
V4L2_XFER_FUNC_SRGB = 2,
V4L2_XFER_FUNC_OPRGB = 3,
V4L2_XFER_FUNC_SMPTE240M = 4,
V4L2_XFER_FUNC_NONE = 5,
V4L2_XFER_FUNC_DCI_P3 = 6,
V4L2_XFER_FUNC_SMPTE2084 = 7,
};
enum v4l2_ycbcr_encoding
{
/* Mapping of V4L2_YCBCR_ENC_DEFAULT to actual encodings for the
* various colorspaces:
*
* V4L2_COLORSPACE_SMPTE170M, V4L2_COLORSPACE_470_SYSTEM_M,
* V4L2_COLORSPACE_470_SYSTEM_BG, V4L2_COLORSPACE_SRGB,
* V4L2_COLORSPACE_OPRGB and V4L2_COLORSPACE_JPEG: V4L2_YCBCR_ENC_601
*
* V4L2_COLORSPACE_REC709 and V4L2_COLORSPACE_DCI_P3: V4L2_YCBCR_ENC_709
*
* V4L2_COLORSPACE_BT2020: V4L2_YCBCR_ENC_BT2020
*
* V4L2_COLORSPACE_SMPTE240M: V4L2_YCBCR_ENC_SMPTE240M
*/
V4L2_YCBCR_ENC_DEFAULT = 0,
/* ITU-R 601 -- SDTV */
V4L2_YCBCR_ENC_601 = 1,
/* Rec. 709 -- HDTV */
V4L2_YCBCR_ENC_709 = 2,
/* ITU-R 601/EN 61966-2-4 Extended Gamut -- SDTV */
V4L2_YCBCR_ENC_XV601 = 3,
/* Rec. 709/EN 61966-2-4 Extended Gamut -- HDTV */
V4L2_YCBCR_ENC_XV709 = 4,
/* sYCC (Y'CbCr encoding of sRGB), identical to ENC_601. It was added
* originally due to a misunderstanding of the sYCC standard. It should
* not be used, instead use V4L2_YCBCR_ENC_601.
*/
V4L2_YCBCR_ENC_SYCC = 5,
/* BT.2020 Non-constant Luminance Y'CbCr */
V4L2_YCBCR_ENC_BT2020 = 6,
/* BT.2020 Constant Luminance Y'CbcCrc */
V4L2_YCBCR_ENC_BT2020_CONST_LUM = 7,
/* SMPTE 240M -- Obsolete HDTV */
V4L2_YCBCR_ENC_SMPTE240M = 8,
};
enum v4l2_quantization
{
/* The default for R'G'B' quantization is always full range.
* For Y'CbCr the quantization is always limited range, except
* for COLORSPACE_JPEG: this is full range.
*/
V4L2_QUANTIZATION_DEFAULT = 0,
V4L2_QUANTIZATION_FULL_RANGE = 1,
V4L2_QUANTIZATION_LIM_RANGE = 2,
};
/* Field order. Currently, support only V4L2_FIELD_ANY */
enum v4l2_field
{
V4L2_FIELD_ANY = 0, /* Driver can choose from none, */
V4L2_FIELD_NONE = 1, /* This device has no fields ... */
V4L2_FIELD_TOP = 2, /* Top field only */
V4L2_FIELD_BOTTOM = 3, /* Bottom field only */
V4L2_FIELD_INTERLACED = 4, /* Both fields interlaced */
V4L2_FIELD_SEQ_TB = 5, /* Both fields sequential into one */
V4L2_FIELD_SEQ_BT = 6, /* Same as above + bottom-top order */
V4L2_FIELD_ALTERNATE = 7, /* Both fields alternating into */
V4L2_FIELD_INTERLACED_TB = 8, /* Both fields interlaced, top field */
V4L2_FIELD_INTERLACED_BT = 9, /* Both fields interlaced, top field */
};
/* Buffer mode */
enum v4l2_buf_mode
{
V4L2_BUF_MODE_RING = 0, /* Ring structure */
V4L2_BUF_MODE_FIFO = 1, /* FIFO structure */
};
struct v4l2_requestbuffers
{
uint32_t count; /* The number of buffers requested.
* Supported maximum is
* is V4L2_REQBUFS_COUNT_MAX
*/
uint32_t type; /* enum #v4l2_buf_type */
uint32_t memory; /* enum #v4l2_memory */
uint32_t mode; /* enum #v4l2_buf_mode */
};
typedef struct v4l2_requestbuffers v4l2_requestbuffers_t;
struct v4l2_timecode
{
uint32_t type;
uint32_t flags;
uint8_t frames;
uint8_t seconds;
uint8_t minutes;
uint8_t hours;
uint8_t userbits[4];
};
typedef struct v4l2_timecode v4l2_timecode_t;
struct v4l2_plane
{
uint32_t bytesused;
uint32_t length;
union
{
uint32_t mem_offset;
unsigned long userptr;
int fd;
} m;
uint32_t data_offset;
uint32_t reserved[11];
};
typedef struct v4l2_plane v4l2_plane_t;
/* struct v4l2_buffer
* Parameter of ioctl(VIDIOC_QBUF) and ioctl(VIDIOC_DQBUF).
* Currently, support only index, type, bytesused, memory,
* m.userptr, and length.
*/
struct v4l2_buffer
{
uint32_t index; /* Buffer id */
uint32_t type; /* enum #v4l2_buf_type */
uint32_t bytesused; /* Driver sets the image size */
uint32_t flags; /* Buffer flags. */
uint32_t field; /* The field order of the image */
struct timeval timestamp; /* Frame timestamp */
struct v4l2_timecode timecode; /* Frame timecode */
uint32_t sequence; /* Frame sequence number */
uint32_t memory; /* enum #v4l2_memory */
union
{
uint32_t offset;
unsigned long userptr; /* Address of buffer */
struct v4l2_plane *planes;
int fd;
} m;
uint32_t length; /* User set the buffer size */
};
typedef struct v4l2_buffer v4l2_buffer_t;
/* Image is a keyframe (I-frame) */
#define V4L2_BUF_FLAG_KEYFRAME 0x00000008
/* mem2mem encoder/decoder */
#define V4L2_BUF_FLAG_LAST 0x00100000
struct v4l2_fmtdesc
{
uint16_t index; /* Format number */
uint16_t type; /* enum v4l2_buf_type */
uint32_t flags;
char description[V4L2_FMT_DSC_MAX]; /* Description string */
uint32_t pixelformat; /* Format fourcc */
};
enum v4l2_fmt_flag
{
V4L2_FMT_FLAG_COMPRESSED = 0x0001, /* This is a compressed format */
V4L2_FMT_FLAG_EMULATED = 0x0002, /* This format is not native */
};
enum v4l2_frmsizetypes
{
V4L2_FRMSIZE_TYPE_DISCRETE = 1, /* Discrete value */
V4L2_FRMSIZE_TYPE_CONTINUOUS = 2, /* Continuous value */
V4L2_FRMSIZE_TYPE_STEPWISE = 3, /* Step value */
};
struct v4l2_frmsize_discrete
{
uint16_t width; /* Frame width [pixel] */
uint16_t height; /* Frame height [pixel] */
};
struct v4l2_frmsize_stepwise
{
uint16_t min_width; /* Minimum frame width [pixel] */
uint16_t max_width; /* Maximum frame width [pixel] */
uint16_t step_width; /* Frame width step size [pixel] */
uint16_t min_height; /* Minimum frame height [pixel] */
uint16_t max_height; /* Maximum frame height [pixel] */
uint16_t step_height; /* Frame height step size [pixel] */
};
struct v4l2_frmsizeenum
{
uint32_t index; /* Frame size number */
uint32_t buf_type; /* enum #v4l2_buf_type */
uint32_t pixel_format; /* Pixel format */
uint32_t type; /* Frame size type the device supports. */
/* In type == V4L2_FRMSIZE_TYPE_DISCRETE case, use discrete.
* Otherwise, use stepwise.
*/
union
{
struct v4l2_frmsize_discrete discrete;
struct v4l2_frmsize_stepwise stepwise;
};
};
/* Type of frame interval enumeration */
enum v4l2_frmivaltypes
{
V4L2_FRMIVAL_TYPE_DISCRETE = 1, /* Discrete value */
V4L2_FRMIVAL_TYPE_CONTINUOUS = 2, /* Continuous value */
V4L2_FRMIVAL_TYPE_STEPWISE = 3, /* Step value */
};
/* Frame interval enumeration with stepwise format */
struct v4l2_frmival_stepwise
{
struct v4l2_fract min; /* Minimum frame interval [s] */
struct v4l2_fract max; /* Maximum frame interval [s] */
struct v4l2_fract step; /* Frame interval step size [s] */
};
struct v4l2_frmivalenum
{
uint32_t index; /* Frame format index */
uint32_t buf_type; /* enum #v4l2_buf_type */
uint32_t pixel_format; /* Pixel format */
uint16_t width; /* Frame width */
uint16_t height; /* Frame height */
uint32_t type; /* Frame interval type */
union
{ /* Frame interval */
struct v4l2_fract discrete;
struct v4l2_frmival_stepwise stepwise;
};
};
/* Single-planar format structure. */
struct v4l2_pix_format
{
uint32_t width; /* Image width in pixels */
uint32_t height; /* Image height in pixels */
uint32_t pixelformat; /* The pixel format or type of compression. */
uint32_t field; /* enum #v4l2_field */
uint32_t bytesperline; /* For padding, zero if unused */
uint32_t sizeimage; /* Size in bytes of the buffer to hold a complete image */
uint32_t colorspace; /* Image colorspace */
uint32_t priv; /* Private data, depends on pixelformat */
uint32_t flags; /* Format flags (V4L2_PIX_FMT_FLAG_*) */
union
{
uint32_t ycbcr_enc; /* enum v4l2_ycbcr_encoding */
uint32_t hsv_enc; /* enum v4l2_hsv_encoding */
};
uint32_t quantization; /* enum v4l2_quantization */
uint32_t xfer_func; /* enum v4l2_xfer_func */
};
typedef struct v4l2_pix_format v4l2_pix_format_t;
/* struct v4l2_plane_pix_format - additional, per-plane format definition
* sizeimage: maximum size in bytes required for data, for which
* this plane will be used
* bytesperline: distance in bytes between the leftmost pixels in two
* adjacent lines
*/
struct v4l2_plane_pix_format
{
uint32_t sizeimage;
uint32_t bytesperline;
uint16_t reserved[6];
};
/* struct v4l2_pix_format_mplane - multiplanar format definition
* width: image width in pixels
* height: image height in pixels
* pixelformat: little endian four character code (fourcc)
* field: enum v4l2_field; field order (for interlaced video)
* colorspace: enum v4l2_colorspace; supplemental to pixelformat
* plane_fmt: per-plane information
* num_planes: number of planes for this format
* flags: format flags (V4L2_PIX_FMT_FLAG_*)
* ycbcr_enc: enum v4l2_ycbcr_encoding, Y'CbCr encoding
* quantization: enum v4l2_quantization, colorspace quantization
* xfer_func: enum v4l2_xfer_func, colorspace transfer function
*/
struct v4l2_pix_format_mplane
{
uint32_t width;
uint32_t height;
uint32_t pixelformat;
uint32_t field;
uint32_t colorspace;
struct v4l2_plane_pix_format plane_fmt[VIDEO_MAX_PLANES];
uint8_t num_planes;
uint8_t flags;
union
{
uint8_t ycbcr_enc;
uint8_t hsv_enc;
};
uint8_t quantization;
uint8_t xfer_func;
uint8_t reserved[7];
};
struct v4l2_format
{
uint32_t type; /* enum #v4l2_buf_type. */
union
{
struct v4l2_pix_format pix; /* Image format */
struct v4l2_pix_format_mplane pix_mp; /* V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE */
} fmt;
};
typedef struct v4l2_format v4l2_format_t;
struct v4l2_captureparm
{
uint32_t capability; /* Supported modes */
uint32_t capturemode; /* Current mode */
struct v4l2_fract timeperframe; /* Time per frame in seconds */
uint32_t extendedmode; /* Driver-specific extensions */
uint32_t readbuffers; /* # of buffers for read */
};
struct v4l2_outputparm
{
uint32_t capability; /* Supported modes */
uint32_t outputmode; /* Current mode */
struct v4l2_fract timeperframe; /* Time per frame in seconds */
uint32_t extendedmode; /* Driver-specific extensions */
uint32_t writebuffers; /* # of buffers for write */
uint32_t reserved[4];
};
struct v4l2_cropcap
{
uint32_t type; /* enum v4l2_buf_type */
struct v4l2_rect bounds;
struct v4l2_rect defrect;
struct v4l2_fract pixelaspect;
};
/* Flags for 'capability' and 'capturemode' fields */
enum v4l2_capture_mode
{
V4L2_MODE_HIGHQUALITY = 0x0001, /* High quality imaging mode */
};
enum v4l2_capture_capability
{
V4L2_CAP_TIMEPERFRAME = 0x1000, /* timeperframe field is supported */
};
struct v4l2_streamparm
{
uint32_t type; /* enum v4l2_buf_type */
union
{
struct v4l2_captureparm capture;
struct v4l2_outputparm output;
} parm;
uint8_t raw_data[200]; /* user-defined */
};
/* E V E N T S */
#define V4L2_EVENT_ALL 0
#define V4L2_EVENT_VSYNC 1
#define V4L2_EVENT_EOS 2
#define V4L2_EVENT_CTRL 3
#define V4L2_EVENT_FRAME_SYNC 4
#define V4L2_EVENT_SOURCE_CHANGE 5
#define V4L2_EVENT_MOTION_DET 6
#define V4L2_EVENT_PRIVATE_START 0x08000000
/* Payload for V4L2_EVENT_VSYNC */
struct v4l2_event_vsync
{
/* Can be V4L2_FIELD_ANY, _NONE, _TOP or _BOTTOM */
uint8_t field;
};
/* Payload for V4L2_EVENT_CTRL */
#define V4L2_EVENT_CTRL_CH_VALUE (1 << 0)
#define V4L2_EVENT_CTRL_CH_FLAGS (1 << 1)
#define V4L2_EVENT_CTRL_CH_RANGE (1 << 2)
struct v4l2_event_ctrl
{
uint32_t changes;
uint32_t type;
union
{
int32_t value;
int64_t value64;
};
uint32_t flags;
int32_t minimum;
int32_t maximum;
int32_t step;
int32_t default_value;
};
struct v4l2_event_frame_sync
{
uint32_t frame_sequence;
};
#define V4L2_EVENT_SRC_CH_RESOLUTION (1 << 0)
struct v4l2_event_src_change
{
uint32_t changes;
};
#define V4L2_EVENT_MD_FL_HAVE_FRAME_SEQ (1 << 0)
/* struct v4l2_event_motion_det - motion detection event
* flags: if V4L2_EVENT_MD_FL_HAVE_FRAME_SEQ is set, then the
* frame_sequence field is valid.
* frame_sequence: the frame sequence number associated with this event.
* region_mask: which regions detected motion.
*/
struct v4l2_event_motion_det
{
uint32_t flags;
uint32_t frame_sequence;
uint32_t region_mask;
};
struct v4l2_event
{
uint32_t type;
union
{
struct v4l2_event_vsync vsync;
struct v4l2_event_ctrl ctrl;
struct v4l2_event_frame_sync frame_sync;
struct v4l2_event_src_change src_change;
struct v4l2_event_motion_det motion_det;
uint8_t data[64];
} u;
uint32_t pending;
uint32_t sequence;
struct timespec timestamp;
uint32_t id;
uint32_t reserved[8];
};
#define V4L2_EVENT_SUB_FL_SEND_INITIAL (1 << 0)
#define V4L2_EVENT_SUB_FL_ALLOW_FEEDBACK (1 << 1)
struct v4l2_event_subscription
{
uint32_t type;
uint32_t id;
uint32_t flags;
uint32_t reserved[5];
};
enum v4l2_ctrl_type
{
V4L2_CTRL_TYPE_INTEGER = 1,
V4L2_CTRL_TYPE_BOOLEAN = 2,
V4L2_CTRL_TYPE_MENU = 3,
V4L2_CTRL_TYPE_BUTTON = 4,
V4L2_CTRL_TYPE_INTEGER64 = 5,
V4L2_CTRL_TYPE_CTRL_CLASS = 6,
V4L2_CTRL_TYPE_STRING = 7,
V4L2_CTRL_TYPE_BITMASK = 8,
V4L2_CTRL_TYPE_INTEGER_MENU = 9,
V4L2_CTRL_TYPE_U8FIXEDPOINT_Q7 = 10,
V4L2_CTRL_TYPE_U16FIXEDPOINT_Q8 = 11,
V4L2_CTRL_TYPE_INTEGER_TIMES_3 = 12,
/* Compound types are >= 0x0100 */
V4L2_CTRL_COMPOUND_TYPES = 0x0100,
V4L2_CTRL_TYPE_U8 = 0x0100,
V4L2_CTRL_TYPE_U16 = 0x0101,
V4L2_CTRL_TYPE_U32 = 0x0102,
};
struct v4l2_queryctrl
{
uint16_t ctrl_class; /* Control class(not used) */
uint16_t id; /* Control id */
uint16_t type; /* enum #v4l2_ctrl_type */
char name[32]; /* Name of control */
int32_t minimum; /* Minimum value */
int32_t maximum; /* Maximum value */
uint32_t step; /* Step */
int32_t default_value; /* Default value */
uint32_t flags; /* Flag */};
struct v4l2_query_ext_ctrl
{
uint16_t ctrl_class; /* Control class(not used) */
uint16_t id; /* Control id */
uint16_t type; /* enum #v4l2_ctrl_type */
char name[32]; /* Name of control */
int64_t minimum; /* Minimum value */
int64_t maximum; /* Maximum value */
uint64_t step; /* Step */
int64_t default_value; /* Default value */
uint32_t flags; /* Flag */
uint32_t elem_size; /* Size of each element */
uint32_t elems; /* Number of elements */
uint32_t nr_of_dims; /* Number of dimensions */
uint32_t dims[V4L2_CTRL_MAX_DIMS]; /* Dimensions */
};
struct v4l2_querymenu
{
uint16_t ctrl_class; /* Camera control class(not used) */
uint16_t id; /* Camera control id */
uint32_t index; /* Index of menu. */
union
{
char name[32]; /* Name of menu */
int64_t value; /* Value of menu */
};
};
struct v4l2_input
{
uint32_t index; /* Which input */
uint8_t name[32]; /* Label */
uint32_t type; /* Type of input */
uint32_t audioset; /* Associated audios (bitfield) */
uint32_t tuner; /* enum v4l2_tuner_type */
v4l2_std_id std;
uint32_t status;
uint32_t capabilities;
uint32_t reserved[3];
};
/* Values for the 'type' field */
enum v4l2_input_type
{
V4L2_INPUT_TYPE_TUNER = 1,
V4L2_INPUT_TYPE_CAMERA = 2,
V4L2_INPUT_TYPE_TOUCH = 3,
};
enum v4l2_input_status
{
/* Field 'status' - general */
V4L2_IN_ST_NO_POWER = 0x00000001, /* Attached device is off */
V4L2_IN_ST_NO_SIGNAL = 0x00000002,
V4L2_IN_ST_NO_COLOR = 0x00000004,
/* Field 'status' - sensor orientation */
/* If sensor is mounted upside down set both bits */
V4L2_IN_ST_HFLIP = 0x00000010, /* Frames are flipped horizontally */
V4L2_IN_ST_VFLIP = 0x00000020, /* Frames are flipped vertically */
/* Field 'status' - analog */
V4L2_IN_ST_NO_H_LOCK = 0x00000100, /* No horizontal sync lock */
V4L2_IN_ST_COLOR_KILL = 0x00000200, /* Color killer is active */
V4L2_IN_ST_NO_V_LOCK = 0x00000400, /* No vertical sync lock */
V4L2_IN_ST_NO_STD_LOCK = 0x00000800, /* No standard format lock */
/* Field 'status' - digital */
V4L2_IN_ST_NO_SYNC = 0x00010000, /* No synchronization lock */
V4L2_IN_ST_NO_EQU = 0x00020000, /* No equalizer lock */
V4L2_IN_ST_NO_CARRIER = 0x00040000, /* Carrier recovery failed */
/* Field 'status' - VCR and set-top box */
V4L2_IN_ST_MACROVISION = 0x01000000, /* Macrovision detected */
V4L2_IN_ST_NO_ACCESS = 0x02000000, /* Conditional access denied */
V4L2_IN_ST_VTR = 0x04000000, /* VTR time constant */
};
/* Capabilities flags */
enum v4l2_input_capabilities
{
V4L2_IN_CAP_DV_TIMINGS = 0x00000002, /* Supports S_DV_TIMINGS */
V4L2_IN_CAP_STD = 0x00000004, /* Supports S_STD */
V4L2_IN_CAP_NATIVE_SIZE = 0x00000008, /* Supports setting native size */
};
enum v4l2_input_capabilites_compat
{
V4L2_IN_CAP_CUSTOM_TIMINGS = V4L2_IN_CAP_DV_TIMINGS, /* For compatibility */
};
struct v4l2_output
{
uint32_t index; /* Which output */
uint8_t name[32]; /* Label */
uint32_t type; /* Type of output */
uint32_t audioset; /* Associated audios (bitfield) */
uint32_t modulator; /* Associated modulator */
v4l2_std_id std;
uint32_t capabilities;
uint32_t reserved[3];
};
/* Values for the 'type' field */
enum v4l2_output_type
{
V4L2_OUTPUT_TYPE_MODULATOR = 1,
V4L2_OUTPUT_TYPE_ANALOG = 2,
V4L2_OUTPUT_TYPE_ANALOGVGAOVERLAY = 3,
};
/* Capabilities flags */
enum v4l2_output_capabilities
{
V4L2_OUT_CAP_DV_TIMINGS = 0x00000002, /* Supports S_DV_TIMINGS */
V4L2_OUT_CAP_STD = 0x00000004, /* Supports S_STD */
V4L2_OUT_CAP_NATIVE_SIZE = 0x00000008, /* Supports setting native size */
};
enum v4l2_output_capabilites_compat
{
V4L2_OUT_CAP_CUSTOM_TIMINGS = V4L2_OUT_CAP_DV_TIMINGS, /* For compatibility */
};
struct v4l2_control
{
uint16_t id;
int32_t value;
};
/* Structure for each control of
* ioctl(VIDIOC_G_EXT_CTRLS / VIDIOC_S_EXT_CTRLS)
*/
struct v4l2_ext_control
{
uint16_t id; /* Camera control id */
uint16_t size; /* Size of value(not use) */
union
{
int32_t value; /* QUERY_EXT_CTRL type = INTEGER, xxx */
int64_t value64; /* QUERY_EXT_CTRL type = INTEGER64, MENU */
char *string;
uint8_t *p_u8; /* QUERY_EXT_CTRL type = U8 */
uint16_t *p_u16; /* QUERY_EXT_CTRL type = U16 */
uint32_t *p_u32; /* QUERY_EXT_CTRL type = U32 */
void *ptr;
};
};
struct v4l2_ext_controls
{
union
{
uint16_t ctrl_class; /* Camera control class */
uint16_t which;
};
uint16_t count; /* Number of requests */
uint16_t error_idx; /* Index in that error occurred */
struct v4l2_ext_control *controls; /* Each control information */
};
/* Structure for V4SIOC_S_EXT_CTRLS and V4SIOC_G_EXT_CTRLS */
struct v4s_ext_controls_scene
{
enum v4l2_scene_mode mode; /* Scene mode to be controlled */
struct v4l2_ext_controls control; /* Same as VIDIOC_S_EXT_CTRLS */
};
/* Structure for V4SIOC_QUERY_EXT_CTRL */
struct v4s_query_ext_ctrl_scene
{
enum v4l2_scene_mode mode; /* Scene mode to be queried */
struct v4l2_query_ext_ctrl control; /* Same as VIDIOC_QUERY_EXT_CTRL */
};
/* Structure for V4SIOC_QUERYMENU */
struct v4s_querymenu_scene
{
enum v4l2_scene_mode mode; /* Scene mode to be queried */
struct v4l2_querymenu menu; /* Same as VIDIOC_QUERYMENU */
};
#define V4L2_ENC_CMD_START (0)
#define V4L2_ENC_CMD_STOP (1)
#define V4L2_ENC_CMD_PAUSE (2)
#define V4L2_ENC_CMD_RESUME (3)
/* Flags for V4L2_ENC_CMD_STOP */
#define V4L2_ENC_CMD_STOP_AT_GOP_END (1 << 0)
struct v4l2_encoder_cmd
{
uint32_t cmd;
uint32_t flags;
union
{
struct
{
uint32_t data[8];
} raw;
};
};
/* Decoder commands */
#define V4L2_DEC_CMD_START (0)
#define V4L2_DEC_CMD_STOP (1)
#define V4L2_DEC_CMD_PAUSE (2)
#define V4L2_DEC_CMD_RESUME (3)
/* The structure must be zeroed before use by the application
* This ensures it can be extended safely in the future.
*/
struct v4l2_decoder_cmd
{
uint32_t cmd;
uint32_t flags;
union
{
struct
{
uint64_t pts;
} stop;
struct
{
/* 0 or 1000 specifies normal speed,
* 1 specifies forward single stepping,
* -1 specifies backward single stepping,
* >1: playback at speed/1000 of the normal speed,
* <-1: reverse playback at (-speed/1000) of the normal speed.
*/
int32_t speed;
uint32_t format;
} start;
struct
{
uint32_t data[16];
} raw;
};
};
/* Query device capability
* Address pointing to struct v4l2_capability
*/
#define VIDIOC_QUERYCAP _VIDIOC(0x0000)
/* Enumerate the formats supported by device */
#define VIDIOC_ENUM_FMT _VIDIOC(0x0002)
/* Get the data format */
#define VIDIOC_G_FMT _VIDIOC(0x0004)
/* Set the data format */
#define VIDIOC_S_FMT _VIDIOC(0x0005)
/* Initiate user pointer I/O */
#define VIDIOC_REQBUFS _VIDIOC(0x0008)
/* Query the status of a buffer */
#define VIDIOC_QUERYBUF _VIDIOC(0x0009)
/* Get frame buffer overlay parameters */
#define VIDIOC_G_FBUF _VIDIOC(0x000a)
/* Set frame buffer overlay parameters */
#define VIDIOC_S_FBUF _VIDIOC(0x000b)
/* Start or stop video overlay */
#define VIDIOC_OVERLAY _VIDIOC(0x000e)
/* Enqueue an empty buffer */
#define VIDIOC_QBUF _VIDIOC(0x000f)
/* Export a buffer as a DMABUF file descriptor */
#define VIDIOC_EXPBUF _VIDIOC(0x0010)
/* Dequeue a filled buffer */
#define VIDIOC_DQBUF _VIDIOC(0x0011)
/* Start streaming */
#define VIDIOC_STREAMON _VIDIOC(0x0012)
/* Stop streaming */
#define VIDIOC_STREAMOFF _VIDIOC(0x0013)
/* Get streaming parameters */
#define VIDIOC_G_PARM _VIDIOC(0x0015)
/* Set streaming parameters */
#define VIDIOC_S_PARM _VIDIOC(0x0016)
/* Query the video standard of the current input */
#define VIDIOC_G_STD _VIDIOC(0x0017)
/* Select the video standard of the current input */
#define VIDIOC_S_STD _VIDIOC(0x0018)
/* Enumerate supported video standards */
#define VIDIOC_ENUMSTD _VIDIOC(0x0019)
/* Enumerate video inputs */
#define VIDIOC_ENUMINPUT _VIDIOC(0x001a)
/* Get current control value.
* This request is a special case of VIDIOC_G_EXT_CTRLS.
* Address pointing to struct #v4l2_control
*/
#define VIDIOC_G_CTRL _VIDIOC(0x001b)
/* Set control value.
* This request is a special case of VIDIOC_S_EXT_CTRLS.
* Address pointing to struct #v4l2_control
*/
#define VIDIOC_S_CTRL _VIDIOC(0x001c)
/* Query control */
#define VIDIOC_QUERYCTRL _VIDIOC(0x0024)
/* Query menu */
#define VIDIOC_QUERYMENU _VIDIOC(0x0025)
/* Get video input */
#define VIDIOC_G_INPUT _VIDIOC(0x0026)
/* Set video input */
#define VIDIOC_S_INPUT _VIDIOC(0x0027)
/* Set video crop and scale */
#define VIDIOC_CROPCAP _VIDIOC(0x003a)
/* Query video standard */
#define VIDIOC_QUERYSTD _VIDIOC(0x003f)
/* Try format */
#define VIDIOC_TRY_FMT _VIDIOC(0x0040)
/* Get current control value
* Address pointing to struct #v4l2_ext_controls
*/
#define VIDIOC_G_EXT_CTRLS _VIDIOC(0x0047)
/* Set control value
* Address pointing to struct #v4l2_ext_controls
*/
#define VIDIOC_S_EXT_CTRLS _VIDIOC(0x0048)
/* Try control value
* Address pointing to struct #v4l2_ext_controls
*/
#define VIDIOC_TRY_EXT_CTRLS _VIDIOC(0x0049)
/* Enumerate the framesizes supported by device */
#define VIDIOC_ENUM_FRAMESIZES _VIDIOC(0x004a)
/* Enumerate the frameintervals supported by device */
#define VIDIOC_ENUM_FRAMEINTERVALS _VIDIOC(0x004b)
/* Execute an encoder command */
#define VIDIOC_ENCODER_CMD _VIDIOC(0x004d)
/* Dequeue event */
#define VIDIOC_DQEVENT _VIDIOC(0x0059)
/* Subscribe or unsubscribe event */
#define VIDIOC_SUBSCRIBE_EVENT _VIDIOC(0x005a)
/* Get clip
* Address pointing to struct v4l2_selection
*/
#define VIDIOC_G_SELECTION _VIDIOC(0x005e)
/* Set clip
* Address pointing to struct v4l2_selection
*/
#define VIDIOC_S_SELECTION _VIDIOC(0x005f)
/* Execute an decoder command */
#define VIDIOC_DECODER_CMD _VIDIOC(0x0060)
/* Query control */
#define VIDIOC_QUERY_EXT_CTRL _VIDIOC(0x00c0)
/* Cancel DQBUF
* enum #v4l2_buf_type
*/
#define VIDIOC_CANCEL_DQBUF _VIDIOC(0x00c1)
/* Do halfpush */
#define VIDIOC_DO_HALFPUSH _VIDIOC(0x00c2)
/* Start taking picture
*
* Type is int32_t, not address pointer.\n
* 0 or negative value means continuing until VIDIOC_TAKEPICT_STOP. \n
* Positive value(to be supported) means continuing
* up to a specified number of times or until VIDIOC_TAKEPICT_STOP.
*/
#define VIDIOC_TAKEPICT_START _VIDIOC(0x00c3)
/* Stop taking picture */
#define VIDIOC_TAKEPICT_STOP _VIDIOC(0x00c4)
/* Query control for scene parameter
* Address pointing to struct v4s_query_ext_ctrl_scene
*/
#define V4SIOC_QUERY_EXT_CTRL_SCENE _VIDIOC(0x00c5)
/* Query menu for scene parameter
* Address pointing to struct v4s_querymenu_scene
*/
#define V4SIOC_QUERYMENU_SCENE _VIDIOC(0x00c6)
/* Get current control value
* Address pointing to struct v4s_ext_controls_scene
*/
#define V4SIOC_G_EXT_CTRLS_SCENE _VIDIOC(0x00c7)
/* Set control value
* Address pointing to struct v4s_ext_controls_scene
*/
#define V4SIOC_S_EXT_CTRLS_SCENE _VIDIOC(0x00c8)
#ifdef __cplusplus
}
#endif
#endif /* __INCLUDE_SYS_VIDEOIO_H */