change sockaddr generation to pass around correct types.
[trinity.git] / ioctls / videodev2.c
blobf7183f29835a72eb0df4697396d4dd57e806aca9
1 #include <linux/videodev2.h>
3 #include "utils.h"
4 #include "ioctls.h"
6 static const struct ioctl videodev2_ioctls[] = {
7 IOCTL(VIDIOC_QUERYCAP),
8 IOCTL(VIDIOC_RESERVED),
9 IOCTL(VIDIOC_ENUM_FMT),
10 IOCTL(VIDIOC_G_FMT),
11 IOCTL(VIDIOC_S_FMT),
12 IOCTL(VIDIOC_REQBUFS),
13 IOCTL(VIDIOC_QUERYBUF),
14 IOCTL(VIDIOC_G_FBUF),
15 IOCTL(VIDIOC_S_FBUF),
16 IOCTL(VIDIOC_OVERLAY),
17 IOCTL(VIDIOC_QBUF),
18 #ifdef VIDIOC_EXPBUF
19 IOCTL(VIDIOC_EXPBUF),
20 #endif
21 IOCTL(VIDIOC_DQBUF),
22 IOCTL(VIDIOC_STREAMON),
23 IOCTL(VIDIOC_STREAMOFF),
24 IOCTL(VIDIOC_G_PARM),
25 IOCTL(VIDIOC_S_PARM),
26 IOCTL(VIDIOC_G_STD),
27 IOCTL(VIDIOC_S_STD),
28 IOCTL(VIDIOC_ENUMSTD),
29 IOCTL(VIDIOC_ENUMINPUT),
30 IOCTL(VIDIOC_G_CTRL),
31 IOCTL(VIDIOC_S_CTRL),
32 IOCTL(VIDIOC_G_TUNER),
33 IOCTL(VIDIOC_S_TUNER),
34 IOCTL(VIDIOC_G_AUDIO),
35 IOCTL(VIDIOC_S_AUDIO),
36 IOCTL(VIDIOC_QUERYCTRL),
37 IOCTL(VIDIOC_QUERYMENU),
38 IOCTL(VIDIOC_G_INPUT),
39 IOCTL(VIDIOC_S_INPUT),
40 IOCTL(VIDIOC_G_OUTPUT),
41 IOCTL(VIDIOC_S_OUTPUT),
42 IOCTL(VIDIOC_ENUMOUTPUT),
43 IOCTL(VIDIOC_G_AUDOUT),
44 IOCTL(VIDIOC_S_AUDOUT),
45 IOCTL(VIDIOC_G_MODULATOR),
46 IOCTL(VIDIOC_S_MODULATOR),
47 IOCTL(VIDIOC_G_FREQUENCY),
48 IOCTL(VIDIOC_S_FREQUENCY),
49 IOCTL(VIDIOC_CROPCAP),
50 IOCTL(VIDIOC_G_CROP),
51 IOCTL(VIDIOC_S_CROP),
52 IOCTL(VIDIOC_G_JPEGCOMP),
53 IOCTL(VIDIOC_S_JPEGCOMP),
54 IOCTL(VIDIOC_QUERYSTD),
55 IOCTL(VIDIOC_TRY_FMT),
56 IOCTL(VIDIOC_ENUMAUDIO),
57 IOCTL(VIDIOC_ENUMAUDOUT),
58 IOCTL(VIDIOC_G_PRIORITY),
59 IOCTL(VIDIOC_S_PRIORITY),
60 IOCTL(VIDIOC_G_SLICED_VBI_CAP),
61 IOCTL(VIDIOC_LOG_STATUS),
62 IOCTL(VIDIOC_G_EXT_CTRLS),
63 IOCTL(VIDIOC_S_EXT_CTRLS),
64 IOCTL(VIDIOC_TRY_EXT_CTRLS),
65 IOCTL(VIDIOC_ENUM_FRAMESIZES),
66 IOCTL(VIDIOC_ENUM_FRAMEINTERVALS),
67 IOCTL(VIDIOC_G_ENC_INDEX),
68 IOCTL(VIDIOC_ENCODER_CMD),
69 IOCTL(VIDIOC_TRY_ENCODER_CMD),
70 IOCTL(VIDIOC_DBG_S_REGISTER),
71 IOCTL(VIDIOC_DBG_G_REGISTER),
72 #ifdef VIDIOC_DBG_G_CHIP_IDENT
73 IOCTL(VIDIOC_DBG_G_CHIP_IDENT),
74 #endif
75 IOCTL(VIDIOC_S_HW_FREQ_SEEK),
76 #ifdef VIDIOC_ENUM_DV_PRESETS
77 IOCTL(VIDIOC_ENUM_DV_PRESETS),
78 #endif
79 #ifdef VIDIOC_S_DV_PRESET
80 IOCTL(VIDIOC_S_DV_PRESET),
81 #endif
82 #ifdef VIDIOC_G_DV_PRESET
83 IOCTL(VIDIOC_G_DV_PRESET),
84 #endif
85 #ifdef VIDIOC_QUERY_DV_PRESET
86 IOCTL(VIDIOC_QUERY_DV_PRESET),
87 #endif
88 #ifdef VIDIOC_S_DV_TIMINGS
89 IOCTL(VIDIOC_S_DV_TIMINGS),
90 #endif
91 #ifdef VIDIOC_G_DV_TIMINGS
92 IOCTL(VIDIOC_G_DV_TIMINGS),
93 #endif
94 #ifdef VIDIOC_DQEVENT
95 IOCTL(VIDIOC_DQEVENT),
96 #endif
97 #ifdef VIDIOC_SUBSCRIBE_EVENT
98 IOCTL(VIDIOC_SUBSCRIBE_EVENT),
99 #endif
100 #ifdef VIDIOC_UNSUBSCRIBE_EVENT
101 IOCTL(VIDIOC_UNSUBSCRIBE_EVENT),
102 #endif
103 #ifdef VIDIOC_CREATE_BUFS
104 IOCTL(VIDIOC_CREATE_BUFS),
105 #endif
106 #ifdef VIDIOC_PREPARE_BUF
107 IOCTL(VIDIOC_PREPARE_BUF),
108 #endif
109 #ifdef VIDIOC_G_SELECTION
110 IOCTL(VIDIOC_G_SELECTION),
111 #endif
112 #ifdef VIDIOC_S_SELECTION
113 IOCTL(VIDIOC_S_SELECTION),
114 #endif
115 #ifdef VIDIOC_DECODER_CMD
116 IOCTL(VIDIOC_DECODER_CMD),
117 #endif
118 #ifdef VIDIOC_TRY_DECODER_CMD
119 IOCTL(VIDIOC_TRY_DECODER_CMD),
120 #endif
121 #ifdef VIDIOC_ENUM_DV_TIMINGS
122 IOCTL(VIDIOC_ENUM_DV_TIMINGS),
123 #endif
124 #ifdef VIDIOC_QUERY_DV_TIMINGS
125 IOCTL(VIDIOC_QUERY_DV_TIMINGS),
126 #endif
127 #ifdef VIDIOC_DV_TIMINGS_CAP
128 IOCTL(VIDIOC_DV_TIMINGS_CAP),
129 #endif
130 #ifdef VIDIOC_ENUM_FREQ_BANDS
131 IOCTL(VIDIOC_ENUM_FREQ_BANDS),
132 #endif
135 static const char *const videodev2_devs[] = {
136 "video4linux",
139 static const struct ioctl_group videodev2_grp = {
140 .devtype = DEV_MISC,
141 .devs = videodev2_devs,
142 .devs_cnt = ARRAY_SIZE(videodev2_devs),
143 .sanitise = pick_random_ioctl,
144 .ioctls = videodev2_ioctls,
145 .ioctls_cnt = ARRAY_SIZE(videodev2_ioctls),
148 REG_IOCTL_GROUP(videodev2_grp)