[vlc-devel] [vlc-commits] lib: allow media player volume to be set before playing media

Adrien Maglo magsoft at videolan.org
Thu Mar 6 19:42:28 CET 2014


Le 06/03/2014 18:25, Rémi Denis-Courmont a écrit :
> On Thu, 06 Mar 2014 17:59:38 +0100, Adrien Maglo <magsoft at videolan.org>
> wrote:
>> Indeed, it seems from my logs that with the commit (first log),
>> android_audiotrack is instantiated at the very early beginning of the
>> playback process. Without the commit (second log), amem is correctly
>> started much later as it used to be.
>
> The "aout" variable is initialized too late, after the audio output is
> already created.

That's indeed the issue.
 From lib/media_player.c, I think this commit is not compatible with the 
current amem API.
To use the amem aout, we must call libvlc_audio_set_callbacks() with a 
valid libvlc_media_player_t instance. The aout variable is set in this 
function to "amem,none".
To obtain a valid libvlc_media_player_t instance, we must call before 
libvlc_media_player_new(). However, with this commit, 
libvlc_media_player_new() starts a default aout, which is later reused 
by the playback initialization process. That is why, in our case, 
android_audiotrack is used instead a amem.

What do you think?

Best regards,


-- 
MagSoft




More information about the vlc-devel mailing list