[MPlayer-dev-eng] [PATCH] tv channels fine tuning

Ivan Szanto szivan at duticai.TWI.TUDelft.NL
Mon Apr 7 01:56:04 CEST 2003


Hi,


my TV provider has some channels that just don't
fit the europe-west scheme. This is solved in xawtv
by supplying some fine-tuning parameters in ~/.xawtv

I think it would be nice to solve this problem
similarly to xawtv, cause then everyone could use
the same config for both programs.

Please see the attached "patch" that contains such
a solution. Example channel settings:

  channels=e9-NL1,47-Net5+17

The second one is an example with fine tuning:
it adds some fine tuning value to the standard
Western-European channel setting of 47.

An alternative solution to the same problem could be
to enable the user to supply frequency values directly.
I'd be happy with that, too (and happy to write another
"patch" for that).

Please let me know what you think.

Ivan
-------------- next part --------------
--- main/libmpdemux/tv.c	Sun Mar 23 15:05:14 2003
+++ main-chans/libmpdemux/tv.c	Sun Apr  6 20:19:43 2003
@@ -298,6 +298,17 @@
 	        if (tv_channel_current->freq == 0)
 		    mp_msg(MSGT_TV, MSGL_ERR, "Couldn't find frequency for channel %s (%s)\n",
 				    tv_channel_current->number, tv_channel_current->name);
+		else {
+		  sep = strchr(tv_channel_current->name, '-');
+		  if ( !sep ) sep = strchr(tv_channel_current->name, '+');
+
+		  if ( sep ) {
+		    i = atoi (sep+1);
+		    if ( sep[0] == '+' ) tv_channel_current->freq += i * 100;
+		    if ( sep[0] == '-' ) tv_channel_current->freq -= i * 100;
+		    sep[0] = '\0';
+		  }
+		}
 
 		/*mp_msg(MSGT_TV, MSGL_INFO, "-- Detected channel %s - %s (%5.3f)\n",
 				tv_channel_current->number, tv_channel_current->name,


More information about the MPlayer-dev-eng mailing list