123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207 |
- #ifndef __LINUX_VIDEODEV_H
- #define __LINUX_VIDEODEV_H
- #ifdef linux
- #include <linux/ioctl.h>
- #endif
- #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
- #include <sys/ioctl.h>
- #endif
- #include <stdint.h>
- #define VID_TYPE_CAPTURE 1
- #define VID_TYPE_TUNER 2
- #define VID_TYPE_TELETEXT 4
- #define VID_TYPE_OVERLAY 8
- #define VID_TYPE_CHROMAKEY 16
- #define VID_TYPE_CLIPPING 32
- #define VID_TYPE_FRAMERAM 64
- #define VID_TYPE_SCALES 128
- #define VID_TYPE_MONOCHROME 256
- #define VID_TYPE_SUBCAPTURE 512
- #define VID_TYPE_MPEG_DECODER 1024
- #define VID_TYPE_MPEG_ENCODER 2048
- #define VID_TYPE_MJPEG_DECODER 4096
- #define VID_TYPE_MJPEG_ENCODER 8192
- struct video_capability
- {
- char name[32];
- int type;
- int channels;
- int audios;
- int maxwidth;
- int maxheight;
- int minwidth;
- int minheight;
- };
- struct video_channel
- {
- int channel;
- char name[32];
- int tuners;
- uint32_t flags;
- #define VIDEO_VC_TUNER 1
- #define VIDEO_VC_AUDIO 2
- uint16_t type;
- #define VIDEO_TYPE_TV 1
- #define VIDEO_TYPE_CAMERA 2
- uint16_t norm;
- };
- struct video_tuner
- {
- int tuner;
- char name[32];
- unsigned long rangelow, rangehigh;
- uint32_t flags;
- #define VIDEO_TUNER_PAL 1
- #define VIDEO_TUNER_NTSC 2
- #define VIDEO_TUNER_SECAM 4
- #define VIDEO_TUNER_LOW 8
- #define VIDEO_TUNER_NORM 16
- #define VIDEO_TUNER_STEREO_ON 128
- #define VIDEO_TUNER_RDS_ON 256
- #define VIDEO_TUNER_MBS_ON 512
- uint16_t mode;
- #define VIDEO_MODE_PAL 0
- #define VIDEO_MODE_NTSC 1
- #define VIDEO_MODE_SECAM 2
- #define VIDEO_MODE_AUTO 3
- uint16_t signal;
- };
- struct video_picture
- {
- uint16_t brightness;
- uint16_t hue;
- uint16_t colour;
- uint16_t contrast;
- uint16_t whiteness;
- uint16_t depth;
- uint16_t palette;
- #define VIDEO_PALETTE_GREY 1
- #define VIDEO_PALETTE_HI240 2
- #define VIDEO_PALETTE_RGB565 3
- #define VIDEO_PALETTE_RGB24 4
- #define VIDEO_PALETTE_RGB32 5
- #define VIDEO_PALETTE_RGB555 6
- #define VIDEO_PALETTE_YUV422 7
- #define VIDEO_PALETTE_YUYV 8
- #define VIDEO_PALETTE_UYVY 9
- #define VIDEO_PALETTE_YUV420 10
- #define VIDEO_PALETTE_YUV411 11
- #define VIDEO_PALETTE_RAW 12
- #define VIDEO_PALETTE_YUV422P 13
- #define VIDEO_PALETTE_YUV411P 14
- #define VIDEO_PALETTE_YUV420P 15
- #define VIDEO_PALETTE_YUV410P 16
- #define VIDEO_PALETTE_PLANAR 13
- #define VIDEO_PALETTE_COMPONENT 7
- };
- struct video_audio
- {
- int audio;
- uint16_t volume;
- uint16_t bass, treble;
- uint32_t flags;
- #define VIDEO_AUDIO_MUTE 1
- #define VIDEO_AUDIO_MUTABLE 2
- #define VIDEO_AUDIO_VOLUME 4
- #define VIDEO_AUDIO_BASS 8
- #define VIDEO_AUDIO_TREBLE 16
- #define VIDEO_AUDIO_BALANCE 32
- char name[16];
- #define VIDEO_SOUND_MONO 1
- #define VIDEO_SOUND_STEREO 2
- #define VIDEO_SOUND_LANG1 4
- #define VIDEO_SOUND_LANG2 8
- uint16_t mode;
- uint16_t balance;
- uint16_t step;
- };
- struct video_clip
- {
- int32_t x,y;
- int32_t width, height;
- struct video_clip *next;
- };
- struct video_window
- {
- uint32_t x,y;
- uint32_t width,height;
- uint32_t chromakey;
- uint32_t flags;
- struct video_clip *clips;
- int clipcount;
- #define VIDEO_WINDOW_INTERLACE 1
- #define VIDEO_WINDOW_CHROMAKEY 16
- #define VIDEO_CLIP_BITMAP -1
- #define VIDEO_CLIPMAP_SIZE (128 * 625)
- };
- struct video_buffer
- {
- void *base;
- int height,width;
- int depth;
- int bytesperline;
- };
- struct video_mmap
- {
- unsigned int frame;
- int height,width;
- unsigned int format;
- };
- struct video_mbuf
- {
- int size;
- int frames;
- int offsets[32];
- };
- struct vbi_format {
- uint32_t sampling_rate;
- uint32_t samples_per_line;
- uint32_t sample_format;
- int32_t start[2];
- uint32_t count[2];
- uint32_t flags;
- #define VBI_UNSYNC 1
- #define VBI_INTERLACED 2
- };
- #define VIDIOCGCAP _IOR('v',1,struct video_capability)
- #define VIDIOCGCHAN _IOWR('v',2,struct video_channel)
- #define VIDIOCSCHAN _IOW('v',3,struct video_channel)
- #define VIDIOCGTUNER _IOWR('v',4,struct video_tuner)
- #define VIDIOCSTUNER _IOW('v',5,struct video_tuner)
- #define VIDIOCGPICT _IOR('v',6,struct video_picture)
- #define VIDIOCSPICT _IOW('v',7,struct video_picture)
- #define VIDIOCCAPTURE _IOW('v',8,int)
- #define VIDIOCGWIN _IOR('v',9, struct video_window)
- #define VIDIOCSWIN _IOW('v',10, struct video_window)
- #define VIDIOCGFBUF _IOR('v',11, struct video_buffer)
- #define VIDIOCSFBUF _IOW('v',12, struct video_buffer)
- #define VIDIOCGFREQ _IOR('v',14, unsigned long)
- #define VIDIOCSFREQ _IOW('v',15, unsigned long)
- #define VIDIOCGAUDIO _IOR('v',16, struct video_audio)
- #define VIDIOCSAUDIO _IOW('v',17, struct video_audio)
- #define VIDIOCSYNC _IOW('v',18, int)
- #define VIDIOCMCAPTURE _IOW('v',19, struct video_mmap)
- #define VIDIOCGMBUF _IOR('v',20, struct video_mbuf)
- #define VIDIOCGVBIFMT _IOR('v',28, struct vbi_format)
- #define VIDIOCSVBIFMT _IOW('v',29, struct vbi_format)
- #endif
|