2000-08-12 15:11:46 +00:00
|
|
|
#define VIDEO_RGB08 1 /* bt848 dithered */
|
|
|
|
#define VIDEO_GRAY 2
|
|
|
|
#define VIDEO_RGB15_LE 3 /* 15 bpp little endian */
|
|
|
|
#define VIDEO_RGB16_LE 4 /* 16 bpp little endian */
|
|
|
|
#define VIDEO_RGB15_BE 5 /* 15 bpp big endian */
|
|
|
|
#define VIDEO_RGB16_BE 6 /* 16 bpp big endian */
|
|
|
|
#define VIDEO_BGR24 7 /* bgrbgrbgrbgr (LE) */
|
|
|
|
#define VIDEO_BGR32 8 /* bgr-bgr-bgr- (LE) */
|
|
|
|
#define VIDEO_RGB24 9 /* rgbrgbrgbrgb (BE)*/
|
|
|
|
#define VIDEO_RGB32 10 /* -rgb-rgb-rgb (BE)*/
|
|
|
|
#define VIDEO_LUT2 11 /* lookup-table 2 byte depth */
|
|
|
|
#define VIDEO_LUT4 12 /* lookup-table 4 byte depth */
|
|
|
|
|
|
|
|
#define CAN_AUDIO_VOLUME 1
|
|
|
|
|
|
|
|
#define TRAP(txt) fprintf(stderr,"%s:%d:%s\n",__FILE__,__LINE__,txt);exit(1);
|
|
|
|
|
|
|
|
/* ------------------------------------------------------------------------- */
|
|
|
|
|
|
|
|
struct STRTAB {
|
|
|
|
long nr;
|
|
|
|
char *str;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct OVERLAY_CLIP {
|
|
|
|
int x1,x2,y1,y2;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct GRABBER {
|
|
|
|
char *name;
|
|
|
|
int flags;
|
|
|
|
struct STRTAB *norms;
|
|
|
|
struct STRTAB *inputs;
|
|
|
|
|
|
|
|
int (*grab_open)(char *opt);
|
2000-09-19 03:48:08 +00:00
|
|
|
int (*grab_close)(void);
|
2000-08-12 15:11:46 +00:00
|
|
|
|
|
|
|
int (*grab_setupfb)(int sw, int sh, int format, void *base, int bpl);
|
|
|
|
int (*grab_overlay)(int x, int y, int width, int height, int format,
|
2000-09-19 03:48:08 +00:00
|
|
|
struct OVERLAY_CLIP *oc, int count);
|
2000-08-12 15:11:46 +00:00
|
|
|
|
|
|
|
int (*grab_setparams)(int format, int *width, int *height, int *linelength);
|
|
|
|
void* (*grab_capture)(int single);
|
2000-09-19 03:48:08 +00:00
|
|
|
void (*grab_cleanup)(void);
|
2000-08-12 15:11:46 +00:00
|
|
|
|
|
|
|
int (*grab_tune)(unsigned long freq);
|
|
|
|
int (*grab_tuned)(void);
|
|
|
|
int (*grab_input)(int input, int norm);
|
|
|
|
int (*grab_picture)(int color, int bright, int hue, int contrast);
|
|
|
|
int (*grab_audio)(int mute, int volume, int *mode);
|
|
|
|
};
|
|
|
|
|
|
|
|
/* ------------------------------------------------------------------------- */
|
|
|
|
|
|
|
|
extern int debug;
|
|
|
|
extern int have_dga;
|
|
|
|
|
|
|
|
extern char *device;
|
|
|
|
extern int fd_grab;
|
|
|
|
extern struct GRABBER *grabber;
|
|
|
|
|
|
|
|
extern unsigned int format2depth[];
|
|
|
|
extern unsigned char* format_desc[];
|
|
|
|
|
|
|
|
/* ------------------------------------------------------------------------- */
|
|
|
|
|
|
|
|
int grabber_open(int sw, int sh, void *base, int format, int width);
|
|
|
|
int grabber_setparams(int format, int *width, int *height,
|
2000-09-19 03:48:08 +00:00
|
|
|
int *linelength, int lut_valid);
|
2000-08-12 15:11:46 +00:00
|
|
|
void* grabber_capture(void *dest, int dest_linelength, int single);
|