var_Change( p_input, "state", VLC_VAR_SETVALUE, &val, NULL );
/* Rate */
- var_Create( p_input, "rate", VLC_VAR_INTEGER );
- val.i_int = p_input->p->i_rate;
+ var_Create( p_input, "rate", VLC_VAR_FLOAT );
+ val.f_float = (float)INPUT_RATE_DEFAULT / (float)p_input->p->i_rate;
var_Change( p_input, "rate", VLC_VAR_SETVALUE, &val, NULL );
var_Create( p_input, "rate-slower", VLC_VAR_VOID );
text.psz_string = _("Subtitles Track");
var_Change( p_input, "spu-es", VLC_VAR_SETTEXT, &text, NULL );
+ var_Create( p_input, "sub-margin", VLC_VAR_INTEGER | VLC_VAR_DOINHERIT );
+
/* Special read only objects variables for intf */
var_Create( p_input, "bookmarks", VLC_VAR_STRING | VLC_VAR_DOINHERIT );
val.i_time = 0;
var_Change( p_input, "length", VLC_VAR_SETVALUE, &val, NULL );
+ var_Create( p_input, "bit-rate", VLC_VAR_INTEGER );
+ var_Create( p_input, "sample-rate", VLC_VAR_INTEGER );
+
if( !p_input->b_preparsing )
{
/* Special "intf-event" variable. */
input_thread_t *p_input = (input_thread_t*)p_this;
VLC_UNUSED(oldval); VLC_UNUSED(p_data);
- /* Problem with this way: the "rate" variable is update after the input thread do the change */
+ /* Problem with this way: the "rate" variable is updated after the
+ * input thread did the change */
+
if( !strcmp( psz_cmd, "rate-slower" ) )
{
input_ControlPush( p_input, INPUT_CONTROL_SET_RATE_SLOWER, NULL );
}
else
{
+ newval.i_int = INPUT_RATE_DEFAULT / newval.f_float;
input_ControlPush( p_input, INPUT_CONTROL_SET_RATE, &newval );
}
return VLC_SUCCESS;