[vlc-devel] commit: gestures: change volume on playlist rather than interface ( Rémi Denis-Courmont )
remi at remlab.net
Thu Jul 9 22:36:16 CEST 2009
Le jeudi 9 juillet 2009 23:13:02 Laurent Aimar, vous avez écrit :
> > The aout_* interface APIs are currently assume there is only one audio
> > output, meaning only one input (I believe they predate VLM).
> Nope, the aout is reusable by multiple inputs at the same time (not sure
> it is actually used but it is the spirit of the aout object).
> The aout is more attached to an output device than to an input.
I meant that a single one single input at a time per instance is assumed.
> > I also guess that input_resource_t cannot handle this (at least
> > currently), it is preserved when the item changes, but not when the
> > playlist stops, right?
> No, aout is preserved through stop. In fact, in VLC lifetime, once a aout
> is created (by an input from the playlist), it is never destroyed (except
> when quiting).
But what matters is that its scope. The audio output should not be exchanged
from playlist to VLM or across different libvlc_media_list_player's. IIRC,
there was such a bug in 0.8.6, not to mention race conditions, but it should
be fixed as of 0.9.0 (no recycling) and 1.0.0 (input_resource_t).
> > guess ideally, we would have some kind of commun "input context" that
> > survives inputs and would be common to playlist, VLM, and
> > libvlc_media_list_player.
> > In the mean time, I am tempted to put run aout_* on top of the parent
> > object of the input - which is the playlist when it comes to interface
> > plugins. Next
> In fact, actually the aout is already kept by the playlist (but it is not
> shared with VLM and libvlc),
> It is done in playlist/thread.c by using input_DetachResource before
> destroying an input and then giving the resource to the next input_Create.
> When a stop is executed, input_resource_TerminateVout is called on it to
> force the vout to be closed, but aout (and same for sout) is kept.
Well, in that case we can heavily simplify the code, as we can store the
volume and muted-saved volume in the audio output object instead of libvlc
(currently) or the parent of the input (what I considered doing).
More information about the vlc-devel