Commit 7093e62c authored by Thomas Guillem's avatar Thomas Guillem

input: handle "sub-fps" callback (legacy)

Remainder: all these legacy variable callbacks will be removed when the new
player is used.
parent 6d97630b
......@@ -76,6 +76,9 @@ static int RecordCallback( vlc_object_t *p_this, char const *psz_cmd,
static int FrameNextCallback( vlc_object_t *p_this, char const *psz_cmd,
vlc_value_t oldval, vlc_value_t newval,
void *p_data );
static int SubFpsCallback( vlc_object_t *p_this, char const *psz_cmd,
vlc_value_t oldval, vlc_value_t newval,
void *p_data );
static void input_LegacyVarTitle( input_thread_t *p_input, int i_title );
static void input_LegacyVarNavigation( input_thread_t *p_input );
......@@ -110,6 +113,7 @@ static const vlc_input_callback_t p_input_callbacks[] =
CALLBACK( "spu-es", EsSpuCallback ),
CALLBACK( "record", RecordCallback ),
CALLBACK( "frame-next", FrameNextCallback ),
CALLBACK( "sub-fps", SubFpsCallback ),
CALLBACK( NULL, NULL )
};
......@@ -533,6 +537,7 @@ void input_LegacyVarInit ( input_thread_t *p_input )
/* Special "intf-event" variable. */
var_Create( p_input, "intf-event", VLC_VAR_INTEGER );
var_Create( p_input, "sub-fps", VLC_VAR_FLOAT | VLC_VAR_DOINHERIT );
/* Add all callbacks
* XXX we put callback only in non preparsing mode. We need to create the variable
......@@ -1113,3 +1118,15 @@ static int FrameNextCallback( vlc_object_t *p_this, char const *psz_cmd,
return VLC_SUCCESS;
}
static int SubFpsCallback( vlc_object_t *p_this, char const *psz_cmd,
vlc_value_t oldval, vlc_value_t newval,
void *p_data )
{
input_thread_t *p_input = (input_thread_t*)p_this;
VLC_UNUSED(psz_cmd); VLC_UNUSED(oldval); VLC_UNUSED(p_data);
VLC_UNUSED(newval);
input_ControlPushHelper( p_input, INPUT_CONTROL_SET_SUBS_FPS, &newval );
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