[vlc-devel] commit: Add can-rate to distinguish between normal rate control and negative playback direction . (Jean-Paul Saman )
git version control
git at videolan.org
Fri Nov 21 12:34:13 CET 2008
vlc | branch: master | Jean-Paul Saman <jean-paul.saman at m2x.nl> | Fri Nov 21 11:48:18 2008 +0100| [f400b1431cbb7abfced4042def176cf2f905ec5a] | committer: Jean-Paul Saman
Add can-rate to distinguish between normal rate control and negative playback direction.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=f400b1431cbb7abfced4042def176cf2f905ec5a
---
modules/control/rc.c | 2 +-
src/input/input.c | 2 ++
src/input/var.c | 3 +++
3 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/modules/control/rc.c b/modules/control/rc.c
index 7ced84f..92f7202 100644
--- a/modules/control/rc.c
+++ b/modules/control/rc.c
@@ -1086,7 +1086,7 @@ static int Input( vlc_object_t *p_this, char const *psz_cmd,
}
else if ( !strcmp( psz_cmd, "fastforward" ) )
{
- if( var_GetBool( p_input, "can-rewind" ) )
+ if( var_GetBool( p_input, "can-rate" ) )
{
int i_rate = var_GetInteger( p_input, "rate" );
i_rate = (i_rate < 0) ? -i_rate : i_rate * 2;
diff --git a/src/input/input.c b/src/input/input.c
index 50fdac8..b054373 100644
--- a/src/input/input.c
+++ b/src/input/input.c
@@ -2381,6 +2381,7 @@ static int InputSourceInit( input_thread_t *p_input,
&in->b_can_pause ) )
in->b_can_pause = false;
var_SetBool( p_input, "can-pause", in->b_can_pause || !in->b_can_pace_control ); /* XXX temporary because of es_out_timeshift*/
+ var_SetBool( p_input, "can-rate", !in->b_can_pace_control || in->b_can_rate_control ); /* XXX temporary because of es_out_timeshift*/
var_SetBool( p_input, "can-rewind", !in->b_rescale_ts && !in->b_can_pace_control );
int ret = demux_Control( in->p_demux, DEMUX_CAN_SEEK,
@@ -2466,6 +2467,7 @@ static int InputSourceInit( input_thread_t *p_input,
access_Control( in->p_access, ACCESS_CAN_PAUSE,
&in->b_can_pause );
var_SetBool( p_input, "can-pause", in->b_can_pause || !in->b_can_pace_control ); /* XXX temporary because of es_out_timeshift*/
+ var_SetBool( p_input, "can-rate", !in->b_can_pace_control || in->b_can_rate_control ); /* XXX temporary because of es_out_timeshift*/
var_SetBool( p_input, "can-rewind", !in->b_rescale_ts && !in->b_can_pace_control );
access_Control( in->p_access, ACCESS_CAN_SEEK,
diff --git a/src/input/var.c b/src/input/var.c
index 7e0878b..04e70d7 100644
--- a/src/input/var.c
+++ b/src/input/var.c
@@ -479,6 +479,9 @@ void input_ConfigVarInit ( input_thread_t *p_input )
var_Create( p_input, "can-pause", VLC_VAR_BOOL );
var_SetBool( p_input, "can-pause", true ); /* Fixed later*/
+ var_Create( p_input, "can-rate", VLC_VAR_BOOL );
+ var_SetBool( p_input, "can-rate", false );
+
var_Create( p_input, "can-rewind", VLC_VAR_BOOL );
var_SetBool( p_input, "can-rewind", false );
More information about the vlc-devel
mailing list