Commit db41a5c2 authored by Jean-Paul Saman's avatar Jean-Paul Saman

Add can-rate to distinguish between normal rate control and negative playback direction.

(cherry picked from commit: f400b143)
Signed-off-by: default avatarJean-Paul Saman <jpsaman@videolan.org>
parent 17014fad
......@@ -1088,7 +1088,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;
......
......@@ -2203,6 +2203,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 );
var_SetBool( p_input, "can-rate", in->b_can_rate_control );
var_SetBool( p_input, "can-rewind", !in->b_rescale_ts );
int ret = demux_Control( in->p_demux, DEMUX_CAN_SEEK,
......@@ -2290,6 +2291,7 @@ static int InputSourceInit( input_thread_t *p_input,
&in->b_can_pause );
var_SetBool( p_input, "can-pause", in->b_can_pause );
var_SetBool( p_input, "can-rate", in->b_can_rate_control );
var_SetBool( p_input, "can-rewind", !in->b_rescale_ts );
access_Control( in->p_access, ACCESS_CAN_SEEK,
......
......@@ -473,6 +473,9 @@ void input_ConfigVarInit ( input_thread_t *p_input )
val.b_bool = true; /* Fixed later*/
var_Change( p_input, "can-pause", VLC_VAR_SETVALUE, &val, NULL );
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 );
val.b_bool = false;
var_Change( p_input, "can-rewind", VLC_VAR_SETVALUE, &val, NULL );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment