Here be dragons
[cl-v4l2.git] / videodev2.lisp
blobbd45567dfb123b5098b204a3b12d73d0f70d3046
1 (in-package :cl-v4l2)
3 (defcstruct v4l2-capability
4 (driver :uchar :count 16)
5 (card :uchar :count 32)
6 (bus-info :uchar :count 32)
7 (version :uint32)
8 (capabilities :uint32)
9 (reserved :uint32 :count 4))
11 (defcstruct v4l2-fract
12 (numerator :uint32)
13 (denominator :uint32))
15 (defcstruct v4l2-captureparm
16 (capability :uint32) ; Supported modes
17 (capturemode :uint32) ; Current mode
18 (timeperframe v4l2-fract) ; Time per frame in .1us units
19 (extendedmode :uint32) ; Driver-specific extensions
20 (readbuffers :uint32) ; # of buffers for read
21 (reserved :uint32 :count 4))
23 (defcstruct v4l2-outputparm
24 (capability :uint32) ; Supported modes
25 (outputmode :uint32) ; Current mode
26 (timeperframe v4l2-fract) ; Time per frame in .1us units
27 (extendedmode :uint32) ; Driver-specific extensions
28 (writebuffers :uint32) ; # of buffers for write
29 (reserved :uint32 :count 4))
31 (defcunion v4l2-streamparm-union
32 (capture v4l2-captureparm)
33 (output v4l2-outputparm)
34 (raw-data :uchar :count 200))
36 (defcenum v4l2-buf-type
37 (:buf-type-video-capture 1)
38 :buf-type-video-output
39 :buf-type-video-overlay
40 :buf-type-vbi-capture
41 :buf-type-vbi-output
42 :buf-type-sliced-vbi-capture
43 :buf-type-sliced-vbi-output
44 :buf-type-video-output-overlay)
46 (defcstruct v4l2-streamparm
47 (type v4l2-buf-type)
48 (parm v4l2-streamparm-union))
50 (defcenum v4l2-tuner-type
51 (:tuner-radio 1)
52 :tuner-analog-tv
53 :tuner-digital-tv)
55 (defcstruct v4l2-tuner
56 (index :uint32)
57 (name :uchar :count 32)
58 (type v4l2-tuner-type)
59 (capability :uint32)
60 (rangelow :uint32)
61 (rangehigh :uint32)
62 (rxsubchans :uint32)
63 (audmode :uint32)
64 (signal :int32)
65 (afc :int32)
66 (reserved :uint32 :count 4))
68 (defcstruct v4l2-standard
69 (index :uint32)
70 (id :uint64)
71 (name :uchar :count 24)
72 (frameperiod v4l2-fract)
73 (framelines :uint32)
74 (reserved :uint32 :count 4))
76 (defcstruct v4l2-input
77 (index :uint32) ; Which input
78 (name :uchar :count 32) ; Label
79 (type :uint32) ; Type of input
80 (audioset :uint32) ; Associated audios (bitfield)
81 (tuner :uint32) ; Associated tuner
82 (std :uint64)
83 (status :uint32)
84 (reserved :uint32 :count 4))
87 ;; F O R M A T E N U M E R A T I O N
89 (defcstruct v4l2-fmtdesc
90 (index :uint32) ; Format number
91 (type v4l2-buf-type) ; buffer type
92 (flags :uint32)
93 (description :uchar :count 32) ; Description string
94 (pixelformat :uint32) ; Format fourcc
95 (reserved :uint32 :count 4))
97 ;; Values for the 'type' field
98 (defconstant v4l2-input-type-tuner 1)
100 (defconstant v4l2-input-type-camera 2)