summaryrefslogtreecommitdiffstats
path: root/stream/tv.c
diff options
context:
space:
mode:
authorvoroshil <voroshil@b3059339-0415-0410-9bf9-f77b7e298cf2>2007-03-17 11:51:17 +0000
committervoroshil <voroshil@b3059339-0415-0410-9bf9-f77b7e298cf2>2007-03-17 11:51:17 +0000
commit94674443a39349c459274668301f2d52a3f95820 (patch)
tree4c306f9dfcef836ab452f4cd56fd958c29c95a6e /stream/tv.c
parent1ea573c3bd06bb406bcd2d0e0db5fa72026c772d (diff)
downloadmpv-94674443a39349c459274668301f2d52a3f95820.tar.bz2
mpv-94674443a39349c459274668301f2d52a3f95820.tar.xz
New slave command: tv_step_freq <offset in MHz>
Command sets the TV frequency relative to current value git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22685 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'stream/tv.c')
-rw-r--r--stream/tv.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/stream/tv.c b/stream/tv.c
index b3bcc37923..8fe173c3bb 100644
--- a/stream/tv.c
+++ b/stream/tv.c
@@ -781,6 +781,21 @@ int tv_set_freq(tvi_handle_t *tvh, unsigned long freq)
return(1);
}
+/*****************************************************************
+ * \brief tune current frequency by step_interval value
+ * \parameter step_interval increment value in 1/16 MHz
+ * \note frequency is rounded to 1/16 MHz value
+ * \return 1
+ *
+ */
+int tv_step_freq(tvi_handle_t* tvh, float step_interval){
+ unsigned long frequency;
+
+ tv_get_freq(tvh,&frequency);
+ frequency+=step_interval;
+ return tv_set_freq(tvh,frequency);
+}
+
int tv_step_channel_real(tvi_handle_t *tvh, int direction)
{
struct CHANLIST cl;