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

AoutInputsMarkToRestart: de-inline and rename

parent c2b1d5b2
......@@ -137,6 +137,7 @@ int aout_InputDelete( audio_output_t * p_aout, aout_input_t * p_input );
block_t *aout_InputPlay( audio_output_t *p_aout, aout_input_t *p_input,
block_t *p_buffer, int i_input_rate, date_t * );
void aout_InputCheckAndRestart( audio_output_t * p_aout, aout_input_t * p_input );
void aout_InputRequestRestart( audio_output_t *p_aout );
/* From filters.c : */
int aout_FiltersCreatePipeline( vlc_object_t *, filter_t **, int *,
......@@ -243,17 +244,4 @@ static inline void aout_unlock_volume( audio_output_t *p_aout )
#define aout_assert_locked( aout ) \
vlc_assert_locked( &aout_owner(aout)->lock )
/* Helpers */
/**
* This function will safely mark aout input to be restarted as soon as
* possible to take configuration changes into account */
static inline void AoutInputsMarkToRestart( audio_output_t *p_aout )
{
aout_lock( p_aout );
if( aout_owner(p_aout)->input != NULL )
aout_owner(p_aout)->input->b_restart = true;
aout_unlock( p_aout );
}
#endif /* !LIBVLC_AOUT_INTERNAL_H */
......@@ -468,6 +468,19 @@ void aout_InputCheckAndRestart( audio_output_t * p_aout, aout_input_t * p_input
p_input->b_restart = false;
}
/**
* This function will safely mark aout input to be restarted as soon as
* possible to take configuration changes into account
*/
void aout_InputRequestRestart( audio_output_t *p_aout )
{
aout_lock( p_aout );
if( aout_owner(p_aout)->input != NULL )
aout_owner(p_aout)->input->b_restart = true;
aout_unlock( p_aout );
}
/*****************************************************************************
* aout_InputPlay : play a buffer
*****************************************************************************
......@@ -806,7 +819,7 @@ static int VisualizationCallback (vlc_object_t *obj, char const *var,
}
/* That sucks FIXME: use "input" instead of cast */
AoutInputsMarkToRestart ((audio_output_t *)obj);
aout_InputRequestRestart ((audio_output_t *)obj);
(void) var; (void) oldval;
return VLC_SUCCESS;
......@@ -832,7 +845,7 @@ static int EqualizerCallback (vlc_object_t *obj, char const *cmd,
/* That sucks */
if (ret)
AoutInputsMarkToRestart ((audio_output_t *)obj);
aout_InputRequestRestart ((audio_output_t *)obj);
return VLC_SUCCESS;
}
......
......@@ -281,7 +281,7 @@ void aout_EnableFilter( vlc_object_t *p_this, const char *psz_name,
if( aout_ChangeFilterString( p_this, VLC_OBJECT(p_aout), "audio-filter", psz_name, b_add ) )
{
if( p_aout )
AoutInputsMarkToRestart( p_aout );
aout_InputRequestRestart( p_aout );
}
if( p_aout )
......
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