Don't initialize slots by setf'ing them. Do it in make-instance.
[cl-v4l2.git] / grovel.lisp
blob8eede3d966b587dc0d02bfae4a92aceedb699ad4
1 (include "linux/videodev2.h")
3 (in-package :cl-v4l2)
5 ;;
6 ;; I O C T L C O D E S F O R V I D E O D E V I C E S
7 ;;
8 (constant (vidioc-querycap "VIDIOC_QUERYCAP"))
9 (constant (vidioc-reserved "VIDIOC_RESERVED"))
10 (constant (vidioc-enum-fmt "VIDIOC_ENUM_FMT"))
11 (constant (vidioc-g-fmt "VIDIOC_G_FMT"))
12 (constant (vidioc-s-fmt "VIDIOC_S_FMT"))
13 (constant (vidioc-reqbufs "VIDIOC_REQBUFS"))
14 (constant (vidioc-querybuf "VIDIOC_QUERYBUF"))
15 (constant (vidioc-g-fbuf "VIDIOC_G_FBUF"))
16 (constant (vidioc-s-fbuf "VIDIOC_S_FBUF"))
17 (constant (vidioc-overlay "VIDIOC_OVERLAY"))
18 (constant (vidioc-qbuf "VIDIOC_QBUF"))
19 (constant (vidioc-dqbuf "VIDIOC_DQBUF"))
20 (constant (vidioc-streamon "VIDIOC_STREAMON"))
21 (constant (vidioc-streamoff "VIDIOC_STREAMOFF"))
22 (constant (vidioc-g-parm "VIDIOC_G_PARM"))
23 (constant (vidioc-s-parm "VIDIOC_S_PARM"))
24 (constant (vidioc-g-std "VIDIOC_G_STD"))
25 (constant (vidioc-s-std "VIDIOC_S_STD"))
26 (constant (vidioc-enumstd "VIDIOC_ENUMSTD"))
27 (constant (vidioc-enuminput "VIDIOC_ENUMINPUT"))
28 (constant (vidioc-g-ctrl "VIDIOC_G_CTRL"))
29 (constant (vidioc-s-ctrl "VIDIOC_S_CTRL"))
30 (constant (vidioc-g-tuner "VIDIOC_G_TUNER"))
31 (constant (vidioc-s-tuner "VIDIOC_S_TUNER"))
32 (constant (vidioc-g-audio "VIDIOC_G_AUDIO"))
33 (constant (vidioc-s-audio "VIDIOC_S_AUDIO"))
34 (constant (vidioc-queryctrl "VIDIOC_QUERYCTRL"))
35 (constant (vidioc-querymenu "VIDIOC_QUERYMENU"))
36 (constant (vidioc-g-input "VIDIOC_G_INPUT"))
37 (constant (vidioc-s-input "VIDIOC_S_INPUT"))
38 (constant (vidioc-g-output "VIDIOC_G_OUTPUT"))
39 (constant (vidioc-s-output "VIDIOC_S_OUTPUT"))
40 (constant (vidioc-enumoutput "VIDIOC_ENUMOUTPUT"))
41 (constant (vidioc-g-audout "VIDIOC_G_AUDOUT"))
42 (constant (vidioc-s-audout "VIDIOC_S_AUDOUT"))
43 (constant (vidioc-g-modulator "VIDIOC_G_MODULATOR"))
44 (constant (vidioc-s-modulator "VIDIOC_S_MODULATOR"))
45 (constant (vidioc-g-frequency "VIDIOC_G_FREQUENCY"))
46 (constant (vidioc-s-frequency "VIDIOC_S_FREQUENCY"))
47 (constant (vidioc-cropcap "VIDIOC_CROPCAP"))
48 (constant (vidioc-g-crop "VIDIOC_G_CROP"))
49 (constant (vidioc-s-crop "VIDIOC_S_CROP"))
50 (constant (vidioc-g-jpegcomp "VIDIOC_G_JPEGCOMP"))
51 (constant (vidioc-s-jpegcomp "VIDIOC_S_JPEGCOMP"))
52 (constant (vidioc-querystd "VIDIOC_QUERYSTD"))
53 (constant (vidioc-try-fmt "VIDIOC_TRY_FMT"))
54 (constant (vidioc-enumaudio "VIDIOC_ENUMAUDIO"))
55 (constant (vidioc-enumaudout "VIDIOC_ENUMAUDOUT"))
56 (constant (vidioc-g-priority "VIDIOC_G_PRIORITY"))
57 (constant (vidioc-s-priority "VIDIOC_S_PRIORITY"))
58 (constant (vidioc-g-sliced-vbi-cap "VIDIOC_G_SLICED_VBI_CAP"))
59 (constant (vidioc-log-status "VIDIOC_LOG_STATUS"))
60 (constant (vidioc-g-ext-ctrls "VIDIOC_G_EXT_CTRLS"))
61 (constant (vidioc-s-ext-ctrls "VIDIOC_S_EXT_CTRLS"))
62 (constant (vidioc-try-ext-ctrls "VIDIOC_TRY_EXT_CTRLS"))
63 (constant (vidioc-enum-framesizes "VIDIOC_ENUM_FRAMESIZES"))
64 (constant (vidioc-enum-frameintervals "VIDIOC_ENUM_FRAMEINTERVALS"))
65 (constant (vidioc-g-enc-index "VIDIOC_G_ENC_INDEX"))
66 (constant (vidioc-encoder-cmd "VIDIOC_ENCODER_CMD"))
67 (constant (vidioc-try-encoder-cmd "VIDIOC_TRY_ENCODER_CMD"))
69 ;; capabilities
71 (constant (cap-video-capture "V4L2_CAP_VIDEO_CAPTURE")
72 :documentation "Is a video capture device")
74 (constant (cap-video-output "V4L2_CAP_VIDEO_OUTPUT")
75 :documentation "Is a video output device")
77 (constant (cap-video-overlay "V4L2_CAP_VIDEO_OVERLAY")
78 :documentation "Can do video overlay")
80 (constant (cap-vbi-capture "V4L2_CAP_VBI_CAPTURE")
81 :documentation "Is a raw VBI capture device")
83 (constant (cap-vbi-output "V4L2_CAP_VBI_OUTPUT")
84 :documentation "Is a raw VBI output device")
86 (constant (cap-sliced-vbi-capture "V4L2_CAP_SLICED_VBI_CAPTURE")
87 :documentation "Is a sliced VBI capture device")
89 (constant (cap-sliced-vbi-output "V4L2_CAP_SLICED_VBI_OUTPUT")
90 :documentation "Is a sliced VBI output device")
92 (constant (cap-rds-capture "V4L2_CAP_RDS_CAPTURE")
93 :documentation "RDS data capture")
95 (constant (cap-video-output-overlay "V4L2_CAP_VIDEO_OUTPUT_OVERLAY")
96 :documentation "Can do video output overlay")
98 (constant (cap-hw-freq-seek "V4L2_CAP_HW_FREQ_SEEK")
99 :documentation "Can do hardware frequency seek")
101 (constant (cap-tuner "V4L2_CAP_TUNER")
102 :documentation "has a tuner")
104 (constant (cap-audio "V4L2_CAP_AUDIO")
105 :documentation "has audio support")
107 (constant (cap-radio "V4L2_CAP_RADIO")
108 :documentation "is a radio device")
110 (constant (cap-readwrite "V4L2_CAP_READWRITE")
111 :documentation "read/write systemcalls")
113 (constant (cap-asyncio "V4L2_CAP_ASYNCIO")
114 :documentation "async I/O")
116 (constant (cap-streaming "V4L2_CAP_STREAMING")
117 :documentation "streaming I/O ioctls")
119 ;; Pixel formats
121 (constant (pix-fmt-rgb332 "V4L2_PIX_FMT_RGB332")
122 :documentation "RGB1 8 RGB-3-3-2")
123 (constant (pix-fmt-rgb444 "V4L2_PIX_FMT_RGB444")
124 :documentation "R444 16 xxxxrrrr ggggbbbb")
125 (constant (pix-fmt-rgb555 "V4L2_PIX_FMT_RGB555")
126 :documentation "RGBO 16 RGB-5-5-5")
127 (constant (pix-fmt-rgb565 "V4L2_PIX_FMT_RGB565")
128 :documentation "RGBP 16 RGB-5-6-5")
129 (constant (pix-fmt-rgb555x "V4L2_PIX_FMT_RGB555X")
130 :documentation "RGBQ 16 RGB-5-5-5 BE")
131 (constant (pix-fmt-rgb565x "V4L2_PIX_FMT_RGB565X")
132 :documentation "RGBR 16 RGB-5-6-5 BE")
133 (constant (pix-fmt-bgr24 "V4L2_PIX_FMT_BGR24")
134 :documentation "BGR3 24 BGR-8-8-8")
135 (constant (pix-fmt-rgb24 "V4L2_PIX_FMT_RGB24")
136 :documentation "RGB3 24 RGB-8-8-8")
137 (constant (pix-fmt-bgr32 "V4L2_PIX_FMT_BGR32")
138 :documentation "BGR4 32 BGR-8-8-8-8")
139 (constant (pix-fmt-rgb32 "V4L2_PIX_FMT_RGB32")
140 :documentation "RGB4 32 RGB-8-8-8-8")
141 (constant (pix-fmt-grey "V4L2_PIX_FMT_GREY")
142 :documentation "GREY 8 Greyscale")
143 (constant (pix-fmt-y16 "V4L2_PIX_FMT_Y16")
144 :documentation "Y16 16 Greyscale")
145 (constant (pix-fmt-pal8 "V4L2_PIX_FMT_PAL8")
146 :documentation "PAL8 8 8-bit palette")
147 (constant (pix-fmt-yvu410 "V4L2_PIX_FMT_YVU410")
148 :documentation "YVU9 9 YVU 4:1:0")
149 (constant (pix-fmt-yvu420 "V4L2_PIX_FMT_YVU420")
150 :documentation "YV12 12 YVU 4:2:0")
151 (constant (pix-fmt-yuyv "V4L2_PIX_FMT_YUYV")
152 :documentation "YUYV 16 YUV 4:2:2")
153 (constant (pix-fmt-uyvy "V4L2_PIX_FMT_UYVY")
154 :documentation "UYVY 16 YUV 4:2:2")
155 (constant (pix-fmt-vyuy "V4L2_PIX_FMT_VYUY")
156 :documentation "VYUY 16 YUV 4:2:2")
157 (constant (pix-fmt-yuv422p "V4L2_PIX_FMT_YUV422P")
158 :documentation "422P 16 YVU422 planar")
159 (constant (pix-fmt-yuv411p "V4L2_PIX_FMT_YUV411P")
160 :documentation "411P 16 YVU411 planar")
161 (constant (pix-fmt-y41p "V4L2_PIX_FMT_Y41P")
162 :documentation "Y41P 12 YUV 4:1:1")
163 (constant (pix-fmt-yuv444 "V4L2_PIX_FMT_YUV444")
164 :documentation "Y444 16 xxxxyyyy uuuuvvvv")
165 (constant (pix-fmt-yuv555 "V4L2_PIX_FMT_YUV555")
166 :documentation "YUVO 16 YUV-5-5-5")
167 (constant (pix-fmt-yuv565 "V4L2_PIX_FMT_YUV565")
168 :documentation "YUVP 16 YUV-5-6-5")
169 (constant (pix-fmt-yuv32 "V4L2_PIX_FMT_YUV32")
170 :documentation "YUV4 32 YUV-8-8-8-8")
172 ;; two planes -- one Y, one Cr + Cb interleaved
173 (constant (pix-fmt-nv12 "V4L2_PIX_FMT_NV12")
174 :documentation "NV12 12 Y/CbCr 4:2:0")
175 (constant (pix-fmt-nv21 "V4L2_PIX_FMT_NV21")
176 :documentation "NV21 12 Y/CrCb 4:2:0")
177 (constant (pix-fmt-nv16 "V4L2_PIX_FMT_NV16")
178 :documentation "NV16 16 Y/CbCr 4:2:2")
179 (constant (pix-fmt-nv61 "V4L2_PIX_FMT_NV61")
180 :documentation "NV61 16 Y/CrCb 4:2:2")
182 ;; The following formats are not defined in the V4L2 specification
183 (constant (pix-fmt-yuv410 "V4L2_PIX_FMT_YUV410")
184 :documentation "YUV9 9 YUV 4:1:0")
185 (constant (pix-fmt-yuv420 "V4L2_PIX_FMT_YUV420")
186 :documentation "YU12 12 YUV 4:2:0")
187 (constant (pix-fmt-yyuv "V4L2_PIX_FMT_YYUV")
188 :documentation "YYUV 16 YUV 4:2:2")
189 (constant (pix-fmt-hi240 "V4L2_PIX_FMT_HI240")
190 :documentation "HI24 8 8-bit color")
191 (constant (pix-fmt-hm12 "V4L2_PIX_FMT_HM12")
192 :documentation "HM12 8 YUV 4:2:0 16x16 macroblocks")
194 ;; see http://www.siliconimaging.com/RGB%20Bayer.htm
195 (constant (pix-fmt-sbggr8 "V4L2_PIX_FMT_SBGGR8")
196 :documentation "BA81 8 BGBG.. GRGR")
197 (constant (pix-fmt-sgbrg8 "V4L2_PIX_FMT_SGBRG8")
198 :documentation "GBRG 8 GBGB.. RGRG")
200 ;; 10bit raw bayer, expanded to 16 bits
201 ;; xxxxrrrrrrrrrrxxxxgggggggggg xxxxggggggggggxxxxbbbbbbbbbb...
203 (constant (pix-fmt-sgrbg10 "V4L2_PIX_FMT_SGRBG10")
204 :documentation "BA10")
206 ;; 10bit raw bayer DPCM compressed to 8 bits */
207 (constant (pix-fmt-sgrbg10dpcm8 "V4L2_PIX_FMT_SGRBG10DPCM8")
208 :documentation "BD10")
209 (constant (pix-fmt-sbggr16 "V4L2_PIX_FMT_SBGGR16")
210 :documentation "BYR2 16 BGBG.. GRGR..")
212 ;; compressed formats
213 (constant (pix-fmt-mjpeg "V4L2_PIX_FMT_MJPEG")
214 :documentation "MJPG Motion-JPEG")
215 (constant (pix-fmt-jpeg "V4L2_PIX_FMT_JPEG")
216 :documentation "JPEG JFIF JPEG")
217 (constant (pix-fmt-dv "V4L2_PIX_FMT_DV")
218 :documentation "dvsd 1394")
219 (constant (pix-fmt-mpeg "V4L2_PIX_FMT_MPEG")
220 :documentation "MPEG MPEG-1/2/4")
222 ;; Vendor-specific formats
224 (constant (pix-fmt-wnva "V4L2_PIX_FMT_WNVA")
225 :documentation "WNVA Winnov hw compress")
226 (constant (pix-fmt-sn9c10x "V4L2_PIX_FMT_SN9C10X")
227 :documentation "S910 SN9C10x compression")
228 (constant (pix-fmt-pwc1 "V4L2_PIX_FMT_PWC1")
229 :documentation "PWC1 pwc older webcam")
230 (constant (pix-fmt-pwc2 "V4L2_PIX_FMT_PWC2")
231 :documentation "PWC2 pwc newer webcam")
232 (constant (pix-fmt-et61x251 "V4L2_PIX_FMT_ET61X251")
233 :documentation "E625 ET61X251 compression")
234 (constant (pix-fmt-spca501 "V4L2_PIX_FMT_SPCA501")
235 :documentation "S501 YUYV per line")
236 (constant (pix-fmt-spca505 "V4L2_PIX_FMT_SPCA505")
237 :documentation "S505 YYUV per line")
238 (constant (pix-fmt-spca508 "V4L2_PIX_FMT_SPCA508")
239 :documentation "S508 YUVY per line")
240 (constant (pix-fmt-spca561 "V4L2_PIX_FMT_SPCA561")
241 :documentation "S561 compressed GBRG bayer")
242 (constant (pix-fmt-pac207 "V4L2_PIX_FMT_PAC207")
243 :documentation "P207 compressed BGGR bayer")
244 (constant (pix-fmt-mr97310a "V4L2_PIX_FMT_MR97310A")
245 :documentation "M310 compressed BGGR bayer")
246 (constant (pix-fmt-sq905c "V4L2_PIX_FMT_SQ905C")
247 :documentation "905C compressed RGGB bayer")
248 (constant (pix-fmt-pjpg "V4L2_PIX_FMT_PJPG")
249 :documentation "PJPG Pixart 73xx JPEG")
250 (constant (pix-fmt-yvyu "V4L2_PIX_FMT_YVYU")
251 :documentation "YVYU 16 YVU 4:2:2")
253 ;; Flags for v4l2-buffer 'flags' field
254 (constant (buf-flag-mapped "V4L2_BUF_FLAG_MAPPED")
255 :documentation "Buffer is mapped (flag)")
257 (constant (buf-flag-queued "V4L2_BUF_FLAG_QUEUED")
258 :documentation "Buffer is queued for processing")
260 (constant (buf-flag-done "V4L2_BUF_FLAG_DONE")
261 :documentation "Buffer is ready")
263 (constant (buf-flag-keyframe "V4L2_BUF_FLAG_KEYFRAME")
264 :documentation "Image is a keyframe (I-frame)")
266 (constant (buf-flag-pframe "V4L2_BUF_FLAG_PFRAME")
267 :documentation "Image is a P-frame")
269 (constant (buf-flag-bframe "V4L2_BUF_FLAG_BFRAME")
270 :documentation "Image is a B-frame")
272 (constant (buf-flag-timecode "V4L2_BUF_FLAG_TIMECODE")
273 :documentation "timecode field is valid")
275 (constant (buf-flag-input "V4L2_BUF_FLAG_INPUT")
276 :documentation "input field is valid")
278 ;; Control IDs
279 (constant (cid-brightness "V4L2_CID_BRIGHTNESS"))
280 (constant (cid-contrast "V4L2_CID_CONTRAST"))
281 (constant (cid-saturation "V4L2_CID_SATURATION"))
282 (constant (cid-hue "V4L2_CID_HUE"))
283 (constant (cid-audio-volume "V4L2_CID_AUDIO_VOLUME"))
284 (constant (cid-audio-balance "V4L2_CID_AUDIO_BALANCE"))
285 (constant (cid-audio-bass "V4L2_CID_AUDIO_BASS"))
286 (constant (cid-audio-treble "V4L2_CID_AUDIO_TREBLE"))
287 (constant (cid-audio-mute "V4L2_CID_AUDIO_MUTE"))
288 (constant (cid-audio-loudness "V4L2_CID_AUDIO_LOUDNESS"))
289 (constant (cid-black-level "V4L2_CID_BLACK_LEVEL"))
290 (constant (cid-auto-white-balance "V4L2_CID_AUTO_WHITE_BALANCE"))
291 (constant (cid-do-white-balance "V4L2_CID_DO_WHITE_BALANCE"))
292 (constant (cid-red-balance "V4L2_CID_RED_BALANCE"))
293 (constant (cid-blue-balance "V4L2_CID_BLUE_BALANCE"))
294 (constant (cid-gamma "V4L2_CID_GAMMA"))
295 (constant (cid-whiteness "V4L2_CID_WHITENESS"))
296 (constant (cid-exposure "V4L2_CID_EXPOSURE"))
297 (constant (cid-autogain "V4L2_CID_AUTOGAIN"))
298 (constant (cid-gain "V4L2_CID_GAIN"))
299 (constant (cid-hflip "V4L2_CID_HFLIP"))
300 (constant (cid-vflip "V4L2_CID_VFLIP"))
302 ;; Deprecated; use V4L2_CID_PAN_RESET and V4L2_CID_TILT_RESET
303 (constant (cid-hcenter "V4L2_CID_HCENTER"))
304 (constant (cid-vcenter "V4L2_CID_VCENTER"))
306 (constant (cid-power-line-frequency "V4L2_CID_POWER_LINE_FREQUENCY"))
307 (constant (cid-hue-auto "V4L2_CID_HUE_AUTO"))
308 (constant (cid-white-balance-temperature "V4L2_CID_WHITE_BALANCE_TEMPERATURE"))
309 (constant (cid-sharpness "V4L2_CID_SHARPNESS"))
310 (constant (cid-backlight-compensation "V4L2_CID_BACKLIGHT_COMPENSATION"))
311 (constant (cid-chroma-agc "V4L2_CID_CHROMA_AGC"))
312 (constant (cid-color-killer "V4L2_CID_COLOR_KILLER"))
313 (constant (cid-colorfx "V4L2_CID_COLORFX"))
314 (constant (cid-exposure-auto "V4L2_CID_EXPOSURE_AUTO"))
315 (constant (cid-exposure-absolute "V4L2_CID_EXPOSURE_ABSOLUTE"))
316 (constant (cid-exposure-auto-priority "V4L2_CID_EXPOSURE_AUTO_PRIORITY"))
318 (constant (cid-pan-relative "V4L2_CID_PAN_RELATIVE"))
319 (constant (cid-tilt-relative "V4L2_CID_TILT_RELATIVE"))
320 (constant (cid-pan-reset "V4L2_CID_PAN_RESET"))
321 (constant (cid-tilt-reset "V4L2_CID_TILT_RESET"))
323 (constant (cid-pan-absolute "V4L2_CID_PAN_ABSOLUTE"))
324 (constant (cid-tilt-absolute "V4L2_CID_TILT_ABSOLUTE"))
326 (constant (cid-focus-absolute "V4L2_CID_FOCUS_ABSOLUTE"))
327 (constant (cid-focus-relative "V4L2_CID_FOCUS_RELATIVE"))
328 (constant (cid-focus-auto "V4L2_CID_FOCUS_AUTO"))
330 (constant (cid-zoom-absolute "V4L2_CID_ZOOM_ABSOLUTE"))
331 (constant (cid-zoom-relative "V4L2_CID_ZOOM_RELATIVE"))
332 (constant (cid-zoom-continuous "V4L2_CID_ZOOM_CONTINUOUS"))
334 (constant (cid-privacy "V4L2_CID_PRIVACY"))