• Skip to content
  • Skip to link menu
KDE 3.5 API Reference
  • KDE API Reference
  • API Reference
  • Sitemap
  • Contact Us
 

kstars

videodev.h

Go to the documentation of this file.
00001 #ifndef __LINUX_VIDEODEV_H
00002 #define __LINUX_VIDEODEV_H
00003 
00004 #define VID_TYPE_CAPTURE    1   /* Can capture */
00005 #define VID_TYPE_TUNER      2   /* Can tune */
00006 #define VID_TYPE_TELETEXT   4   /* Does teletext */
00007 #define VID_TYPE_OVERLAY    8   /* Overlay onto frame buffer */
00008 #define VID_TYPE_CHROMAKEY  16  /* Overlay by chromakey */
00009 #define VID_TYPE_CLIPPING   32  /* Can clip */
00010 #define VID_TYPE_FRAMERAM   64  /* Uses the frame buffer memory */
00011 #define VID_TYPE_SCALES     128 /* Scalable */
00012 #define VID_TYPE_MONOCHROME 256 /* Monochrome only */
00013 #define VID_TYPE_SUBCAPTURE 512 /* Can capture subareas of the image */
00014 #define VID_TYPE_MPEG_DECODER   1024    /* Can decode MPEG streams */
00015 #define VID_TYPE_MPEG_ENCODER   2048    /* Can encode MPEG streams */
00016 #define VID_TYPE_MJPEG_DECODER  4096    /* Can decode MJPEG streams */
00017 #define VID_TYPE_MJPEG_ENCODER  8192    /* Can encode MJPEG streams */
00018 
00019 struct video_capability
00020 {
00021     char name[32];
00022     int type;
00023     int channels;   /* Num channels */
00024     int audios; /* Num audio devices */
00025     int maxwidth;   /* Supported width */
00026     int maxheight;  /* And height */
00027     int minwidth;   /* Supported width */
00028     int minheight;  /* And height */
00029 };
00030 
00031 
00032 struct video_channel
00033 {
00034     int channel;
00035     char name[32];
00036     int tuners;
00037     unsigned int  flags;
00038 #define VIDEO_VC_TUNER      1   /* Channel has a tuner */
00039 #define VIDEO_VC_AUDIO      2   /* Channel has audio */
00040     unsigned short  type;
00041 #define VIDEO_TYPE_TV       1
00042 #define VIDEO_TYPE_CAMERA   2   
00043     unsigned short norm;            /* Norm set by channel */
00044 };
00045 
00046 struct video_tuner
00047 {
00048     int tuner;
00049     char name[32];
00050     unsigned long rangelow, rangehigh;  /* Tuner range */
00051     unsigned int flags;
00052 #define VIDEO_TUNER_PAL     1
00053 #define VIDEO_TUNER_NTSC    2
00054 #define VIDEO_TUNER_SECAM   4
00055 #define VIDEO_TUNER_LOW     8   /* Uses KHz not MHz */
00056 #define VIDEO_TUNER_NORM    16  /* Tuner can set norm */
00057 #define VIDEO_TUNER_STEREO_ON   128 /* Tuner is seeing stereo */
00058 #define VIDEO_TUNER_RDS_ON      256     /* Tuner is seeing an RDS datastream */
00059 #define VIDEO_TUNER_MBS_ON      512     /* Tuner is seeing an MBS datastream */
00060     unsigned short mode;            /* PAL/NTSC/SECAM/OTHER */
00061 #define VIDEO_MODE_PAL      0
00062 #define VIDEO_MODE_NTSC     1
00063 #define VIDEO_MODE_SECAM    2
00064 #define VIDEO_MODE_AUTO     3
00065     unsigned short signal;          /* Signal strength 16bit scale */
00066 };
00067 
00068 struct video_picture
00069 {
00070     unsigned short  brightness;
00071     unsigned short  hue;
00072     unsigned short  colour;
00073     unsigned short  contrast;
00074     unsigned short  whiteness;  /* Black and white only */
00075     unsigned short  depth;      /* Capture depth */
00076     unsigned short   palette;   /* Palette in use */
00077 #define VIDEO_PALETTE_GREY  1   /* Linear greyscale */
00078 #define VIDEO_PALETTE_HI240 2   /* High 240 cube (BT848) */
00079 #define VIDEO_PALETTE_RGB565    3   /* 565 16 bit RGB */
00080 #define VIDEO_PALETTE_RGB24 4   /* 24bit RGB */
00081 #define VIDEO_PALETTE_RGB32 5   /* 32bit RGB */ 
00082 #define VIDEO_PALETTE_RGB555    6   /* 555 15bit RGB */
00083 #define VIDEO_PALETTE_YUV422    7   /* YUV422 capture */
00084 #define VIDEO_PALETTE_YUYV  8
00085 #define VIDEO_PALETTE_UYVY  9   /* The great thing about standards is ... */
00086 #define VIDEO_PALETTE_YUV420    10
00087 #define VIDEO_PALETTE_YUV411    11  /* YUV411 capture */
00088 #define VIDEO_PALETTE_RAW   12  /* RAW capture (BT848) */
00089 #define VIDEO_PALETTE_YUV422P   13  /* YUV 4:2:2 Planar */
00090 #define VIDEO_PALETTE_YUV411P   14  /* YUV 4:1:1 Planar */
00091 #define VIDEO_PALETTE_YUV420P   15  /* YUV 4:2:0 Planar */
00092 #define VIDEO_PALETTE_YUV410P   16  /* YUV 4:1:0 Planar */
00093 #define VIDEO_PALETTE_PLANAR    13  /* start of planar entries */
00094 #define VIDEO_PALETTE_COMPONENT 7   /* start of component entries */
00095 };
00096 
00097 struct video_audio
00098 {
00099     int audio;      /* Audio channel */
00100     unsigned short  volume;     /* If settable */
00101     unsigned short  bass, treble;
00102     unsigned int    flags;
00103 #define VIDEO_AUDIO_MUTE    1
00104 #define VIDEO_AUDIO_MUTABLE 2
00105 #define VIDEO_AUDIO_VOLUME  4
00106 #define VIDEO_AUDIO_BASS    8
00107 #define VIDEO_AUDIO_TREBLE  16  
00108 #define VIDEO_AUDIO_BALANCE 32
00109     char    name[16];
00110 #define VIDEO_SOUND_MONO    1
00111 #define VIDEO_SOUND_STEREO  2
00112 #define VIDEO_SOUND_LANG1   4
00113 #define VIDEO_SOUND_LANG2   8
00114         unsigned short   mode;
00115         unsigned short  balance;    /* Stereo balance */
00116         unsigned short  step;       /* Step actual volume uses */
00117 };
00118 
00119 struct video_clip
00120 {
00121     int x,y;
00122     int width, height;
00123     struct  video_clip *next;   /* For user use/driver use only */
00124 };
00125 
00126 struct video_window
00127 {
00128     unsigned int    x,y;            /* Position of window */
00129     unsigned int    width,height;       /* Its size */
00130     unsigned int    chromakey;
00131     unsigned int    flags;
00132     struct  video_clip *clips;  /* Set only */
00133     int clipcount;
00134 #define VIDEO_WINDOW_INTERLACE  1
00135 #define VIDEO_WINDOW_CHROMAKEY  16  /* Overlay by chromakey */
00136 #define VIDEO_CLIP_BITMAP   -1
00137 /* bitmap is 1024x625, a '1' bit represents a clipped pixel */
00138 #define VIDEO_CLIPMAP_SIZE  (128 * 625)
00139 };
00140 
00141 struct video_capture
00142 {
00143     unsigned int    x,y;            /* Offsets into image */
00144     unsigned int    width, height;      /* Area to capture */
00145     unsigned short  decimation;     /* Decimation divider */
00146     unsigned short  flags;          /* Flags for capture */
00147 #define VIDEO_CAPTURE_ODD       0   /* Temporal */
00148 #define VIDEO_CAPTURE_EVEN      1
00149 };
00150 
00151 struct video_buffer
00152 {
00153     void    *base;
00154     int height,width;
00155     int depth;
00156     int bytesperline;
00157 };
00158 
00159 struct video_mmap
00160 {
00161     unsigned    int frame;      /* Frame (0 - n) for double buffer */
00162     int     height,width;
00163     unsigned    int format;     /* should be VIDEO_PALETTE_* */
00164 };
00165 
00166 struct video_key
00167 {
00168     unsigned char key[8];
00169     unsigned int    flags;
00170 };
00171 
00172 
00173 #define VIDEO_MAX_FRAME     32
00174 
00175 struct video_mbuf
00176 {
00177     int size;       /* Total memory to map */
00178     int frames;     /* Frames */
00179     int offsets[VIDEO_MAX_FRAME];
00180 };
00181     
00182 
00183 #define     VIDEO_NO_UNIT   (-1)
00184 
00185     
00186 struct video_unit
00187 {
00188     int     video;      /* Video minor */
00189     int vbi;        /* VBI minor */
00190     int radio;      /* Radio minor */
00191     int audio;      /* Audio minor */
00192     int teletext;   /* Teletext minor */
00193 };
00194 
00195 struct vbi_format {
00196     unsigned int    sampling_rate;  /* in Hz */
00197     unsigned int    samples_per_line;
00198     unsigned int    sample_format;  /* VIDEO_PALETTE_RAW only (1 byte) */
00199     int start[2];   /* starting line for each frame */
00200     unsigned int    count[2];   /* count of lines for each frame */
00201     unsigned int    flags;
00202 #define VBI_UNSYNC  1   /* can distingues between top/bottom field */
00203 #define VBI_INTERLACED  2   /* lines are interlaced */
00204 };
00205 
00206 /* video_info is biased towards hardware mpeg encode/decode */
00207 /* but it could apply generically to any hardware compressor/decompressor */
00208 struct video_info
00209 {
00210     unsigned int    frame_count;    /* frames output since decode/encode began */
00211     unsigned int    h_size;     /* current unscaled horizontal size */
00212     unsigned int    v_size;     /* current unscaled veritcal size */
00213     unsigned int    smpte_timecode; /* current SMPTE timecode (for current GOP) */
00214     unsigned int    picture_type;   /* current picture type */
00215     unsigned int    temporal_reference; /* current temporal reference */
00216     unsigned char   user_data[256]; /* user data last found in compressed stream */
00217     /* user_data[0] contains user data flags, user_data[1] has count */
00218 };
00219 
00220 /* generic structure for setting playback modes */
00221 struct video_play_mode
00222 {
00223     int mode;
00224     int p1;
00225     int p2;
00226 };
00227 
00228 /* for loading microcode / fpga programming */
00229 struct video_code
00230 {
00231     char    loadwhat[16];   /* name or tag of file being passed */
00232     int datasize;
00233     unsigned char   *data;
00234 };
00235 
00236 #define VIDIOCGCAP      _IOR('v',1,struct video_capability) /* Get capabilities */
00237 #define VIDIOCGCHAN     _IOWR('v',2,struct video_channel)   /* Get channel info (sources) */
00238 #define VIDIOCSCHAN     _IOW('v',3,struct video_channel)    /* Set channel  */
00239 #define VIDIOCGTUNER        _IOWR('v',4,struct video_tuner)     /* Get tuner abilities */
00240 #define VIDIOCSTUNER        _IOW('v',5,struct video_tuner)      /* Tune the tuner for the current channel */
00241 #define VIDIOCGPICT     _IOR('v',6,struct video_picture)    /* Get picture properties */
00242 #define VIDIOCSPICT     _IOW('v',7,struct video_picture)    /* Set picture properties */
00243 #define VIDIOCCAPTURE       _IOW('v',8,int)             /* Start, end capture */
00244 #define VIDIOCGWIN      _IOR('v',9, struct video_window)    /* Get the video overlay window */
00245 #define VIDIOCSWIN      _IOW('v',10, struct video_window)   /* Set the video overlay window - passes clip list for hardware smarts , chromakey etc */
00246 #define VIDIOCGFBUF     _IOR('v',11, struct video_buffer)   /* Get frame buffer */
00247 #define VIDIOCSFBUF     _IOW('v',12, struct video_buffer)   /* Set frame buffer - root only */
00248 #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) */
00249 #define VIDIOCGFREQ     _IOR('v',14, unsigned long)     /* Set tuner */
00250 #define VIDIOCSFREQ     _IOW('v',15, unsigned long)     /* Set tuner */
00251 #define VIDIOCGAUDIO        _IOR('v',16, struct video_audio)    /* Get audio info */
00252 #define VIDIOCSAUDIO        _IOW('v',17, struct video_audio)    /* Audio source, mute etc */
00253 #define VIDIOCSYNC      _IOW('v',18, int)           /* Sync with mmap grabbing */
00254 #define VIDIOCMCAPTURE      _IOW('v',19, struct video_mmap)     /* Grab frames */
00255 #define VIDIOCGMBUF     _IOR('v',20, struct video_mbuf)     /* Memory map buffer info */
00256 #define VIDIOCGUNIT     _IOR('v',21, struct video_unit)     /* Get attached units */
00257 #define VIDIOCGCAPTURE      _IOR('v',22, struct video_capture)  /* Get subcapture */
00258 #define VIDIOCSCAPTURE      _IOW('v',23, struct video_capture)  /* Set subcapture */
00259 #define VIDIOCSPLAYMODE     _IOW('v',24, struct video_play_mode)    /* Set output video mode/feature */
00260 #define VIDIOCSWRITEMODE    _IOW('v',25, int)           /* Set write mode */
00261 #define VIDIOCGPLAYINFO     _IOR('v',26, struct video_info)     /* Get current playback info from hardware */
00262 #define VIDIOCSMICROCODE    _IOW('v',27, struct video_code)     /* Load microcode into hardware */
00263 #define VIDIOCGVBIFMT       _IOR('v',28, struct vbi_format)     /* Get VBI information */
00264 #define VIDIOCSVBIFMT       _IOW('v',29, struct vbi_format)     /* Set VBI information */
00265 
00266 
00267 #define BASE_VIDIOCPRIVATE  192     /* 192-255 are private */
00268 
00269 /* VIDIOCSWRITEMODE */
00270 #define VID_WRITE_MPEG_AUD      0
00271 #define VID_WRITE_MPEG_VID      1
00272 #define VID_WRITE_OSD           2
00273 #define VID_WRITE_TTX           3
00274 #define VID_WRITE_CC            4
00275 #define VID_WRITE_MJPEG         5
00276 
00277 /* VIDIOCSPLAYMODE */
00278 #define VID_PLAY_VID_OUT_MODE       0
00279     /* p1: = VIDEO_MODE_PAL, VIDEO_MODE_NTSC, etc ... */
00280 #define VID_PLAY_GENLOCK        1
00281     /* p1: 0 = OFF, 1 = ON */
00282     /* p2: GENLOCK FINE DELAY value */ 
00283 #define VID_PLAY_NORMAL         2
00284 #define VID_PLAY_PAUSE          3
00285 #define VID_PLAY_SINGLE_FRAME       4
00286 #define VID_PLAY_FAST_FORWARD       5
00287 #define VID_PLAY_SLOW_MOTION        6
00288 #define VID_PLAY_IMMEDIATE_NORMAL   7
00289 #define VID_PLAY_SWITCH_CHANNELS    8
00290 #define VID_PLAY_FREEZE_FRAME       9
00291 #define VID_PLAY_STILL_MODE     10
00292 #define VID_PLAY_MASTER_MODE        11
00293     /* p1: see below */
00294 #define     VID_PLAY_MASTER_NONE    1
00295 #define     VID_PLAY_MASTER_VIDEO   2
00296 #define     VID_PLAY_MASTER_AUDIO   3
00297 #define VID_PLAY_ACTIVE_SCANLINES   12
00298     /* p1 = first active; p2 = last active */
00299 #define VID_PLAY_RESET          13
00300 #define VID_PLAY_END_MARK       14
00301 
00302 
00303 
00304 #define VID_HARDWARE_BT848  1
00305 #define VID_HARDWARE_QCAM_BW    2
00306 #define VID_HARDWARE_PMS    3
00307 #define VID_HARDWARE_QCAM_C 4
00308 #define VID_HARDWARE_PSEUDO 5
00309 #define VID_HARDWARE_SAA5249    6
00310 #define VID_HARDWARE_AZTECH 7
00311 #define VID_HARDWARE_SF16MI 8
00312 #define VID_HARDWARE_RTRACK 9
00313 #define VID_HARDWARE_ZOLTRIX    10
00314 #define VID_HARDWARE_SAA7146    11
00315 #define VID_HARDWARE_VIDEUM 12  /* Reserved for Winnov videum */
00316 #define VID_HARDWARE_RTRACK2    13
00317 #define VID_HARDWARE_PERMEDIA2  14  /* Reserved for Permedia2 */
00318 #define VID_HARDWARE_RIVA128    15  /* Reserved for RIVA 128 */
00319 #define VID_HARDWARE_PLANB  16  /* PowerMac motherboard video-in */
00320 #define VID_HARDWARE_BROADWAY   17  /* Broadway project */
00321 #define VID_HARDWARE_GEMTEK 18
00322 #define VID_HARDWARE_TYPHOON    19
00323 #define VID_HARDWARE_VINO   20  /* SGI Indy Vino */
00324 #define VID_HARDWARE_CADET  21  /* Cadet radio */
00325 #define VID_HARDWARE_TRUST  22  /* Trust FM Radio */
00326 #define VID_HARDWARE_TERRATEC   23  /* TerraTec ActiveRadio */
00327 #define VID_HARDWARE_CPIA   24
00328 #define VID_HARDWARE_ZR36120    25  /* Zoran ZR36120/ZR36125 */
00329 #define VID_HARDWARE_ZR36067    26  /* Zoran ZR36067/36060 */
00330 #define VID_HARDWARE_OV511  27  
00331 #define VID_HARDWARE_ZR356700   28  /* Zoran 36700 series */
00332 #define VID_HARDWARE_W9966  29
00333 #define VID_HARDWARE_SE401  30  /* SE401 USB webcams */
00334 #define VID_HARDWARE_PWC    31  /* Philips webcams */
00335 #define VID_HARDWARE_MEYE   32  /* Sony Vaio MotionEye cameras */
00336 #define VID_HARDWARE_CPIA2  33
00337 #define VID_HARDWARE_VICAM      34
00338 #define VID_HARDWARE_SF16FMR2   35
00339 #define VID_HARDWARE_W9968CF    36
00340 #endif /* __LINUX_VIDEODEV_H */
00341 
00342 /*
00343  * Local variables:
00344  * c-basic-offset: 8
00345  * End:
00346  */

kstars

Skip menu "kstars"
  • Main Page
  • Modules
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Class Members
  • Related Pages

API Reference

Skip menu "API Reference"
  • keduca
  • kstars
Generated for API Reference by doxygen 1.5.9
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal