From f1fbca4bdd35b7ceb636dac0b979fa1acca9e609 Mon Sep 17 00:00:00 2001 From: voroshil Date: Thu, 23 Aug 2007 16:09:30 +0000 Subject: Automatic TV channels scanning ability for MPlayer. Code is based on patch from Otvos Attila oattila at chello dot hu git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24125 b3059339-0415-0410-9bf9-f77b7e298cf2 --- stream/tv.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'stream/tv.h') diff --git a/stream/tv.h b/stream/tv.h index 415fa2c006..c61c4b6c87 100644 --- a/stream/tv.h +++ b/stream/tv.h @@ -50,6 +50,10 @@ typedef struct tv_param_s { char *tdevice; ///< teletext device int tformat; ///< teletext display format int tpage; ///< start teletext page + + int scan; + int scan_threshold; + float scan_period; } tv_param_t; extern tv_param_t stream_tv_defaults; @@ -86,6 +90,7 @@ typedef struct tvi_handle_s { const struct CHANLIST *chanlist_s; int channel; tv_param_t * tv_param; + void * scan; } tvi_handle_t; typedef struct tv_channels_s { @@ -101,6 +106,12 @@ extern tv_channels_t *tv_channel_list; extern tv_channels_t *tv_channel_current, *tv_channel_last; extern char *tv_channel_last_real; +typedef struct { + unsigned int scan_timer; + int channel_num; + int new_channels; +} tv_scan_t; + #define TVI_CONTROL_FALSE 0 #define TVI_CONTROL_TRUE 1 #define TVI_CONTROL_NA -1 @@ -147,6 +158,7 @@ extern char *tv_channel_last_real; #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 +#define TVI_CONTROL_TUN_GET_SIGNAL 0x207 /* AUDIO controls */ #define TVI_CONTROL_AUD_GET_FORMAT 0x301 @@ -215,10 +227,13 @@ int tv_step_chanlist(tvi_handle_t *tvh); int tv_set_freq(tvi_handle_t *tvh, unsigned long freq); int tv_get_freq(tvi_handle_t *tvh, unsigned long *freq); +int tv_get_signal(tvi_handle_t *tvh); int tv_step_freq(tvi_handle_t *tvh, float step_interval); int tv_set_norm(tvi_handle_t *tvh, char* norm); +void tv_start_scan(tvi_handle_t *tvh, int start); + #define TV_NORM_PAL 1 #define TV_NORM_NTSC 2 #define TV_NORM_SECAM 3 -- cgit v1.2.3