[vlc-devel] commit: gestures: change volume on playlist rather than interface ( Rémi Denis-Courmont )

Laurent Aimar fenrir at via.ecp.fr
Thu Jul 9 22:52:03 CEST 2009


On Thu, Jul 09, 2009, Rémi Denis-Courmont wrote:
> 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, 
 Yes it can. The aout can perfectly be used by N(>1) input at the same time
coming from playlist/vlm/libvlc all at once.

 AFAIK, the *only* reason to have more than one aout object at the same time is
to use two distinct audio devices (which might be wanted, no idea).

> 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).
 If I remember correctly, the bug was around the way the aout was created not
the aout itself (I think it was the same for sout).

> >  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 
 With the current code, unless I missed something, I do think so.


More information about the vlc-devel mailing list