[vlc-devel] [vlc-commits] lib: allow media player volume to be set before playing media
magsoft at videolan.org
Mon Mar 10 08:08:40 CET 2014
Le 06/03/2014 19:42, Adrien Maglo a écrit :
> 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>
>>> 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?
Since this commit breaks the amem API and nobody has found and submitted
a fix so far, I propose to revert it.
More information about the vlc-devel