[Mplayer-cvslog] CVS: main/libmpdemux tv.c,1.43,1.44 tv.h,1.19,1.20
Jindrich Makovicka CVS
henry at mplayerhq.hu
Thu Dec 19 11:09:45 CET 2002
Update of /cvsroot/mplayer/main/libmpdemux
In directory mail:/var/tmp.root/cvs-serv17091/libmpdemux
Modified Files:
tv.c tv.h
Log Message:
add a TV_SET_CNANNEL command
Index: tv.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/tv.c,v
retrieving revision 1.43
retrieving revision 1.44
diff -u -r1.43 -r1.44
--- tv.c 16 Dec 2002 23:38:56 -0000 1.43
+++ tv.c 19 Dec 2002 10:09:43 -0000 1.44
@@ -554,6 +554,27 @@
return(1);
}
+int tv_set_channel(tvi_handle_t *tvh, char *channel)
+{
+ int i;
+ struct CHANLIST cl;
+
+ for (i = 0; i < chanlists[tvh->chanlist].count; i++)
+ {
+ cl = tvh->chanlist_s[i];
+// printf("count%d: name: %s, freq: %d\n",
+// i, cl.name, cl.freq);
+ if (!strcasecmp(cl.name, channel))
+ {
+ tvh->channel = i;
+ mp_msg(MSGT_TV, MSGL_INFO, "Selected channel: %s (freq: %.3f)\n",
+ cl.name, (float)cl.freq/1000);
+ tv_set_freq(tvh, (unsigned long)(((float)cl.freq/1000)*16));
+ break;
+ }
+ }
+}
+
int tv_step_norm(tvi_handle_t *tvh)
{
return(1);
Index: tv.h
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/tv.h,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- tv.h 16 Dec 2002 17:05:49 -0000 1.19
+++ tv.h 19 Dec 2002 10:09:43 -0000 1.20
@@ -148,6 +148,8 @@
#define TV_CHANNEL_LOWER 1
#define TV_CHANNEL_HIGHER 2
+int tv_set_channel(tvi_handle_t *tvh, char *channel);
+
int tv_step_norm(tvi_handle_t *tvh);
int tv_step_chanlist(tvi_handle_t *tvh);
More information about the MPlayer-cvslog
mailing list