diff options
author | voroshil <voroshil@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2007-03-17 11:51:17 +0000 |
---|---|---|
committer | voroshil <voroshil@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2007-03-17 11:51:17 +0000 |
commit | 94674443a39349c459274668301f2d52a3f95820 (patch) | |
tree | 4c306f9dfcef836ab452f4cd56fd958c29c95a6e /stream | |
parent | 1ea573c3bd06bb406bcd2d0e0db5fa72026c772d (diff) | |
download | mpv-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')
-rw-r--r-- | stream/tv.c | 15 | ||||
-rw-r--r-- | stream/tv.h | 1 |
2 files changed, 16 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; diff --git a/stream/tv.h b/stream/tv.h index 509dfcf9d6..59deda41eb 100644 --- a/stream/tv.h +++ b/stream/tv.h @@ -184,6 +184,7 @@ int tv_step_chanlist(tvi_handle_t *tvh); int tv_set_freq(tvi_handle_t *tvh, unsigned long freq); int tv_get_freq(tvi_handle_t *tvh, unsigned long *freq); +int tv_step_freq(tvi_handle_t *tvh, float step_interval); int tv_set_norm(tvi_handle_t *tvh, char* norm); |