annotate videodev.h @ 565:6e747808386e

changed behavior or -idx/-noidx
author arpi_esp
date Sat, 21 Apr 2001 20:45:17 +0000
parents 3b5f5d1c5041
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1 #ifndef __LINUX_VIDEODEV_H
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2 #define __LINUX_VIDEODEV_H
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
3
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
4 #include <linux/types.h>
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
5
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
6 #ifdef __KERNEL__
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
7
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
8 #if LINUX_VERSION_CODE >= 0x020100
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
9 #include <linux/poll.h>
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
10 #endif
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
11
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
12 struct video_device
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
13 {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
14 char name[32];
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
15 int type;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
16 int hardware;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
17
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
18 int (*open)(struct video_device *, int mode);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
19 void (*close)(struct video_device *);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
20 long (*read)(struct video_device *, char *, unsigned long, int noblock);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
21 /* Do we need a write method ? */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
22 long (*write)(struct video_device *, const char *, unsigned long, int noblock);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
23 #if LINUX_VERSION_CODE >= 0x020100
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
24 unsigned int (*poll)(struct video_device *, struct file *, poll_table *);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
25 #endif
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
26 int (*ioctl)(struct video_device *, unsigned int , void *);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
27 int (*mmap)(struct video_device *, const char *, unsigned long);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
28 int (*initialize)(struct video_device *);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
29 void *priv; /* Used to be 'private' but that upsets C++ */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
30 int busy;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
31 int minor;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
32 };
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
33
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
34 extern int videodev_init(void);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
35 #define VIDEO_MAJOR 81
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
36 extern int video_register_device(struct video_device *, int type);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
37
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
38 #define VFL_TYPE_GRABBER 0
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
39 #define VFL_TYPE_VBI 1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
40 #define VFL_TYPE_RADIO 2
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
41 #define VFL_TYPE_VTX 3
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
42
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
43 extern void video_unregister_device(struct video_device *);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
44 #endif
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
45
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
46
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
47 #define VID_TYPE_CAPTURE 1 /* Can capture */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
48 #define VID_TYPE_TUNER 2 /* Can tune */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
49 #define VID_TYPE_TELETEXT 4 /* Does teletext */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
50 #define VID_TYPE_OVERLAY 8 /* Overlay onto frame buffer */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
51 #define VID_TYPE_CHROMAKEY 16 /* Overlay by chromakey */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
52 #define VID_TYPE_CLIPPING 32 /* Can clip */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
53 #define VID_TYPE_FRAMERAM 64 /* Uses the frame buffer memory */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
54 #define VID_TYPE_SCALES 128 /* Scalable */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
55 #define VID_TYPE_MONOCHROME 256 /* Monochrome only */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
56 #define VID_TYPE_SUBCAPTURE 512 /* Can capture subareas of the image */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
57
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
58 struct video_capability
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
59 {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
60 char name[32];
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
61 int type;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
62 int channels; /* Num channels */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
63 int audios; /* Num audio devices */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
64 int maxwidth; /* Supported width */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
65 int maxheight; /* And height */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
66 int minwidth; /* Supported width */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
67 int minheight; /* And height */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
68 };
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
69
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
70
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
71 struct video_channel
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
72 {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
73 int channel;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
74 char name[32];
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
75 int tuners;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
76 __u32 flags;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
77 #define VIDEO_VC_TUNER 1 /* Channel has a tuner */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
78 #define VIDEO_VC_AUDIO 2 /* Channel has audio */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
79 __u16 type;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
80 #define VIDEO_TYPE_TV 1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
81 #define VIDEO_TYPE_CAMERA 2
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
82 __u16 norm; /* Norm set by channel */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
83 };
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
84
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
85 struct video_tuner
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
86 {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
87 int tuner;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
88 char name[32];
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
89 ulong rangelow, rangehigh; /* Tuner range */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
90 __u32 flags;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
91 #define VIDEO_TUNER_PAL 1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
92 #define VIDEO_TUNER_NTSC 2
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
93 #define VIDEO_TUNER_SECAM 4
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
94 #define VIDEO_TUNER_LOW 8 /* Uses KHz not MHz */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
95 #define VIDEO_TUNER_NORM 16 /* Tuner can set norm */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
96 #define VIDEO_TUNER_STEREO_ON 128 /* Tuner is seeing stereo */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
97 __u16 mode; /* PAL/NTSC/SECAM/OTHER */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
98 #define VIDEO_MODE_PAL 0
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
99 #define VIDEO_MODE_NTSC 1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
100 #define VIDEO_MODE_SECAM 2
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
101 #define VIDEO_MODE_AUTO 3
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
102 __u16 signal; /* Signal strength 16bit scale */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
103 };
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
104
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
105 struct video_picture
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
106 {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
107 __u16 brightness;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
108 __u16 hue;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
109 __u16 colour;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
110 __u16 contrast;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
111 __u16 whiteness; /* Black and white only */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
112 __u16 depth; /* Capture depth */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
113 __u16 palette; /* Palette in use */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
114 #define VIDEO_PALETTE_GREY 1 /* Linear greyscale */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
115 #define VIDEO_PALETTE_HI240 2 /* High 240 cube (BT848) */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
116 #define VIDEO_PALETTE_RGB565 3 /* 565 16 bit RGB */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
117 #define VIDEO_PALETTE_RGB24 4 /* 24bit RGB */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
118 #define VIDEO_PALETTE_RGB32 5 /* 32bit RGB */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
119 #define VIDEO_PALETTE_RGB555 6 /* 555 15bit RGB */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
120 #define VIDEO_PALETTE_YUV422 7 /* YUV422 capture */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
121 #define VIDEO_PALETTE_YUYV 8
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
122 #define VIDEO_PALETTE_UYVY 9 /* The great thing about standards is ... */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
123 #define VIDEO_PALETTE_YUV420 10
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
124 #define VIDEO_PALETTE_YUV411 11 /* YUV411 capture */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
125 #define VIDEO_PALETTE_RAW 12 /* RAW capture (BT848) */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
126 #define VIDEO_PALETTE_YUV422P 13 /* YUV 4:2:2 Planar */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
127 #define VIDEO_PALETTE_YUV411P 14 /* YUV 4:1:1 Planar */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
128 #define VIDEO_PALETTE_YUV420P 15 /* YUV 4:2:0 Planar */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
129 #define VIDEO_PALETTE_YUV410P 16 /* YUV 4:1:0 Planar */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
130 #define VIDEO_PALETTE_PLANAR 13 /* start of planar entries */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
131 #define VIDEO_PALETTE_COMPONENT 7 /* start of component entries */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
132 };
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
133
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
134 struct video_audio
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
135 {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
136 int audio; /* Audio channel */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
137 __u16 volume; /* If settable */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
138 __u16 bass, treble;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
139 __u32 flags;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
140 #define VIDEO_AUDIO_MUTE 1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
141 #define VIDEO_AUDIO_MUTABLE 2
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
142 #define VIDEO_AUDIO_VOLUME 4
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
143 #define VIDEO_AUDIO_BASS 8
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
144 #define VIDEO_AUDIO_TREBLE 16
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
145 char name[16];
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
146 #define VIDEO_SOUND_MONO 1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
147 #define VIDEO_SOUND_STEREO 2
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
148 #define VIDEO_SOUND_LANG1 4
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
149 #define VIDEO_SOUND_LANG2 8
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
150 __u16 mode; /* detected audio carriers or one to set */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
151 __u16 balance; /* Stereo balance */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
152 __u16 step; /* Step actual volume uses */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
153 };
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
154
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
155 struct video_clip
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
156 {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
157 __s32 x,y;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
158 __s32 width, height;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
159 struct video_clip *next; /* For user use/driver use only */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
160 };
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
161
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
162 struct video_window
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
163 {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
164 __u32 x,y; /* Position of window */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
165 __u32 width,height; /* Its size */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
166 __u32 chromakey;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
167 __u32 flags;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
168 struct video_clip *clips; /* Set only */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
169 int clipcount;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
170 #define VIDEO_WINDOW_INTERLACE 1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
171 #define VIDEO_CLIP_BITMAP -1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
172 /* bitmap is 1024x625, a '1' bit represents a clipped pixel */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
173 #define VIDEO_CLIPMAP_SIZE (128 * 625)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
174 };
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
175
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
176 struct video_capture
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
177 {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
178 __u32 x,y; /* Offsets into image */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
179 __u32 width, height; /* Area to capture */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
180 __u16 decimation; /* Decimation divder */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
181 __u16 flags; /* Flags for capture */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
182 #define VIDEO_CAPTURE_ODD 0 /* Temporal */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
183 #define VIDEO_CAPTURE_EVEN 1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
184 };
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
185
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
186 struct video_buffer
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
187 {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
188 void *base;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
189 int height,width;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
190 int depth;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
191 int bytesperline;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
192 };
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
193
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
194 struct video_mmap
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
195 {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
196 unsigned int frame; /* Frame (0 - n) for double buffer */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
197 int height,width;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
198 unsigned int format; /* should be VIDEO_PALETTE_* */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
199 };
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
200
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
201 struct video_key
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
202 {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
203 __u8 key[8];
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
204 __u32 flags;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
205 };
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
206
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
207
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
208 #define VIDEO_MAX_FRAME 32
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
209
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
210 struct video_mbuf
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
211 {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
212 int size; /* Total memory to map */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
213 int frames; /* Frames */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
214 int offsets[VIDEO_MAX_FRAME];
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
215 };
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
216
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
217
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
218 #define VIDEO_NO_UNIT (-1)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
219
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
220
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
221 struct video_unit
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
222 {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
223 int video; /* Video minor */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
224 int vbi; /* VBI minor */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
225 int radio; /* Radio minor */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
226 int audio; /* Audio minor */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
227 int teletext; /* Teletext minor */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
228 };
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
229
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
230 #define VIDIOCGCAP _IOR('v',1,struct video_capability) /* Get capabilities */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
231 #define VIDIOCGCHAN _IOWR('v',2,struct video_channel) /* Get channel info (sources) */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
232 #define VIDIOCSCHAN _IOW('v',3,struct video_channel) /* Set channel */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
233 #define VIDIOCGTUNER _IOWR('v',4,struct video_tuner) /* Get tuner abilities */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
234 #define VIDIOCSTUNER _IOW('v',5,struct video_tuner) /* Tune the tuner for the current channel */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
235 #define VIDIOCGPICT _IOR('v',6,struct video_picture) /* Get picture properties */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
236 #define VIDIOCSPICT _IOW('v',7,struct video_picture) /* Set picture properties */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
237 #define VIDIOCCAPTURE _IOW('v',8,int) /* Start, end capture */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
238 #define VIDIOCGWIN _IOR('v',9, struct video_window) /* Set the video overlay window */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
239 #define VIDIOCSWIN _IOW('v',10, struct video_window) /* Set the video overlay window - passes clip list for hardware smarts , chromakey etc */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
240 #define VIDIOCGFBUF _IOR('v',11, struct video_buffer) /* Get frame buffer */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
241 #define VIDIOCSFBUF _IOW('v',12, struct video_buffer) /* Set frame buffer - root only */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
242 #define VIDIOCKEY _IOR('v',13, struct video_key) /* Video key event - to dev 255 is to all - cuts capture on all DMA windows with this key (0xFFFFFFFF == all) */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
243 #define VIDIOCGFREQ _IOR('v',14, unsigned long) /* Set tuner */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
244 #define VIDIOCSFREQ _IOW('v',15, unsigned long) /* Set tuner */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
245 #define VIDIOCGAUDIO _IOR('v',16, struct video_audio) /* Get audio info */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
246 #define VIDIOCSAUDIO _IOW('v',17, struct video_audio) /* Audio source, mute etc */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
247 #define VIDIOCSYNC _IOW('v',18, int) /* Sync with mmap grabbing */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
248 #define VIDIOCMCAPTURE _IOW('v',19, struct video_mmap) /* Grab frames */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
249 #define VIDIOCGMBUF _IOR('v', 20, struct video_mbuf) /* Memory map buffer info */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
250 #define VIDIOCGUNIT _IOR('v', 21, struct video_unit) /* Get attached units */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
251 #define VIDIOCGCAPTURE _IOR('v',22, struct video_capture) /* Get frame buffer */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
252 #define VIDIOCSCAPTURE _IOW('v',23, struct video_capture) /* Set frame buffer - root only */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
253
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
254 #define BASE_VIDIOCPRIVATE 192 /* 192-255 are private */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
255
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
256
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
257 #define VID_HARDWARE_BT848 1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
258 #define VID_HARDWARE_QCAM_BW 2
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
259 #define VID_HARDWARE_PMS 3
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
260 #define VID_HARDWARE_QCAM_C 4
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
261 #define VID_HARDWARE_PSEUDO 5
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
262 #define VID_HARDWARE_SAA5249 6
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
263 #define VID_HARDWARE_AZTECH 7
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
264 #define VID_HARDWARE_SF16MI 8
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
265 #define VID_HARDWARE_RTRACK 9
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
266 #define VID_HARDWARE_ZOLTRIX 10
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
267 #define VID_HARDWARE_SAA7146 11
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
268 #define VID_HARDWARE_VIDEUM 12 /* Reserved for Winnov videum */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
269 #define VID_HARDWARE_RTRACK2 13
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
270 #define VID_HARDWARE_PERMEDIA2 14 /* Reserved for Permedia2 */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
271 #define VID_HARDWARE_RIVA128 15 /* Reserved for RIVA 128 */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
272
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
273 /*
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
274 * Initialiser list
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
275 */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
276
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
277 struct video_init
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
278 {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
279 char *name;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
280 int (*init)(struct video_init *);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
281 };
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
282
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
283 #endif