Commit 5c0a6cab authored by Mark Lee's avatar Mark Lee Committed by Rémi Denis-Courmont

lib: allow media player volume to be set before playing media

This is based on similar initialisation as is already done in the
playlist_Create() function.
Signed-off-by: default avatarRémi Denis-Courmont <remi@remlab.net>
parent 345afa86
......@@ -653,4 +653,14 @@ VLC_API void input_resource_Terminate( input_resource_t * );
*/
VLC_API audio_output_t *input_resource_HoldAout( input_resource_t * );
/**
* This function creates or recycles an audio output.
*/
VLC_API audio_output_t *input_resource_GetAout( input_resource_t * );
/**
* This function retains or destroys an audio output.
*/
VLC_API void input_resource_PutAout( input_resource_t *, audio_output_t * );
#endif
......@@ -501,6 +501,10 @@ libvlc_media_player_new( libvlc_instance_t *instance )
vlc_object_release(mp);
return NULL;
}
audio_output_t *aout = input_resource_GetAout(mp->input.p_resource);
if( aout != NULL )
input_resource_PutAout(mp->input.p_resource, aout);
vlc_mutex_init (&mp->input.lock);
mp->i_refcount = 1;
mp->p_event_manager = libvlc_event_manager_new(mp, instance);
......
......@@ -36,16 +36,6 @@ void input_resource_SetInput( input_resource_t *, input_thread_t * );
*/
sout_instance_t *input_resource_RequestSout( input_resource_t *, sout_instance_t *, const char *psz_sout );
/**
* This function creates or recycles an audio output.
*/
audio_output_t *input_resource_GetAout( input_resource_t * );
/**
* This function retains or destroys an audio output.
*/
void input_resource_PutAout( input_resource_t *, audio_output_t * );
/**
* This function handles vout request.
*/
......
......@@ -217,7 +217,9 @@ input_resource_New
input_resource_Release
input_resource_TerminateVout
input_resource_Terminate
input_resource_GetAout
input_resource_HoldAout
input_resource_PutAout
input_Start
input_Stop
input_vaControl
......
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