Commit a0372878 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Allow setting the playback rate from configuration

parent 918c70cf
......@@ -346,7 +346,11 @@ static input_thread_t *Create( vlc_object_t *p_parent, input_item_t *p_item,
p_input->p->title = NULL;
p_input->p->i_title_offset = p_input->p->i_seekpoint_offset = 0;
p_input->p->i_state = INIT_S;
p_input->p->i_rate = INPUT_RATE_DEFAULT;
p_input->p->i_rate = INPUT_RATE_DEFAULT
/ var_CreateGetFloat( p_input, "rate" );
/* Currently, the input rate variable is an integer. So we need to destroy
* the float variable inherited from the configuration. */
var_Destroy( p_input, "rate" );
p_input->p->b_recording = false;
memset( &p_input->p->bookmark, 0, sizeof(p_input->p->bookmark) );
TAB_INIT( p_input->p->i_bookmark, p_input->p->pp_bookmark );
......
......@@ -727,6 +727,10 @@ static const char *const ppsz_clock_descriptions[] =
#define INPUT_FAST_SEEK_LONGTEXT N_( \
"Favor speed over precision while seeking" )
#define INPUT_RATE_TEXT N_("Playback speed")
#define INPUT_RATE_LONGTEXT N_( \
"This defines the playback speed (nominal speed is 1.0)." )
#define INPUT_LIST_TEXT N_("Input list")
#define INPUT_LIST_LONGTEXT N_( \
"You can give a comma-separated list " \
......@@ -1794,6 +1798,8 @@ vlc_module_begin ()
add_bool( "input-fast-seek", false, NULL,
INPUT_FAST_SEEK_TEXT, INPUT_FAST_SEEK_LONGTEXT, false )
change_safe ()
add_float( "rate", 1., NULL,
INPUT_RATE_TEXT, INPUT_RATE_LONGTEXT, false )
add_string( "input-list", NULL, NULL,
INPUT_LIST_TEXT, INPUT_LIST_LONGTEXT, true )
......
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