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

Enable rc fastforward and rewind commands for RTSP trickplay.

parent 8623a973
...@@ -1085,16 +1085,34 @@ static int Input( vlc_object_t *p_this, char const *psz_cmd, ...@@ -1085,16 +1085,34 @@ static int Input( vlc_object_t *p_this, char const *psz_cmd,
return VLC_SUCCESS; return VLC_SUCCESS;
} }
else if ( !strcmp( psz_cmd, "fastforward" ) ) else if ( !strcmp( psz_cmd, "fastforward" ) )
{
if( var_GetBool( p_input, "can-rewind" ) )
{
int i_rate = var_GetInteger( p_input, "rate" );
i_rate = (i_rate < 0) ? -i_rate : i_rate * 2;
var_SetInteger( p_input, "rate", i_rate );
}
else
{ {
val.i_int = config_GetInt( p_intf, "key-jump+extrashort" ); val.i_int = config_GetInt( p_intf, "key-jump+extrashort" );
var_Set( p_intf->p_libvlc, "key-pressed", val ); var_Set( p_intf->p_libvlc, "key-pressed", val );
}
vlc_object_release( p_input ); vlc_object_release( p_input );
return VLC_SUCCESS; return VLC_SUCCESS;
} }
else if ( !strcmp( psz_cmd, "rewind" ) ) else if ( !strcmp( psz_cmd, "rewind" ) )
{
if( var_GetBool( p_input, "can-rewind" ) )
{
int i_rate = var_GetInteger( p_input, "rate" );
i_rate = (i_rate > 0) ? -i_rate : i_rate / 2;
var_SetInteger( p_input, "rate", i_rate );
}
else
{ {
val.i_int = config_GetInt( p_intf, "key-jump-extrashort" ); val.i_int = config_GetInt( p_intf, "key-jump-extrashort" );
var_Set( p_intf->p_libvlc, "key-pressed", val ); var_Set( p_intf->p_libvlc, "key-pressed", val );
}
vlc_object_release( p_input ); vlc_object_release( p_input );
return VLC_SUCCESS; return VLC_SUCCESS;
} }
......
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