1 /* libv4l1 linux/videodev.h replacement file */
2 #ifndef __LINUX_VIDEODEV_H
3 #define __LINUX_VIDEODEV_H
5 #include <linux/ioctl.h>
8 #define VID_TYPE_CAPTURE 1 /* Can capture */
9 #define VID_TYPE_TUNER 2 /* Can tune */
10 #define VID_TYPE_TELETEXT 4 /* Does teletext */
11 #define VID_TYPE_OVERLAY 8 /* Overlay onto frame buffer */
12 #define VID_TYPE_CHROMAKEY 16 /* Overlay by chromakey */
13 #define VID_TYPE_CLIPPING 32 /* Can clip */
14 #define VID_TYPE_FRAMERAM 64 /* Uses the frame buffer memory */
15 #define VID_TYPE_SCALES 128 /* Scalable */
16 #define VID_TYPE_MONOCHROME 256 /* Monochrome only */
17 #define VID_TYPE_SUBCAPTURE 512 /* Can capture subareas of the image */
18 #define VID_TYPE_MPEG_DECODER 1024 /* Can decode MPEG streams */
19 #define VID_TYPE_MPEG_ENCODER 2048 /* Can encode MPEG streams */
20 #define VID_TYPE_MJPEG_DECODER 4096 /* Can decode MJPEG streams */
21 #define VID_TYPE_MJPEG_ENCODER 8192 /* Can encode MJPEG streams */
23 struct video_capability
27 int channels
; /* Num channels */
28 int audios
; /* Num audio devices */
29 int maxwidth
; /* Supported width */
30 int maxheight
; /* And height */
31 int minwidth
; /* Supported width */
32 int minheight
; /* And height */
42 #define VIDEO_VC_TUNER 1 /* Channel has a tuner */
43 #define VIDEO_VC_AUDIO 2 /* Channel has audio */
45 #define VIDEO_TYPE_TV 1
46 #define VIDEO_TYPE_CAMERA 2
47 uint16_t norm
; /* Norm set by channel */
54 unsigned long rangelow
, rangehigh
; /* Tuner range */
56 #define VIDEO_TUNER_PAL 1
57 #define VIDEO_TUNER_NTSC 2
58 #define VIDEO_TUNER_SECAM 4
59 #define VIDEO_TUNER_LOW 8 /* Uses KHz not MHz */
60 #define VIDEO_TUNER_NORM 16 /* Tuner can set norm */
61 #define VIDEO_TUNER_STEREO_ON 128 /* Tuner is seeing stereo */
62 #define VIDEO_TUNER_RDS_ON 256 /* Tuner is seeing an RDS datastream */
63 #define VIDEO_TUNER_MBS_ON 512 /* Tuner is seeing an MBS datastream */
64 uint16_t mode
; /* PAL/NTSC/SECAM/OTHER */
65 #define VIDEO_MODE_PAL 0
66 #define VIDEO_MODE_NTSC 1
67 #define VIDEO_MODE_SECAM 2
68 #define VIDEO_MODE_AUTO 3
69 uint16_t signal
; /* Signal strength 16bit scale */
78 uint16_t whiteness
; /* Black and white only */
79 uint16_t depth
; /* Capture depth */
80 uint16_t palette
; /* Palette in use */
81 #define VIDEO_PALETTE_GREY 1 /* Linear greyscale */
82 #define VIDEO_PALETTE_HI240 2 /* High 240 cube (BT848) */
83 #define VIDEO_PALETTE_RGB565 3 /* 565 16 bit RGB */
84 #define VIDEO_PALETTE_RGB24 4 /* 24bit RGB */
85 #define VIDEO_PALETTE_RGB32 5 /* 32bit RGB */
86 #define VIDEO_PALETTE_RGB555 6 /* 555 15bit RGB */
87 #define VIDEO_PALETTE_YUV422 7 /* YUV422 capture */
88 #define VIDEO_PALETTE_YUYV 8
89 #define VIDEO_PALETTE_UYVY 9 /* The great thing about standards is ... */
90 #define VIDEO_PALETTE_YUV420 10
91 #define VIDEO_PALETTE_YUV411 11 /* YUV411 capture */
92 #define VIDEO_PALETTE_RAW 12 /* RAW capture (BT848) */
93 #define VIDEO_PALETTE_YUV422P 13 /* YUV 4:2:2 Planar */
94 #define VIDEO_PALETTE_YUV411P 14 /* YUV 4:1:1 Planar */
95 #define VIDEO_PALETTE_YUV420P 15 /* YUV 4:2:0 Planar */
96 #define VIDEO_PALETTE_YUV410P 16 /* YUV 4:1:0 Planar */
97 #define VIDEO_PALETTE_PLANAR 13 /* start of planar entries */
98 #define VIDEO_PALETTE_COMPONENT 7 /* start of component entries */
103 int audio
; /* Audio channel */
104 uint16_t volume
; /* If settable */
105 uint16_t bass
, treble
;
107 #define VIDEO_AUDIO_MUTE 1
108 #define VIDEO_AUDIO_MUTABLE 2
109 #define VIDEO_AUDIO_VOLUME 4
110 #define VIDEO_AUDIO_BASS 8
111 #define VIDEO_AUDIO_TREBLE 16
112 #define VIDEO_AUDIO_BALANCE 32
114 #define VIDEO_SOUND_MONO 1
115 #define VIDEO_SOUND_STEREO 2
116 #define VIDEO_SOUND_LANG1 4
117 #define VIDEO_SOUND_LANG2 8
119 uint16_t balance
; /* Stereo balance */
120 uint16_t step
; /* Step actual volume uses */
126 int32_t width
, height
;
127 struct video_clip
*next
; /* For user use/driver use only */
132 uint32_t x
,y
; /* Position of window */
133 uint32_t width
,height
; /* Its size */
136 struct video_clip
*clips
; /* Set only */
138 #define VIDEO_WINDOW_INTERLACE 1
139 #define VIDEO_WINDOW_CHROMAKEY 16 /* Overlay by chromakey */
140 #define VIDEO_CLIP_BITMAP -1
141 /* bitmap is 1024x625, a '1' bit represents a clipped pixel */
142 #define VIDEO_CLIPMAP_SIZE (128 * 625)
155 unsigned int frame
; /* Frame (0 - n) for double buffer */
157 unsigned int format
; /* should be VIDEO_PALETTE_* */
162 int size
; /* Total memory to map */
163 int frames
; /* Frames */
168 uint32_t sampling_rate
; /* in Hz */
169 uint32_t samples_per_line
;
170 uint32_t sample_format
; /* VIDEO_PALETTE_RAW only (1 byte) */
171 int32_t start
[2]; /* starting line for each frame */
172 uint32_t count
[2]; /* count of lines for each frame */
174 #define VBI_UNSYNC 1 /* can distingues between top/bottom field */
175 #define VBI_INTERLACED 2 /* lines are interlaced */
178 #define VIDIOCGCAP _IOR('v',1,struct video_capability) /* Get capabilities */
179 #define VIDIOCGCHAN _IOWR('v',2,struct video_channel) /* Get channel info (sources) */
180 #define VIDIOCSCHAN _IOW('v',3,struct video_channel) /* Set channel */
181 #define VIDIOCGTUNER _IOWR('v',4,struct video_tuner) /* Get tuner abilities */
182 #define VIDIOCSTUNER _IOW('v',5,struct video_tuner) /* Tune the tuner for the current channel */
183 #define VIDIOCGPICT _IOR('v',6,struct video_picture) /* Get picture properties */
184 #define VIDIOCSPICT _IOW('v',7,struct video_picture) /* Set picture properties */
185 #define VIDIOCCAPTURE _IOW('v',8,int) /* Start, end capture */
186 #define VIDIOCGWIN _IOR('v',9, struct video_window) /* Get the video overlay window */
187 #define VIDIOCSWIN _IOW('v',10, struct video_window) /* Set the video overlay window - passes clip list for hardware smarts , chromakey etc */
188 #define VIDIOCGFBUF _IOR('v',11, struct video_buffer) /* Get frame buffer */
189 #define VIDIOCSFBUF _IOW('v',12, struct video_buffer) /* Set frame buffer - root only */
190 #define VIDIOCGFREQ _IOR('v',14, unsigned long) /* Set tuner */
191 #define VIDIOCSFREQ _IOW('v',15, unsigned long) /* Set tuner */
192 #define VIDIOCGAUDIO _IOR('v',16, struct video_audio) /* Get audio info */
193 #define VIDIOCSAUDIO _IOW('v',17, struct video_audio) /* Audio source, mute etc */
194 #define VIDIOCSYNC _IOW('v',18, int) /* Sync with mmap grabbing */
195 #define VIDIOCMCAPTURE _IOW('v',19, struct video_mmap) /* Grab frames */
196 #define VIDIOCGMBUF _IOR('v',20, struct video_mbuf) /* Memory map buffer info */
197 #define VIDIOCGVBIFMT _IOR('v',28, struct vbi_format) /* Get VBI information */
198 #define VIDIOCSVBIFMT _IOW('v',29, struct vbi_format) /* Set VBI information */