The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 1 | /**************************************************************************** |
| 2 | **************************************************************************** |
| 3 | *** |
| 4 | *** This header was automatically generated from a Linux kernel header |
| 5 | *** of the same name, to make information necessary for userspace to |
| 6 | *** call into the kernel available to libc. It contains only constants, |
| 7 | *** structures, and macros generated from the original header, and thus, |
| 8 | *** contains no copyrightable information. |
| 9 | *** |
| 10 | **************************************************************************** |
| 11 | ****************************************************************************/ |
| 12 | #ifndef __LINUX_VIDEODEV_H |
| 13 | #define __LINUX_VIDEODEV_H |
| 14 | |
Rebecca Schultz Zavin | 0913148 | 2009-07-16 18:33:52 -0700 | [diff] [blame^] | 15 | #include <linux/types.h> |
| 16 | #include <linux/ioctl.h> |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 17 | #include <linux/videodev2.h> |
| 18 | |
Rebecca Schultz Zavin | 0913148 | 2009-07-16 18:33:52 -0700 | [diff] [blame^] | 19 | #define VID_TYPE_CAPTURE 1 |
| 20 | #define VID_TYPE_TUNER 2 |
| 21 | #define VID_TYPE_TELETEXT 4 |
| 22 | #define VID_TYPE_OVERLAY 8 |
| 23 | #define VID_TYPE_CHROMAKEY 16 |
| 24 | #define VID_TYPE_CLIPPING 32 |
| 25 | #define VID_TYPE_FRAMERAM 64 |
| 26 | #define VID_TYPE_SCALES 128 |
| 27 | #define VID_TYPE_MONOCHROME 256 |
| 28 | #define VID_TYPE_SUBCAPTURE 512 |
| 29 | #define VID_TYPE_MPEG_DECODER 1024 |
| 30 | #define VID_TYPE_MPEG_ENCODER 2048 |
| 31 | #define VID_TYPE_MJPEG_DECODER 4096 |
| 32 | #define VID_TYPE_MJPEG_ENCODER 8192 |
| 33 | |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 34 | struct video_capability |
| 35 | { |
| 36 | char name[32]; |
| 37 | int type; |
| 38 | int channels; |
| 39 | int audios; |
| 40 | int maxwidth; |
| 41 | int maxheight; |
| 42 | int minwidth; |
| 43 | int minheight; |
| 44 | }; |
| 45 | |
| 46 | struct video_channel |
| 47 | { |
| 48 | int channel; |
| 49 | char name[32]; |
| 50 | int tuners; |
| 51 | __u32 flags; |
| 52 | #define VIDEO_VC_TUNER 1 |
| 53 | #define VIDEO_VC_AUDIO 2 |
| 54 | __u16 type; |
| 55 | #define VIDEO_TYPE_TV 1 |
| 56 | #define VIDEO_TYPE_CAMERA 2 |
| 57 | __u16 norm; |
| 58 | }; |
| 59 | |
| 60 | struct video_tuner |
| 61 | { |
| 62 | int tuner; |
| 63 | char name[32]; |
| 64 | unsigned long rangelow, rangehigh; |
| 65 | __u32 flags; |
| 66 | #define VIDEO_TUNER_PAL 1 |
| 67 | #define VIDEO_TUNER_NTSC 2 |
| 68 | #define VIDEO_TUNER_SECAM 4 |
| 69 | #define VIDEO_TUNER_LOW 8 |
| 70 | #define VIDEO_TUNER_NORM 16 |
| 71 | #define VIDEO_TUNER_STEREO_ON 128 |
| 72 | #define VIDEO_TUNER_RDS_ON 256 |
| 73 | #define VIDEO_TUNER_MBS_ON 512 |
| 74 | __u16 mode; |
| 75 | #define VIDEO_MODE_PAL 0 |
| 76 | #define VIDEO_MODE_NTSC 1 |
| 77 | #define VIDEO_MODE_SECAM 2 |
| 78 | #define VIDEO_MODE_AUTO 3 |
| 79 | __u16 signal; |
| 80 | }; |
| 81 | |
| 82 | struct video_picture |
| 83 | { |
| 84 | __u16 brightness; |
| 85 | __u16 hue; |
| 86 | __u16 colour; |
| 87 | __u16 contrast; |
| 88 | __u16 whiteness; |
| 89 | __u16 depth; |
| 90 | __u16 palette; |
| 91 | #define VIDEO_PALETTE_GREY 1 |
| 92 | #define VIDEO_PALETTE_HI240 2 |
| 93 | #define VIDEO_PALETTE_RGB565 3 |
| 94 | #define VIDEO_PALETTE_RGB24 4 |
| 95 | #define VIDEO_PALETTE_RGB32 5 |
| 96 | #define VIDEO_PALETTE_RGB555 6 |
| 97 | #define VIDEO_PALETTE_YUV422 7 |
| 98 | #define VIDEO_PALETTE_YUYV 8 |
| 99 | #define VIDEO_PALETTE_UYVY 9 |
| 100 | #define VIDEO_PALETTE_YUV420 10 |
| 101 | #define VIDEO_PALETTE_YUV411 11 |
| 102 | #define VIDEO_PALETTE_RAW 12 |
| 103 | #define VIDEO_PALETTE_YUV422P 13 |
| 104 | #define VIDEO_PALETTE_YUV411P 14 |
| 105 | #define VIDEO_PALETTE_YUV420P 15 |
| 106 | #define VIDEO_PALETTE_YUV410P 16 |
| 107 | #define VIDEO_PALETTE_PLANAR 13 |
| 108 | #define VIDEO_PALETTE_COMPONENT 7 |
| 109 | }; |
| 110 | |
| 111 | struct video_audio |
| 112 | { |
| 113 | int audio; |
| 114 | __u16 volume; |
| 115 | __u16 bass, treble; |
| 116 | __u32 flags; |
| 117 | #define VIDEO_AUDIO_MUTE 1 |
| 118 | #define VIDEO_AUDIO_MUTABLE 2 |
| 119 | #define VIDEO_AUDIO_VOLUME 4 |
| 120 | #define VIDEO_AUDIO_BASS 8 |
| 121 | #define VIDEO_AUDIO_TREBLE 16 |
| 122 | #define VIDEO_AUDIO_BALANCE 32 |
| 123 | char name[16]; |
| 124 | #define VIDEO_SOUND_MONO 1 |
| 125 | #define VIDEO_SOUND_STEREO 2 |
| 126 | #define VIDEO_SOUND_LANG1 4 |
| 127 | #define VIDEO_SOUND_LANG2 8 |
| 128 | __u16 mode; |
| 129 | __u16 balance; |
| 130 | __u16 step; |
| 131 | }; |
| 132 | |
| 133 | struct video_clip |
| 134 | { |
| 135 | __s32 x,y; |
| 136 | __s32 width, height; |
| 137 | struct video_clip *next; |
| 138 | }; |
| 139 | |
| 140 | struct video_window |
| 141 | { |
| 142 | __u32 x,y; |
| 143 | __u32 width,height; |
| 144 | __u32 chromakey; |
| 145 | __u32 flags; |
| 146 | struct video_clip __user *clips; |
| 147 | int clipcount; |
| 148 | #define VIDEO_WINDOW_INTERLACE 1 |
| 149 | #define VIDEO_WINDOW_CHROMAKEY 16 |
| 150 | #define VIDEO_CLIP_BITMAP -1 |
| 151 | |
| 152 | #define VIDEO_CLIPMAP_SIZE (128 * 625) |
| 153 | }; |
| 154 | |
| 155 | struct video_capture |
| 156 | { |
| 157 | __u32 x,y; |
| 158 | __u32 width, height; |
| 159 | __u16 decimation; |
| 160 | __u16 flags; |
| 161 | #define VIDEO_CAPTURE_ODD 0 |
| 162 | #define VIDEO_CAPTURE_EVEN 1 |
| 163 | }; |
| 164 | |
| 165 | struct video_buffer |
| 166 | { |
| 167 | void *base; |
| 168 | int height,width; |
| 169 | int depth; |
| 170 | int bytesperline; |
| 171 | }; |
| 172 | |
| 173 | struct video_mmap |
| 174 | { |
| 175 | unsigned int frame; |
| 176 | int height,width; |
| 177 | unsigned int format; |
| 178 | }; |
| 179 | |
| 180 | struct video_key |
| 181 | { |
| 182 | __u8 key[8]; |
| 183 | __u32 flags; |
| 184 | }; |
| 185 | |
| 186 | struct video_mbuf |
| 187 | { |
| 188 | int size; |
| 189 | int frames; |
| 190 | int offsets[VIDEO_MAX_FRAME]; |
| 191 | }; |
| 192 | |
| 193 | #define VIDEO_NO_UNIT (-1) |
| 194 | |
| 195 | struct video_unit |
| 196 | { |
| 197 | int video; |
| 198 | int vbi; |
| 199 | int radio; |
| 200 | int audio; |
| 201 | int teletext; |
| 202 | }; |
| 203 | |
| 204 | struct vbi_format { |
| 205 | __u32 sampling_rate; |
| 206 | __u32 samples_per_line; |
| 207 | __u32 sample_format; |
| 208 | __s32 start[2]; |
| 209 | __u32 count[2]; |
| 210 | __u32 flags; |
| 211 | #define VBI_UNSYNC 1 |
| 212 | #define VBI_INTERLACED 2 |
| 213 | }; |
| 214 | |
| 215 | struct video_info |
| 216 | { |
| 217 | __u32 frame_count; |
| 218 | __u32 h_size; |
| 219 | __u32 v_size; |
| 220 | __u32 smpte_timecode; |
| 221 | __u32 picture_type; |
| 222 | __u32 temporal_reference; |
| 223 | __u8 user_data[256]; |
| 224 | |
| 225 | }; |
| 226 | |
| 227 | struct video_play_mode |
| 228 | { |
| 229 | int mode; |
| 230 | int p1; |
| 231 | int p2; |
| 232 | }; |
| 233 | |
| 234 | struct video_code |
| 235 | { |
| 236 | char loadwhat[16]; |
| 237 | int datasize; |
| 238 | __u8 *data; |
| 239 | }; |
| 240 | |
| 241 | #define VIDIOCGCAP _IOR('v',1,struct video_capability) |
| 242 | #define VIDIOCGCHAN _IOWR('v',2,struct video_channel) |
| 243 | #define VIDIOCSCHAN _IOW('v',3,struct video_channel) |
| 244 | #define VIDIOCGTUNER _IOWR('v',4,struct video_tuner) |
| 245 | #define VIDIOCSTUNER _IOW('v',5,struct video_tuner) |
| 246 | #define VIDIOCGPICT _IOR('v',6,struct video_picture) |
| 247 | #define VIDIOCSPICT _IOW('v',7,struct video_picture) |
| 248 | #define VIDIOCCAPTURE _IOW('v',8,int) |
| 249 | #define VIDIOCGWIN _IOR('v',9, struct video_window) |
| 250 | #define VIDIOCSWIN _IOW('v',10, struct video_window) |
| 251 | #define VIDIOCGFBUF _IOR('v',11, struct video_buffer) |
| 252 | #define VIDIOCSFBUF _IOW('v',12, struct video_buffer) |
| 253 | #define VIDIOCKEY _IOR('v',13, struct video_key) |
| 254 | #define VIDIOCGFREQ _IOR('v',14, unsigned long) |
| 255 | #define VIDIOCSFREQ _IOW('v',15, unsigned long) |
| 256 | #define VIDIOCGAUDIO _IOR('v',16, struct video_audio) |
| 257 | #define VIDIOCSAUDIO _IOW('v',17, struct video_audio) |
| 258 | #define VIDIOCSYNC _IOW('v',18, int) |
| 259 | #define VIDIOCMCAPTURE _IOW('v',19, struct video_mmap) |
| 260 | #define VIDIOCGMBUF _IOR('v',20, struct video_mbuf) |
| 261 | #define VIDIOCGUNIT _IOR('v',21, struct video_unit) |
| 262 | #define VIDIOCGCAPTURE _IOR('v',22, struct video_capture) |
| 263 | #define VIDIOCSCAPTURE _IOW('v',23, struct video_capture) |
| 264 | #define VIDIOCSPLAYMODE _IOW('v',24, struct video_play_mode) |
| 265 | #define VIDIOCSWRITEMODE _IOW('v',25, int) |
| 266 | #define VIDIOCGPLAYINFO _IOR('v',26, struct video_info) |
| 267 | #define VIDIOCSMICROCODE _IOW('v',27, struct video_code) |
| 268 | #define VIDIOCGVBIFMT _IOR('v',28, struct vbi_format) |
| 269 | #define VIDIOCSVBIFMT _IOW('v',29, struct vbi_format) |
| 270 | |
| 271 | #define BASE_VIDIOCPRIVATE 192 |
| 272 | |
| 273 | #define VID_WRITE_MPEG_AUD 0 |
| 274 | #define VID_WRITE_MPEG_VID 1 |
| 275 | #define VID_WRITE_OSD 2 |
| 276 | #define VID_WRITE_TTX 3 |
| 277 | #define VID_WRITE_CC 4 |
| 278 | #define VID_WRITE_MJPEG 5 |
| 279 | |
| 280 | #define VID_PLAY_VID_OUT_MODE 0 |
| 281 | |
| 282 | #define VID_PLAY_GENLOCK 1 |
| 283 | |
| 284 | #define VID_PLAY_NORMAL 2 |
| 285 | #define VID_PLAY_PAUSE 3 |
| 286 | #define VID_PLAY_SINGLE_FRAME 4 |
| 287 | #define VID_PLAY_FAST_FORWARD 5 |
| 288 | #define VID_PLAY_SLOW_MOTION 6 |
| 289 | #define VID_PLAY_IMMEDIATE_NORMAL 7 |
| 290 | #define VID_PLAY_SWITCH_CHANNELS 8 |
| 291 | #define VID_PLAY_FREEZE_FRAME 9 |
| 292 | #define VID_PLAY_STILL_MODE 10 |
| 293 | #define VID_PLAY_MASTER_MODE 11 |
| 294 | |
| 295 | #define VID_PLAY_MASTER_NONE 1 |
| 296 | #define VID_PLAY_MASTER_VIDEO 2 |
| 297 | #define VID_PLAY_MASTER_AUDIO 3 |
| 298 | #define VID_PLAY_ACTIVE_SCANLINES 12 |
| 299 | |
| 300 | #define VID_PLAY_RESET 13 |
| 301 | #define VID_PLAY_END_MARK 14 |
| 302 | |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 303 | #endif |
| 304 | |
Rebecca Schultz Zavin | 0913148 | 2009-07-16 18:33:52 -0700 | [diff] [blame^] | 305 | |