1 #ifndef __LINUX_VIDEODEV_H
2 #define __LINUX_VIDEODEV_H
12 int (*open
)(struct video_device
*, int mode
);
13 void (*close
)(struct video_device
*);
14 long (*read
)(struct video_device
*, char *, unsigned long, int noblock
);
15 /* Do we need a write method ? */
16 long (*write
)(struct video_device
*, const char *, unsigned long, int noblock
);
17 int (*ioctl
)(struct video_device
*, unsigned int , void *);
18 int (*mmap
)(struct video_device
*, const char *, unsigned long);
19 int (*initialize
)(struct video_device
*);
25 extern int videodev_init(void);
26 #define VIDEO_MAJOR 81
27 extern int video_register_device(struct video_device
*);
28 extern void video_unregister_device(struct video_device
*);
32 #define VID_TYPE_CAPTURE 1 /* Can capture */
33 #define VID_TYPE_TUNER 2 /* Can tune */
34 #define VID_TYPE_TELETEXT 4 /* Does teletext */
35 #define VID_TYPE_OVERLAY 8 /* Overlay onto frame buffer */
36 #define VID_TYPE_CHROMAKEY 16 /* Overlay by chromakey */
37 #define VID_TYPE_CLIPPING 32 /* Can clip */
38 #define VID_TYPE_FRAMERAM 64 /* Uses the frame buffer memory */
39 #define VID_TYPE_SCALES 128 /* Scalable */
40 #define VID_TYPE_MONOCHROME 256 /* Monochrome only */
43 struct video_capability
47 int channels
; /* Num channels */
48 int audios
; /* Num audio devices */
49 int maxwidth
; /* Supported width */
50 int maxheight
; /* And height */
51 int minwidth
; /* Supported width */
52 int minheight
; /* And height */
62 #define VIDEO_VC_TUNER 1 /* Channel has a tuner */
63 #define VIDEO_VC_AUDIO 2 /* Channel has audio */
65 #define VIDEO_TYPE_TV 1
66 #define VIDEO_TYPE_CAMERA 2
73 ulong rangelow
, rangehigh
; /* Tuner range */
75 #define VIDEO_TUNER_PAL 1
76 #define VIDEO_TUNER_NTSC 2
77 #define VIDEO_TUNER_SECAM 4
78 __u16 mode
; /* PAL/NTSC/SECAM/OTHER */
79 #define VIDEO_MODE_PAL 0
80 #define VIDEO_MODE_NTSC 1
81 #define VIDEO_MODE_SECAM 2
82 #define VIDEO_MODE_AUTO 3
91 __u16 whiteness
; /* Black and white only */
92 __u16 depth
; /* Capture depth */
93 __u16 palette
; /* Palette in use */
94 #define VIDEO_PALETTE_GREY 1 /* Linear greyscale */
95 #define VIDEO_PALETTE_HI240 2 /* High 240 cube (BT848) */
96 #define VIDEO_PALETTE_RGB565 3 /* 565 16 bit RGB */
97 #define VIDEO_PALETTE_RGB24 4 /* 24bit RGB */
98 #define VIDEO_PALETTE_RGB32 5 /* 32bit RGB */
99 #define VIDEO_PALETTE_RGB555 6 /* 555 15bit RGB */
104 int audio
; /* Audio channel */
105 __u16 volume
; /* If settable */
108 #define VIDEO_AUDIO_MUTE 1
109 #define VIDEO_AUDIO_MUTABLE 2
110 #define VIDEO_AUDIO_VOLUME 4
111 #define VIDEO_AUDIO_BASS 8
112 #define VIDEO_AUDIO_TREBLE 16
120 struct video_clip
*next
; /* For user use/driver use only */
129 struct video_clip
*clips
; /* Set only */
131 #define VIDEO_WINDOW_INTERLACE 1
149 #define VIDIOCGCAP _IOR('v',1,struct video_capability) /* Get capabilities */
150 #define VIDIOCGCHAN _IOWR('v',2,struct video_channel) /* Get channel info (sources) */
151 #define VIDIOCSCHAN _IOW('v',3,int) /* Set channel */
152 #define VIDIOCGTUNER _IOWR('v',4,struct video_tuner) /* Get tuner abilities */
153 #define VIDIOCSTUNER _IOW('v',5,struct video_tuner) /* Tune the tuner for the current channel */
154 #define VIDIOCGPICT _IOR('v',6,struct video_picture) /* Get picture properties */
155 #define VIDIOCSPICT _IOW('v',7,struct video_picture) /* Set picture properties */
156 #define VIDIOCCAPTURE _IOW('v',8,int) /* Start, end capture */
157 #define VIDIOCGWIN _IOR('v',9, struct video_window) /* Set the video overlay window */
158 #define VIDIOCSWIN _IOW('v',10, struct video_window) /* Set the video overlay window - passes clip list for hardware smarts , chromakey etc */
159 #define VIDIOCGFBUF _IOR('v',11, struct video_buffer) /* Get frame buffer */
160 #define VIDIOCSFBUF _IOW('v',12, struct video_buffer) /* Set frame buffer - root only */
161 #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) */
162 #define VIDIOCGFREQ _IOR('v',14, unsigned long) /* Set tuner */
163 #define VIDIOCSFREQ _IOW('v',15, unsigned long) /* Set tuner */
164 #define VIDIOCGAUDIO _IOR('v',16, struct video_audio) /* Get audio info */
165 #define VIDIOCSAUDIO _IOW('v',17, struct video_audio) /* Audio source, mute etc */
168 #define BASE_VIDIOCPRIVATE 192 /* 192-255 are private */
171 #define VID_HARDWARE_BT848 1
172 #define VID_HARDWARE_QCAM_BW 2
173 #define VID_HARDWARE_PMS 3
174 #define VID_HARDWARE_QCAM_C 4
183 int (*init
)(struct video_init
*);