summaryrefslogtreecommitdiff
path: root/Documentation/media/videodev2.h.rst.exceptions
blob: 64d348e67df990554bda30fc4a336c37cfe91820 (plain)
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
# SPDX-License-Identifier: GPL-2.0

# Ignore header name
ignore define _UAPI__LINUX_VIDEODEV2_H

#
# The cross reference valitator for videodev2.h DocBook never cared
# about enum symbols or defines. Yet, they're all (or almost all?)
# handled inside V4L API sections. So, for now, it is safe to just
# ignore. This should be revisited, as validating it helps to avoid
# having something not documented at the uAPI.
#

# Those symbols should not be used by uAPI - don't document them
ignore symbol V4L2_BUF_TYPE_PRIVATE
ignore symbol V4L2_TUNER_DIGITAL_TV
ignore symbol V4L2_COLORSPACE_BT878

# Documented enum v4l2_field
replace symbol V4L2_FIELD_ALTERNATE :c:type:`v4l2_field`
replace symbol V4L2_FIELD_ANY :c:type:`v4l2_field`
replace symbol V4L2_FIELD_BOTTOM :c:type:`v4l2_field`
replace symbol V4L2_FIELD_INTERLACED :c:type:`v4l2_field`
replace symbol V4L2_FIELD_INTERLACED_BT :c:type:`v4l2_field`
replace symbol V4L2_FIELD_INTERLACED_TB :c:type:`v4l2_field`
replace symbol V4L2_FIELD_NONE :c:type:`v4l2_field`
replace symbol V4L2_FIELD_SEQ_BT :c:type:`v4l2_field`
replace symbol V4L2_FIELD_SEQ_TB :c:type:`v4l2_field`
replace symbol V4L2_FIELD_TOP :c:type:`v4l2_field`

# Documented enum v4l2_buf_type
replace symbol V4L2_BUF_TYPE_META_CAPTURE :c:type:`v4l2_buf_type`
replace symbol V4L2_BUF_TYPE_META_OUTPUT :c:type:`v4l2_buf_type`
replace symbol V4L2_BUF_TYPE_SDR_CAPTURE :c:type:`v4l2_buf_type`
replace symbol V4L2_BUF_TYPE_SDR_OUTPUT :c:type:`v4l2_buf_type`
replace symbol V4L2_BUF_TYPE_SLICED_VBI_CAPTURE :c:type:`v4l2_buf_type`
replace symbol V4L2_BUF_TYPE_SLICED_VBI_OUTPUT :c:type:`v4l2_buf_type`
replace symbol V4L2_BUF_TYPE_VBI_CAPTURE :c:type:`v4l2_buf_type`
replace symbol V4L2_BUF_TYPE_VBI_OUTPUT :c:type:`v4l2_buf_type`
replace symbol V4L2_BUF_TYPE_VIDEO_CAPTURE :c:type:`v4l2_buf_type`
replace symbol V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE :c:type:`v4l2_buf_type`
replace symbol V4L2_BUF_TYPE_VIDEO_OUTPUT :c:type:`v4l2_buf_type`
replace symbol V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE :c:type:`v4l2_buf_type`
replace symbol V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY :c:type:`v4l2_buf_type`
replace symbol V4L2_BUF_TYPE_VIDEO_OVERLAY :c:type:`v4l2_buf_type`

# Documented enum v4l2_tuner_type
replace symbol V4L2_TUNER_ANALOG_TV :c:type:`v4l2_tuner_type`
replace symbol V4L2_TUNER_RADIO :c:type:`v4l2_tuner_type`
replace symbol V4L2_TUNER_RF :c:type:`v4l2_tuner_type`
replace symbol V4L2_TUNER_SDR :c:type:`v4l2_tuner_type`

# Documented enum v4l2_memory
replace symbol V4L2_MEMORY_DMABUF :c:type:`v4l2_memory`
replace symbol V4L2_MEMORY_MMAP :c:type:`v4l2_memory`
replace symbol V4L2_MEMORY_OVERLAY :c:type:`v4l2_memory`
replace symbol V4L2_MEMORY_USERPTR :c:type:`v4l2_memory`

# Documented enum v4l2_colorspace
replace symbol V4L2_COLORSPACE_470_SYSTEM_BG :c:type:`v4l2_colorspace`
replace symbol V4L2_COLORSPACE_470_SYSTEM_M :c:type:`v4l2_colorspace`
replace symbol V4L2_COLORSPACE_OPRGB :c:type:`v4l2_colorspace`
replace define V4L2_COLORSPACE_ADOBERGB :c:type:`v4l2_colorspace`
replace symbol V4L2_COLORSPACE_BT2020 :c:type:`v4l2_colorspace`
replace symbol V4L2_COLORSPACE_DCI_P3 :c:type:`v4l2_colorspace`
replace symbol V4L2_COLORSPACE_DEFAULT :c:type:`v4l2_colorspace`
replace symbol V4L2_COLORSPACE_JPEG :c:type:`v4l2_colorspace`
replace symbol V4L2_COLORSPACE_RAW :c:type:`v4l2_colorspace`
replace symbol V4L2_COLORSPACE_REC709 :c:type:`v4l2_colorspace`
replace symbol V4L2_COLORSPACE_SMPTE170M :c:type:`v4l2_colorspace`
replace symbol V4L2_COLORSPACE_SMPTE240M :c:type:`v4l2_colorspace`
replace symbol V4L2_COLORSPACE_SRGB :c:type:`v4l2_colorspace`

# Documented enum v4l2_xfer_func
replace symbol V4L2_XFER_FUNC_709 :c:type:`v4l2_xfer_func`
replace symbol V4L2_XFER_FUNC_OPRGB :c:type:`v4l2_xfer_func`
replace define V4L2_XFER_FUNC_ADOBERGB :c:type:`v4l2_xfer_func`
replace symbol V4L2_XFER_FUNC_DCI_P3 :c:type:`v4l2_xfer_func`
replace symbol V4L2_XFER_FUNC_DEFAULT :c:type:`v4l2_xfer_func`
replace symbol V4L2_XFER_FUNC_NONE :c:type:`v4l2_xfer_func`
replace symbol V4L2_XFER_FUNC_SMPTE2084 :c:type:`v4l2_xfer_func`
replace symbol V4L2_XFER_FUNC_SMPTE240M :c:type:`v4l2_xfer_func`
replace symbol V4L2_XFER_FUNC_SRGB :c:type:`v4l2_xfer_func`

# Documented enum v4l2_ycbcr_encoding
replace symbol V4L2_YCBCR_ENC_601 :c:type:`v4l2_ycbcr_encoding`
replace symbol V4L2_YCBCR_ENC_709 :c:type:`v4l2_ycbcr_encoding`
replace symbol V4L2_YCBCR_ENC_BT2020 :c:type:`v4l2_ycbcr_encoding`
replace symbol V4L2_YCBCR_ENC_BT2020_CONST_LUM :c:type:`v4l2_ycbcr_encoding`
replace symbol V4L2_YCBCR_ENC_DEFAULT :c:type:`v4l2_ycbcr_encoding`
replace symbol V4L2_YCBCR_ENC_SYCC :c:type:`v4l2_ycbcr_encoding`
replace symbol V4L2_YCBCR_ENC_XV601 :c:type:`v4l2_ycbcr_encoding`
replace symbol V4L2_YCBCR_ENC_XV709 :c:type:`v4l2_ycbcr_encoding`
replace symbol V4L2_YCBCR_ENC_SMPTE240M :c:type:`v4l2_ycbcr_encoding`

# Documented enum v4l2_hsv_encoding
replace symbol V4L2_HSV_ENC_180 :c:type:`v4l2_hsv_encoding`
replace symbol V4L2_HSV_ENC_256 :c:type:`v4l2_hsv_encoding`

# Documented enum v4l2_quantization
replace symbol V4L2_QUANTIZATION_DEFAULT :c:type:`v4l2_quantization`
replace symbol V4L2_QUANTIZATION_FULL_RANGE :c:type:`v4l2_quantization`
replace symbol V4L2_QUANTIZATION_LIM_RANGE :c:type:`v4l2_quantization`

# Documented enum v4l2_priority
replace symbol V4L2_PRIORITY_BACKGROUND :c:type:`v4l2_priority`
replace symbol V4L2_PRIORITY_DEFAULT :c:type:`v4l2_priority`
replace symbol V4L2_PRIORITY_INTERACTIVE :c:type:`v4l2_priority`
replace symbol V4L2_PRIORITY_RECORD :c:type:`v4l2_priority`
replace symbol V4L2_PRIORITY_UNSET :c:type:`v4l2_priority`

# Documented enum v4l2_frmsizetypes
replace symbol V4L2_FRMSIZE_TYPE_CONTINUOUS :c:type:`v4l2_frmsizetypes`
replace symbol V4L2_FRMSIZE_TYPE_DISCRETE :c:type:`v4l2_frmsizetypes`
replace symbol V4L2_FRMSIZE_TYPE_STEPWISE :c:type:`v4l2_frmsizetypes`

# Documented enum frmivaltypes
replace symbol V4L2_FRMIVAL_TYPE_CONTINUOUS :c:type:`v4l2_frmivaltypes`
replace symbol V4L2_FRMIVAL_TYPE_DISCRETE :c:type:`v4l2_frmivaltypes`
replace symbol V4L2_FRMIVAL_TYPE_STEPWISE :c:type:`v4l2_frmivaltypes`

# Documented enum :c:type:`v4l2_ctrl_type`
replace symbol V4L2_CTRL_COMPOUND_TYPES vidioc_queryctrl

replace symbol V4L2_CTRL_TYPE_BITMASK :c:type:`v4l2_ctrl_type`
replace symbol V4L2_CTRL_TYPE_BOOLEAN :c:type:`v4l2_ctrl_type`
replace symbol V4L2_CTRL_TYPE_BUTTON :c:type:`v4l2_ctrl_type`
replace symbol V4L2_CTRL_TYPE_CTRL_CLASS :c:type:`v4l2_ctrl_type`
replace symbol V4L2_CTRL_TYPE_INTEGER :c:type:`v4l2_ctrl_type`
replace symbol V4L2_CTRL_TYPE_INTEGER64 :c:type:`v4l2_ctrl_type`
replace symbol V4L2_CTRL_TYPE_INTEGER_MENU :c:type:`v4l2_ctrl_type`
replace symbol V4L2_CTRL_TYPE_MENU :c:type:`v4l2_ctrl_type`
replace symbol V4L2_CTRL_TYPE_STRING :c:type:`v4l2_ctrl_type`
replace symbol V4L2_CTRL_TYPE_U16 :c:type:`v4l2_ctrl_type`
replace symbol V4L2_CTRL_TYPE_U32 :c:type:`v4l2_ctrl_type`
replace symbol V4L2_CTRL_TYPE_U8 :c:type:`v4l2_ctrl_type`
replace symbol V4L2_CTRL_TYPE_MPEG2_SLICE_PARAMS :c:type:`v4l2_ctrl_type`
replace symbol V4L2_CTRL_TYPE_MPEG2_QUANTIZATION :c:type:`v4l2_ctrl_type`

# V4L2 capability defines
replace define V4L2_CAP_VIDEO_CAPTURE device-capabilities
replace define V4L2_CAP_VIDEO_CAPTURE_MPLANE device-capabilities
replace define V4L2_CAP_VIDEO_OUTPUT device-capabilities
replace define V4L2_CAP_VIDEO_OUTPUT_MPLANE device-capabilities
replace define V4L2_CAP_VIDEO_M2M device-capabilities
replace define V4L2_CAP_VIDEO_M2M_MPLANE device-capabilities
replace define V4L2_CAP_VIDEO_OVERLAY device-capabilities
replace define V4L2_CAP_VBI_CAPTURE device-capabilities
replace define V4L2_CAP_VBI_OUTPUT device-capabilities
replace define V4L2_CAP_SLICED_VBI_CAPTURE device-capabilities
replace define V4L2_CAP_SLICED_VBI_OUTPUT device-capabilities
replace define V4L2_CAP_RDS_CAPTURE device-capabilities
replace define V4L2_CAP_VIDEO_OUTPUT_OVERLAY device-capabilities
replace define V4L2_CAP_HW_FREQ_SEEK device-capabilities
replace define V4L2_CAP_RDS_OUTPUT device-capabilities
replace define V4L2_CAP_TUNER device-capabilities
replace define V4L2_CAP_AUDIO device-capabilities
replace define V4L2_CAP_RADIO device-capabilities
replace define V4L2_CAP_MODULATOR device-capabilities
replace define V4L2_CAP_SDR_CAPTURE device-capabilities
replace define V4L2_CAP_EXT_PIX_FORMAT device-capabilities
replace define V4L2_CAP_SDR_OUTPUT device-capabilities
replace define V4L2_CAP_META_CAPTURE device-capabilities
replace define V4L2_CAP_READWRITE device-capabilities
replace define V4L2_CAP_ASYNCIO device-capabilities
replace define V4L2_CAP_STREAMING device-capabilities
replace define V4L2_CAP_META_OUTPUT device-capabilities
replace define V4L2_CAP_DEVICE_CAPS device-capabilities
replace define V4L2_CAP_TOUCH device-capabilities

# V4L2 pix flags
replace define V4L2_PIX_FMT_PRIV_MAGIC :c:type:`v4l2_pix_format`
replace define V4L2_PIX_FMT_FLAG_PREMUL_ALPHA reserved-formats

# V4L2 format flags
replace define V4L2_FMT_FLAG_COMPRESSED fmtdesc-flags
replace define V4L2_FMT_FLAG_EMULATED fmtdesc-flags

# V4L2 tymecode types
replace define V4L2_TC_TYPE_24FPS timecode-type
replace define V4L2_TC_TYPE_25FPS timecode-type
replace define V4L2_TC_TYPE_30FPS timecode-type
replace define V4L2_TC_TYPE_50FPS timecode-type
replace define V4L2_TC_TYPE_60FPS timecode-type

# V4L2 tymecode flags
replace define V4L2_TC_FLAG_DROPFRAME timecode-flags
replace define V4L2_TC_FLAG_COLORFRAME timecode-flags
replace define V4L2_TC_USERBITS_field timecode-flags
replace define V4L2_TC_USERBITS_USERDEFINED timecode-flags
replace define V4L2_TC_USERBITS_8BITCHARS timecode-flags

# V4L2 JPEG markers
replace define V4L2_JPEG_MARKER_DHT jpeg-markers
replace define V4L2_JPEG_MARKER_DQT jpeg-markers
replace define V4L2_JPEG_MARKER_DRI jpeg-markers
replace define V4L2_JPEG_MARKER_COM jpeg-markers
replace define V4L2_JPEG_MARKER_APP jpeg-markers

# V4L2 framebuffer caps and flags

replace define V4L2_FBUF_CAP_EXTERNOVERLAY framebuffer-cap
replace define V4L2_FBUF_CAP_CHROMAKEY framebuffer-cap
replace define V4L2_FBUF_CAP_LIST_CLIPPING framebuffer-cap
replace define V4L2_FBUF_CAP_BITMAP_CLIPPING framebuffer-cap
replace define V4L2_FBUF_CAP_LOCAL_ALPHA framebuffer-cap
replace define V4L2_FBUF_CAP_GLOBAL_ALPHA framebuffer-cap
replace define V4L2_FBUF_CAP_LOCAL_INV_ALPHA framebuffer-cap
replace define V4L2_FBUF_CAP_SRC_CHROMAKEY framebuffer-cap

replace define V4L2_FBUF_FLAG_PRIMARY framebuffer-flags
replace define V4L2_FBUF_FLAG_OVERLAY framebuffer-flags
replace define V4L2_FBUF_FLAG_CHROMAKEY framebuffer-flags
replace define V4L2_FBUF_FLAG_LOCAL_ALPHA framebuffer-flags
replace define V4L2_FBUF_FLAG_GLOBAL_ALPHA framebuffer-flags
replace define V4L2_FBUF_FLAG_LOCAL_INV_ALPHA framebuffer-flags
replace define V4L2_FBUF_FLAG_SRC_CHROMAKEY framebuffer-flags

# Used on VIDIOC_G_PARM

replace define V4L2_MODE_HIGHQUALITY parm-flags
replace define V4L2_CAP_TIMEPERFRAME :c:type:`v4l2_captureparm`

# The V4L2_STD_foo are all defined at v4l2_std_id table

replace define V4L2_STD_PAL_B v4l2-std-id
replace define V4L2_STD_PAL_B1 v4l2-std-id
replace define V4L2_STD_PAL_G v4l2-std-id
replace define V4L2_STD_PAL_H v4l2-std-id
replace define V4L2_STD_PAL_I v4l2-std-id
replace define V4L2_STD_PAL_D v4l2-std-id
replace define V4L2_STD_PAL_D1 v4l2-std-id
replace define V4L2_STD_PAL_K v4l2-std-id
replace define V4L2_STD_PAL_M v4l2-std-id
replace define V4L2_STD_PAL_N v4l2-std-id
replace define V4L2_STD_PAL_Nc v4l2-std-id
replace define V4L2_STD_PAL_60 v4l2-std-id
replace define V4L2_STD_NTSC_M v4l2-std-id
replace define V4L2_STD_NTSC_M_JP v4l2-std-id
replace define V4L2_STD_NTSC_443 v4l2-std-id
replace define V4L2_STD_NTSC_M_KR v4l2-std-id
replace define V4L2_STD_SECAM_B v4l2-std-id
replace define V4L2_STD_SECAM_D v4l2-std-id
replace define V4L2_STD_SECAM_G v4l2-std-id
replace define V4L2_STD_SECAM_H v4l2-std-id
replace define V4L2_STD_SECAM_K v4l2-std-id
replace define V4L2_STD_SECAM_K1 v4l2-std-id
replace define V4L2_STD_SECAM_L v4l2-std-id
replace define V4L2_STD_SECAM_LC v4l2-std-id
replace define V4L2_STD_ATSC_8_VSB v4l2-std-id
replace define V4L2_STD_ATSC_16_VSB v4l2-std-id
replace define V4L2_STD_NTSC v4l2-std-id
replace define V4L2_STD_SECAM_DK v4l2-std-id
replace define V4L2_STD_SECAM v4l2-std-id
replace define V4L2_STD_PAL_BG v4l2-std-id
replace define V4L2_STD_PAL_DK v4l2-std-id
replace define V4L2_STD_PAL v4l2-std-id
replace define V4L2_STD_B v4l2-std-id
replace define V4L2_STD_G v4l2-std-id
replace define V4L2_STD_H v4l2-std-id
replace define V4L2_STD_L v4l2-std-id
replace define V4L2_STD_GH v4l2-std-id
replace define V4L2_STD_DK v4l2-std-id
replace define V4L2_STD_BG v4l2-std-id
replace define V4L2_STD_MN v4l2-std-id
replace define V4L2_STD_MTS v4l2-std-id
replace define V4L2_STD_525_60 v4l2-std-id
replace define V4L2_STD_625_50 v4l2-std-id
replace define V4L2_STD_ATSC v4l2-std-id
replace define V4L2_STD_UNKNOWN v4l2-std-id
replace define V4L2_STD_ALL v4l2-std-id

# V4L2 DT BT timings definitions

replace define V4L2_DV_PROGRESSIVE :c:type:`v4l2_bt_timings`
replace define V4L2_DV_INTERLACED :c:type:`v4l2_bt_timings`

replace define V4L2_DV_VSYNC_POS_POL :c:type:`v4l2_bt_timings`
replace define V4L2_DV_HSYNC_POS_POL :c:type:`v4l2_bt_timings`

replace define V4L2_DV_BT_STD_CEA861 dv-bt-standards
replace define V4L2_DV_BT_STD_DMT dv-bt-standards
replace define V4L2_DV_BT_STD_CVT dv-bt-standards
replace define V4L2_DV_BT_STD_GTF dv-bt-standards
replace define V4L2_DV_BT_STD_SDI dv-bt-standards

replace define V4L2_DV_FL_REDUCED_BLANKING dv-bt-standards
replace define V4L2_DV_FL_CAN_REDUCE_FPS dv-bt-standards
replace define V4L2_DV_FL_CAN_DETECT_REDUCED_FPS dv-bt-standards
replace define V4L2_DV_FL_REDUCED_FPS dv-bt-standards
replace define V4L2_DV_FL_HALF_LINE dv-bt-standards
replace define V4L2_DV_FL_IS_CE_VIDEO dv-bt-standards
replace define V4L2_DV_FL_FIRST_FIELD_EXTRA_LINE dv-bt-standards
replace define V4L2_DV_FL_HAS_PICTURE_ASPECT dv-bt-standards
replace define V4L2_DV_FL_HAS_CEA861_VIC dv-bt-standards
replace define V4L2_DV_FL_HAS_HDMI_VIC dv-bt-standards

replace define V4L2_DV_BT_656_1120 dv-timing-types

replace define V4L2_DV_BT_CAP_INTERLACED framebuffer-cap
replace define V4L2_DV_BT_CAP_PROGRESSIVE framebuffer-cap
replace define V4L2_DV_BT_CAP_REDUCED_BLANKING framebuffer-cap
replace define V4L2_DV_BT_CAP_CUSTOM framebuffer-cap

# V4L2 input

replace define V4L2_INPUT_TYPE_TUNER input-type
replace define V4L2_INPUT_TYPE_CAMERA input-type
replace define V4L2_INPUT_TYPE_TOUCH input-type

replace define V4L2_IN_ST_NO_POWER input-status
replace define V4L2_IN_ST_NO_SIGNAL input-status
replace define V4L2_IN_ST_NO_COLOR input-status
replace define V4L2_IN_ST_HFLIP input-status
replace define V4L2_IN_ST_VFLIP input-status
replace define V4L2_IN_ST_NO_H_LOCK input-status
replace define V4L2_IN_ST_COLOR_KILL input-status
replace define V4L2_IN_ST_NO_SYNC input-status
replace define V4L2_IN_ST_NO_EQU input-status
replace define V4L2_IN_ST_NO_CARRIER input-status
replace define V4L2_IN_ST_MACROVISION input-status
replace define V4L2_IN_ST_NO_ACCESS input-status
replace define V4L2_IN_ST_VTR input-status
replace define V4L2_IN_ST_NO_V_LOCK input-status
replace define V4L2_IN_ST_NO_STD_LOCK input-status

replace define V4L2_IN_CAP_DV_TIMINGS input-capabilities
replace define V4L2_IN_CAP_STD input-capabilities
replace define V4L2_IN_CAP_NATIVE_SIZE input-capabilities

# V4L2 output

replace define V4L2_OUTPUT_TYPE_MODULATOR output-type
replace define V4L2_OUTPUT_TYPE_ANALOG output-type
replace define V4L2_OUTPUT_TYPE_ANALOGVGAOVERLAY output-type

replace define V4L2_OUT_CAP_DV_TIMINGS output-capabilities
replace define V4L2_OUT_CAP_STD output-capabilities
replace define V4L2_OUT_CAP_NATIVE_SIZE output-capabilities

# V4L2 control flags

replace define V4L2_CTRL_FLAG_DISABLED control-flags
replace define V4L2_CTRL_FLAG_GRABBED control-flags
replace define V4L2_CTRL_FLAG_READ_ONLY control-flags
replace define V4L2_CTRL_FLAG_UPDATE control-flags
replace define V4L2_CTRL_FLAG_INACTIVE control-flags
replace define V4L2_CTRL_FLAG_SLIDER control-flags
replace define V4L2_CTRL_FLAG_WRITE_ONLY control-flags
replace define V4L2_CTRL_FLAG_VOLATILE control-flags
replace define V4L2_CTRL_FLAG_HAS_PAYLOAD control-flags
replace define V4L2_CTRL_FLAG_EXECUTE_ON_WRITE control-flags
replace define V4L2_CTRL_FLAG_MODIFY_LAYOUT control-flags

replace define V4L2_CTRL_FLAG_NEXT_CTRL control
replace define V4L2_CTRL_FLAG_NEXT_COMPOUND control
replace define V4L2_CID_PRIVATE_BASE control

# V4L2 tuner

replace define V4L2_TUNER_CAP_LOW tuner-capability
replace define V4L2_TUNER_CAP_NORM tuner-capability
replace define V4L2_TUNER_CAP_HWSEEK_BOUNDED tuner-capability
replace define V4L2_TUNER_CAP_HWSEEK_WRAP tuner-capability
replace define V4L2_TUNER_CAP_STEREO tuner-capability
replace define V4L2_TUNER_CAP_LANG2 tuner-capability
replace define V4L2_TUNER_CAP_SAP tuner-capability
replace define V4L2_TUNER_CAP_LANG1 tuner-capability
replace define V4L2_TUNER_CAP_RDS tuner-capability
replace define V4L2_TUNER_CAP_RDS_BLOCK_IO tuner-capability
replace define V4L2_TUNER_CAP_RDS_CONTROLS tuner-capability
replace define V4L2_TUNER_CAP_FREQ_BANDS tuner-capability
replace define V4L2_TUNER_CAP_HWSEEK_PROG_LIM tuner-capability
replace define V4L2_TUNER_CAP_1HZ tuner-capability

replace define V4L2_TUNER_SUB_MONO tuner-rxsubchans
replace define V4L2_TUNER_SUB_STEREO tuner-rxsubchans
replace define V4L2_TUNER_SUB_LANG2 tuner-rxsubchans
replace define V4L2_TUNER_SUB_SAP tuner-rxsubchans
replace define V4L2_TUNER_SUB_LANG1 tuner-rxsubchans
replace define V4L2_TUNER_SUB_RDS tuner-rxsubchans

replace define V4L2_TUNER_MODE_MONO tuner-audmode
replace define V4L2_TUNER_MODE_STEREO tuner-audmode
replace define V4L2_TUNER_MODE_LANG2 tuner-audmode
replace define V4L2_TUNER_MODE_SAP tuner-audmode
replace define V4L2_TUNER_MODE_LANG1 tuner-audmode
replace define V4L2_TUNER_MODE_LANG1_LANG2 tuner-audmode

replace define V4L2_BAND_MODULATION_VSB band-modulation
replace define V4L2_BAND_MODULATION_FM band-modulation
replace define V4L2_BAND_MODULATION_AM band-modulation

replace define V4L2_RDS_BLOCK_MSK v4l2-rds-block
replace define V4L2_RDS_BLOCK_A v4l2-rds-block
replace define V4L2_RDS_BLOCK_B v4l2-rds-block
replace define V4L2_RDS_BLOCK_C v4l2-rds-block
replace define V4L2_RDS_BLOCK_D v4l2-rds-block
replace define V4L2_RDS_BLOCK_C_ALT v4l2-rds-block
replace define V4L2_RDS_BLOCK_INVALID v4l2-rds-block
replace define V4L2_RDS_BLOCK_CORRECTED v4l2-rds-block
replace define V4L2_RDS_BLOCK_ERROR v4l2-rds-block

# V4L2 audio

replace define V4L2_AUDCAP_STEREO audio-capability
replace define V4L2_AUDCAP_AVL audio-capability

replace define V4L2_AUDMODE_AVL audio-mode

# MPEG

replace define V4L2_ENC_IDX_FRAME_I :c:type:`v4l2_enc_idx`
replace define V4L2_ENC_IDX_FRAME_P :c:type:`v4l2_enc_idx`
replace define V4L2_ENC_IDX_FRAME_B :c:type:`v4l2_enc_idx`
replace define V4L2_ENC_IDX_FRAME_MASK :c:type:`v4l2_enc_idx`
replace define V4L2_ENC_IDX_ENTRIES :c:type:`v4l2_enc_idx`

replace define V4L2_ENC_CMD_START encoder-cmds
replace define V4L2_ENC_CMD_STOP encoder-cmds
replace define V4L2_ENC_CMD_PAUSE encoder-cmds
replace define V4L2_ENC_CMD_RESUME encoder-cmds

replace define V4L2_ENC_CMD_STOP_AT_GOP_END encoder-flags

replace define V4L2_DEC_CMD_START decoder-cmds
replace define V4L2_DEC_CMD_STOP decoder-cmds
replace define V4L2_DEC_CMD_PAUSE decoder-cmds
replace define V4L2_DEC_CMD_RESUME decoder-cmds

replace define V4L2_DEC_CMD_START_MUTE_AUDIO decoder-cmds
replace define V4L2_DEC_CMD_PAUSE_TO_BLACK decoder-cmds
replace define V4L2_DEC_CMD_STOP_TO_BLACK decoder-cmds
replace define V4L2_DEC_CMD_STOP_IMMEDIATELY decoder-cmds

replace define V4L2_DEC_START_FMT_NONE decoder-cmds
replace define V4L2_DEC_START_FMT_GOP decoder-cmds

# V4L2 VBI

replace define V4L2_VBI_UNSYNC vbifmt-flags
replace define V4L2_VBI_INTERLACED vbifmt-flags

replace define V4L2_VBI_ITU_525_F1_START :c:type:`v4l2_vbi_format`
replace define V4L2_VBI_ITU_525_F2_START :c:type:`v4l2_vbi_format`
replace define V4L2_VBI_ITU_625_F1_START :c:type:`v4l2_vbi_format`
replace define V4L2_VBI_ITU_625_F2_START :c:type:`v4l2_vbi_format`


replace define V4L2_SLICED_TELETEXT_B vbi-services
replace define V4L2_SLICED_VPS vbi-services
replace define V4L2_SLICED_CAPTION_525 vbi-services
replace define V4L2_SLICED_WSS_625 vbi-services
replace define V4L2_SLICED_VBI_525 vbi-services
replace define V4L2_SLICED_VBI_625 vbi-services

replace define V4L2_MPEG_VBI_IVTV_TELETEXT_B ITV0-Line-Identifier-Constants
replace define V4L2_MPEG_VBI_IVTV_CAPTION_525 ITV0-Line-Identifier-Constants
replace define V4L2_MPEG_VBI_IVTV_WSS_625 ITV0-Line-Identifier-Constants
replace define V4L2_MPEG_VBI_IVTV_VPS ITV0-Line-Identifier-Constants

replace define V4L2_MPEG_VBI_IVTV_MAGIC0 v4l2-mpeg-vbi-fmt-ivtv-magic
replace define V4L2_MPEG_VBI_IVTV_MAGIC1 v4l2-mpeg-vbi-fmt-ivtv-magic

# V4L2 events

replace define V4L2_EVENT_ALL event-type
replace define V4L2_EVENT_VSYNC event-type
replace define V4L2_EVENT_EOS event-type
replace define V4L2_EVENT_CTRL event-type
replace define V4L2_EVENT_FRAME_SYNC event-type
replace define V4L2_EVENT_SOURCE_CHANGE event-type
replace define V4L2_EVENT_MOTION_DET event-type
replace define V4L2_EVENT_PRIVATE_START event-type

replace define V4L2_EVENT_CTRL_CH_VALUE ctrl-changes-flags
replace define V4L2_EVENT_CTRL_CH_FLAGS ctrl-changes-flags
replace define V4L2_EVENT_CTRL_CH_RANGE ctrl-changes-flags

replace define V4L2_EVENT_SRC_CH_RESOLUTION src-changes-flags

replace define V4L2_EVENT_MD_FL_HAVE_FRAME_SEQ :c:type:`v4l2_event_motion_det`

replace define V4L2_EVENT_SUB_FL_SEND_INITIAL event-flags
replace define V4L2_EVENT_SUB_FL_ALLOW_FEEDBACK event-flags

# V4L2 debugging
replace define V4L2_CHIP_MATCH_BRIDGE vidioc_dbg_g_register
replace define V4L2_CHIP_MATCH_SUBDEV vidioc_dbg_g_register
replace define V4L2_CHIP_MATCH_HOST vidioc_dbg_g_register
replace define V4L2_CHIP_MATCH_I2C_DRIVER vidioc_dbg_g_register
replace define V4L2_CHIP_MATCH_I2C_ADDR vidioc_dbg_g_register
replace define V4L2_CHIP_MATCH_AC97 vidioc_dbg_g_register

replace define V4L2_CHIP_FL_READABLE vidioc_dbg_g_register
replace define V4L2_CHIP_FL_WRITABLE vidioc_dbg_g_register

# Ignore reserved ioctl and ancillary macros

ignore define VIDEO_MAX_FRAME
ignore define VIDEO_MAX_PLANES
ignore define v4l2_fourcc
ignore define v4l2_fourcc_be
ignore define V4L2_FIELD_HAS_TOP
ignore define V4L2_FIELD_HAS_BOTTOM
ignore define V4L2_FIELD_HAS_BOTH
ignore define V4L2_FIELD_HAS_T_OR_B
ignore define V4L2_TYPE_IS_MULTIPLANAR
ignore define V4L2_TYPE_IS_OUTPUT
ignore define V4L2_TUNER_ADC
ignore define V4L2_MAP_COLORSPACE_DEFAULT
ignore define V4L2_MAP_XFER_FUNC_DEFAULT
ignore define V4L2_MAP_YCBCR_ENC_DEFAULT
ignore define V4L2_DV_BT_BLANKING_WIDTH
ignore define V4L2_DV_BT_FRAME_WIDTH
ignore define V4L2_DV_BT_BLANKING_HEIGHT
ignore define V4L2_DV_BT_FRAME_HEIGHT
ignore define V4L2_IN_CAP_CUSTOM_TIMINGS
ignore define V4L2_CTRL_ID_MASK
ignore define V4L2_CTRL_ID2CLASS
ignore define V4L2_CTRL_ID2WHICH
ignore define V4L2_CTRL_DRIVER_PRIV
ignore define V4L2_CTRL_MAX_DIMS
ignore define V4L2_CTRL_WHICH_CUR_VAL
ignore define V4L2_CTRL_WHICH_DEF_VAL
ignore define V4L2_CTRL_WHICH_REQUEST_VAL
ignore define V4L2_OUT_CAP_CUSTOM_TIMINGS
ignore define V4L2_CID_MAX_CTRLS

ignore define BASE_VIDIOC_PRIVATE

# Associate ioctls with their counterparts
replace ioctl VIDIOC_DBG_S_REGISTER vidioc_dbg_g_register
replace ioctl VIDIOC_DQBUF vidioc_qbuf
replace ioctl VIDIOC_S_AUDOUT vidioc_g_audout
replace ioctl VIDIOC_S_CROP vidioc_g_crop
replace ioctl VIDIOC_S_CTRL vidioc_g_ctrl
replace ioctl VIDIOC_S_DV_TIMINGS vidioc_g_dv_timings
replace ioctl VIDIOC_S_EDID vidioc_g_edid
replace ioctl VIDIOC_S_EXT_CTRLS vidioc_g_ext_ctrls
replace ioctl VIDIOC_S_FBUF vidioc_g_fbuf
replace ioctl VIDIOC_S_FMT vidioc_g_fmt
replace ioctl VIDIOC_S_FREQUENCY vidioc_g_frequency
replace ioctl VIDIOC_S_INPUT vidioc_g_input
replace ioctl VIDIOC_S_JPEGCOMP vidioc_g_jpegcomp
replace ioctl VIDIOC_S_MODULATOR vidioc_g_modulator
replace ioctl VIDIOC_S_OUTPUT vidioc_g_output
replace ioctl VIDIOC_S_PARM vidioc_g_parm
replace ioctl VIDIOC_S_PRIORITY vidioc_g_priority
replace ioctl VIDIOC_S_SELECTION vidioc_g_selection
replace ioctl VIDIOC_S_STD vidioc_g_std
replace ioctl VIDIOC_S_AUDIO vidioc_g_audio
replace ioctl VIDIOC_S_TUNER vidioc_g_tuner
replace ioctl VIDIOC_TRY_DECODER_CMD vidioc_decoder_cmd
replace ioctl VIDIOC_TRY_ENCODER_CMD vidioc_encoder_cmd
replace ioctl VIDIOC_TRY_EXT_CTRLS vidioc_g_ext_ctrls
replace ioctl VIDIOC_TRY_FMT vidioc_g_fmt
replace ioctl VIDIOC_STREAMOFF vidioc_streamon
replace ioctl VIDIOC_QUERY_EXT_CTRL vidioc_queryctrl
replace ioctl VIDIOC_QUERYMENU vidioc_queryctrl