[Mplayer-cvslog] CVS: main/libmpdemux tv.c,1.34,1.35
Alex Beregszaszi
alex at mplayerhq.hu
Sat Oct 19 22:55:09 CEST 2002
- Previous message: [Mplayer-cvslog] CVS: main/help help_mp-bg.h,1.6,1.7 help_mp-cz.h,1.25,1.26 help_mp-de.h,1.54,1.55 help_mp-dk.h,1.15,1.16 help_mp-en.h,1.63,1.64 help_mp-es.h,1.13,1.14 help_mp-fr.h,1.20,1.21 help_mp-gr.h,1.4,1.5 help_mp-hu.h,1.52,1.53 help_mp-it.h,1.11,1.12 help_mp-ko.h,1.8,1.9 help_mp-nl.h,1.19,1.20 help_mp-no.h,1.10,1.11 help_mp-pl.h,1.54,1.55 help_mp-pt_BR.h,1.5,1.6 help_mp-ro.h,1.7,1.8 help_mp-ru.h,1.14,1.15 help_mp-sk.h,1.7,1.8 help_mp-uk.h,1.4,1.5 help_mp-zh.h,1.8,1.9
- Next message: [Mplayer-cvslog] CVS: main/libmpdemux tv.c,1.35,1.36
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/mplayer/main/libmpdemux
In directory mail:/var/tmp.root/cvs-serv28379
Modified Files:
tv.c
Log Message:
set position in channel list on startup. note: hope one day we will get cleaned the int->float->int sutff ;)
Index: tv.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/tv.c,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -r1.34 -r1.35
--- tv.c 22 Sep 2002 02:33:26 -0000 1.34
+++ tv.c 19 Oct 2002 20:55:06 -0000 1.35
@@ -244,6 +244,25 @@
}
}
}
+
+ /* grep frequency in chanlist */
+ {
+ unsigned long i2;
+ int freq;
+
+ tv_get_freq(tvh, &i2);
+
+ freq = (int) (((float)(i2/16))*1000)+250;
+
+ for (i = 0; i < chanlists[tvh->chanlist].count; i++)
+ {
+ if (tvh->chanlist_s[i].freq == freq)
+ {
+ tvh->channel = i+1;
+ break;
+ }
+ }
+ }
done:
/* also start device! */
@@ -388,13 +407,11 @@
return 1;
}
-#if defined(USE_TV) && defined(HAVE_TV_V4L)
int demux_close_tv(demuxer_t *demuxer)
{
tvi_handle_t *tvh=(tvi_handle_t*)(demuxer->priv);
return(tvh->functions->uninit(tvh->priv));
}
-#endif
/* ================== STREAM_TV ===================== */
tvi_handle_t *tvi_init_dummy(char *device);
@@ -513,6 +530,17 @@
mp_msg(MSGT_TV, MSGL_WARN, "Unknown color option (%d) specified!\n", opt);
}
+ return(1);
+}
+
+int tv_get_freq(tvi_handle_t *tvh, unsigned long *freq)
+{
+ if (tvh->functions->control(tvh->priv, TVI_CONTROL_IS_TUNER, 0) == TVI_CONTROL_TRUE)
+ {
+ tvh->functions->control(tvh->priv, TVI_CONTROL_TUN_GET_FREQ, freq);
+ mp_msg(MSGT_TV, MSGL_V, "Current frequency: %lu (%.3f)\n",
+ *freq, (float)*freq/16);
+ }
return(1);
}
- Previous message: [Mplayer-cvslog] CVS: main/help help_mp-bg.h,1.6,1.7 help_mp-cz.h,1.25,1.26 help_mp-de.h,1.54,1.55 help_mp-dk.h,1.15,1.16 help_mp-en.h,1.63,1.64 help_mp-es.h,1.13,1.14 help_mp-fr.h,1.20,1.21 help_mp-gr.h,1.4,1.5 help_mp-hu.h,1.52,1.53 help_mp-it.h,1.11,1.12 help_mp-ko.h,1.8,1.9 help_mp-nl.h,1.19,1.20 help_mp-no.h,1.10,1.11 help_mp-pl.h,1.54,1.55 help_mp-pt_BR.h,1.5,1.6 help_mp-ro.h,1.7,1.8 help_mp-ru.h,1.14,1.15 help_mp-sk.h,1.7,1.8 help_mp-uk.h,1.4,1.5 help_mp-zh.h,1.8,1.9
- Next message: [Mplayer-cvslog] CVS: main/libmpdemux tv.c,1.35,1.36
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the MPlayer-cvslog
mailing list