diff options
author | alex <alex@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2001-11-10 23:32:10 +0000 |
---|---|---|
committer | alex <alex@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2001-11-10 23:32:10 +0000 |
commit | fc363d39bc8a1aecc72b62c1108d7cc3b0b40a64 (patch) | |
tree | 7af9a7653c089d0c57bda269d4ffc82a2a97b789 /libmpdemux/tv.h | |
parent | 31dc28382695dd2fa4a86a9676113a4eb36010ec (diff) | |
download | mpv-fc363d39bc8a1aecc72b62c1108d7cc3b0b40a64.tar.bz2 mpv-fc363d39bc8a1aecc72b62c1108d7cc3b0b40a64.tar.xz |
tv update
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@2803 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpdemux/tv.h')
-rw-r--r-- | libmpdemux/tv.h | 84 |
1 files changed, 62 insertions, 22 deletions
diff --git a/libmpdemux/tv.h b/libmpdemux/tv.h index c9e7e6daa6..0241eddb03 100644 --- a/libmpdemux/tv.h +++ b/libmpdemux/tv.h @@ -1,7 +1,10 @@ #include "config.h" #ifdef USE_TV -extern float tv_param_freq; +#include "../libao2/afmt.h" +#include "../libvo/img_format.h" + +extern unsigned long tv_param_freq; extern char *tv_param_channel; extern char *tv_param_norm; extern int tv_param_on; @@ -9,6 +12,7 @@ extern char *tv_param_device; extern char *tv_param_driver; extern int tv_param_width; extern int tv_param_height; +extern int tv_param_input; typedef struct tvi_info_s { @@ -21,42 +25,78 @@ typedef struct tvi_info_s typedef struct tvi_functions_s { int (*init)(); - int (*exit)(); + int (*uninit)(); int (*control)(); + int (*start)(); int (*grab_video_frame)(); int (*get_video_framesize)(); int (*grab_audio_frame)(); int (*get_audio_framesize)(); } tvi_functions_t; +typedef struct tvi_param_s { + const char *opt; + void *value; +} tvi_param_t; + typedef struct tvi_handle_s { - tvi_info_t *info; - tvi_functions_t *functions; - void *priv; + tvi_info_t *info; + tvi_functions_t *functions; + void *priv; + tvi_param_t *params; + int seq; } tvi_handle_t; + #define TVI_CONTROL_FALSE 0 #define TVI_CONTROL_TRUE 1 #define TVI_CONTROL_NA -1 #define TVI_CONTROL_UNKNOWN -2 +/* ======================== CONTROLS =========================== */ + +/* GENERIC controls */ +#define TVI_CONTROL_IS_AUDIO 0x1 +#define TVI_CONTROL_IS_VIDEO 0x2 +#define TVI_CONTROL_IS_TUNER 0x3 + +/* VIDEO controls */ +#define TVI_CONTROL_VID_GET_FPS 0x101 +#define TVI_CONTROL_VID_GET_PLANES 0x102 +#define TVI_CONTROL_VID_GET_BITS 0x103 +#define TVI_CONTROL_VID_CHK_BITS 0x104 +#define TVI_CONTROL_VID_SET_BITS 0x105 +#define TVI_CONTROL_VID_GET_FORMAT 0x106 +#define TVI_CONTROL_VID_CHK_FORMAT 0x107 +#define TVI_CONTROL_VID_SET_FORMAT 0x108 +#define TVI_CONTROL_VID_GET_WIDTH 0x109 +#define TVI_CONTROL_VID_CHK_WIDTH 0x110 +#define TVI_CONTROL_VID_SET_WIDTH 0x111 +#define TVI_CONTROL_VID_GET_HEIGHT 0x112 +#define TVI_CONTROL_VID_CHK_HEIGHT 0x113 +#define TVI_CONTROL_VID_SET_HEIGHT 0x114 + +/* TUNER controls */ +#define TVI_CONTROL_TUN_GET_FREQ 0x201 +#define TVI_CONTROL_TUN_SET_FREQ 0x202 +#define TVI_CONTROL_TUN_GET_TUNER 0x203 /* update priv->tuner struct for used input */ +#define TVI_CONTROL_TUN_SET_TUNER 0x204 /* update priv->tuner struct for used input */ +#define TVI_CONTROL_TUN_GET_NORM 0x205 +#define TVI_CONTROL_TUN_SET_NORM 0x206 + +/* AUDIO controls */ +#define TVI_CONTROL_AUD_GET_FORMAT 0x301 +#define TVI_CONTROL_AUD_GET_SAMPLERATE 0x302 +#define TVI_CONTROL_AUD_GET_SAMPLESIZE 0x303 +#define TVI_CONTROL_AUD_GET_CHANNELS 0x304 + +/* SPECIFIC controls */ +#define TVI_CONTROL_SPC_GET_INPUT 0x401 /* set input channel (tv,s-video,composite..) */ +#define TVI_CONTROL_SPC_SET_INPUT 0x402 /* set input channel (tv,s-video,composite..) */ -#define TVI_CONTROL_VID_GET_FPS 1 -#define TVI_CONTROL_VID_GET_PLANES 2 -#define TVI_CONTROL_VID_GET_BITS 3 -#define TVI_CONTROL_VID_CHK_BITS 4 -#define TVI_CONTROL_VID_SET_BITS 5 -#define TVI_CONTROL_VID_GET_FORMAT 6 -#define TVI_CONTROL_VID_CHK_FORMAT 7 -#define TVI_CONTROL_VID_SET_FORMAT 8 -#define TVI_CONTROL_VID_GET_WIDTH 9 -#define TVI_CONTROL_VID_CHK_WIDTH 10 -#define TVI_CONTROL_VID_SET_WIDTH 11 -#define TVI_CONTROL_VID_GET_HEIGHT 12 -#define TVI_CONTROL_VID_CHK_HEIGHT 13 -#define TVI_CONTROL_VID_SET_HEIGHT 14 - -#define TVI_CONTROL_TUN_GET_FREQ 100 -#define TVI_CONTROL_TUN_SET_FREQ 101 +//extern int demux_tv_fill_buffer(demuxer_t *demux, tvi_handle_t *tvh); +//extern int demux_open_tv(demuxer_t *demux, tvi_handle_t *tvh); +extern tvi_handle_t *tv_begin(void); +extern int tv_init(tvi_handle_t *tvh); #endif /* USE_TV */ |