diff options
author | phintuka <phintuka> | 2012-03-23 18:36:29 +0000 |
---|---|---|
committer | phintuka <phintuka> | 2012-03-23 18:36:29 +0000 |
commit | 4c55cc13dd81c3ea62cd724ff654df5ebd593018 (patch) | |
tree | ad5bb1eb33183e182337e8ce44be971eadc24f52 | |
parent | 6277587391a6abbc6cecfc7a7795d53fde243b33 (diff) | |
download | xineliboutput-4c55cc13dd81c3ea62cd724ff654df5ebd593018.tar.gz xineliboutput-4c55cc13dd81c3ea62cd724ff654df5ebd593018.tar.bz2 |
Use metronom set_option() to set trick speed and still modes
-rw-r--r-- | xine/xvdr_metronom.c | 24 | ||||
-rw-r--r-- | xine/xvdr_metronom.h | 5 | ||||
-rw-r--r-- | xine_input_vdr.c | 8 |
3 files changed, 16 insertions, 21 deletions
diff --git a/xine/xvdr_metronom.c b/xine/xvdr_metronom.c index 81d2e287..b379381a 100644 --- a/xine/xvdr_metronom.c +++ b/xine/xvdr_metronom.c @@ -4,7 +4,7 @@ * See the main source file 'xineliboutput.c' for copyright information and * how to reach the author. * - * $Id: xvdr_metronom.c,v 1.17 2012-03-07 07:56:02 phintuka Exp $ + * $Id: xvdr_metronom.c,v 1.18 2012-03-23 18:36:29 phintuka Exp $ * */ @@ -109,6 +109,16 @@ static void set_option(metronom_t *metronom, int option, int64_t value) return; } + if (option == XVDR_METRONOM_TRICK_SPEED) { + this->trickspeed = value; + return; + } + + if (option == XVDR_METRONOM_STILL_MODE) { + this->still_mode = value; + return; + } + this->orig_metronom->set_option(this->orig_metronom, option, value); } @@ -177,16 +187,6 @@ static void xvdr_metronom_reset_frames(xvdr_metronom_t *this) this->video_frames = this->audio_frames = 0; } -static void xvdr_metronom_set_trickspeed(xvdr_metronom_t *this, int trickspeed) -{ - this->trickspeed = trickspeed; -} - -static void xvdr_metronom_set_still_mode(xvdr_metronom_t *this, int still_mode) -{ - this->still_mode = still_mode; -} - static void xvdr_metronom_wire(xvdr_metronom_t *this) { if (!this->stream) { @@ -244,8 +244,6 @@ xvdr_metronom_t *xvdr_metronom_init(xine_stream_t *stream) this->set_cb = xvdr_metronom_set_cb; this->reset_frames = xvdr_metronom_reset_frames; - this->set_trickspeed = xvdr_metronom_set_trickspeed; - this->set_still_mode = xvdr_metronom_set_still_mode; this->wire = xvdr_metronom_wire; this->unwire = xvdr_metronom_unwire; this->dispose = xvdr_metronom_dispose; diff --git a/xine/xvdr_metronom.h b/xine/xvdr_metronom.h index 96393a22..10e6c1af 100644 --- a/xine/xvdr_metronom.h +++ b/xine/xvdr_metronom.h @@ -4,7 +4,7 @@ * See the main source file 'xineliboutput.c' for copyright information and * how to reach the author. * - * $Id: xvdr_metronom.h,v 1.9 2012-03-22 12:18:51 phintuka Exp $ + * $Id: xvdr_metronom.h,v 1.10 2012-03-23 18:36:29 phintuka Exp $ * */ @@ -32,9 +32,6 @@ struct xvdr_metronom_s { void (*reset_frames)(xvdr_metronom_t *); void (*dispose) (xvdr_metronom_t *); - void (*set_trickspeed)(xvdr_metronom_t *, int); - void (*set_still_mode)(xvdr_metronom_t *, int); - void (*wire) (xvdr_metronom_t *); void (*unwire) (xvdr_metronom_t *); diff --git a/xine_input_vdr.c b/xine_input_vdr.c index 12dc71db..0690b886 100644 --- a/xine_input_vdr.c +++ b/xine_input_vdr.c @@ -4,7 +4,7 @@ * See the main source file 'xineliboutput.c' for copyright information and * how to reach the author. * - * $Id: xine_input_vdr.c,v 1.358 2012-03-22 12:03:37 phintuka Exp $ + * $Id: xine_input_vdr.c,v 1.359 2012-03-23 18:36:28 phintuka Exp $ * */ @@ -136,7 +136,7 @@ typedef struct { # include <linux/unistd.h> /* syscall(__NR_gettid) */ #endif -static const char module_revision[] = "$Id: xine_input_vdr.c,v 1.358 2012-03-22 12:03:37 phintuka Exp $"; +static const char module_revision[] = "$Id: xine_input_vdr.c,v 1.359 2012-03-23 18:36:28 phintuka Exp $"; static const char log_module_input_vdr[] = "[input_vdr] "; #define LOG_MODULENAME log_module_input_vdr #define SysLogLevel iSysLogLevel @@ -1574,7 +1574,7 @@ static void set_still_mode(vdr_input_plugin_t *this, int still_mode) if (this->still_mode) reset_scr_tuning(this); - this->metronom->set_still_mode(this->metronom, still_mode); + this->stream->metronom->set_option(this->stream->metronom, XVDR_METRONOM_STILL_MODE, still_mode); } /* @@ -1646,7 +1646,7 @@ static void set_trick_speed(vdr_input_plugin_t *this, int speed, int backwards) if (this->slave.stream) backwards = 0; - this->metronom->set_trickspeed(this->metronom, backwards ? speed : 0); + this->stream->metronom->set_option(this->stream->metronom, XVDR_METRONOM_TRICK_SPEED, backwards ? speed : 0); if (speed > 1 || speed < -1) { CHECK_FALSE(this->live_mode); |