diff stream/tv.h @ 24105:9e71e0345c35

Automatic TV channels scanning ability for MPlayer. Code is based on patch from Otvos Attila oattila at chello dot hu
author voroshil
date Thu, 23 Aug 2007 16:09:30 +0000
parents dc135842ac89
children 820df52200db
line wrap: on
line diff
--- a/stream/tv.h	Thu Aug 23 14:20:31 2007 +0000
+++ b/stream/tv.h	Thu Aug 23 16:09:30 2007 +0000
@@ -50,6 +50,10 @@
     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 @@
     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_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 @@
 #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_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