On Mon, Jun 9, 2014 at 3:20 PM, Rémi Denis-Courmont <r...@remlab.net> wrote:
> Le lundi 9 juin 2014, 14:51:53 Felipe Sateler a écrit :
>> OK, thanks for explaining. I see that vlc creates the stream when it
>> starts playback and destroys it when stopped (although not pause).
>>
>> This leaves the following options:
>>
>> 1. Pulseaudio could add a function to get the volume an output/input
>> sink/source stream would get if it were created.
>
> PulseAudio does not really have a notion of inactive session, as Windows
> does... I don't really see how that would work with the current architecture
> (not that I'm that familiar with it though).

But isn't an uncorked stream an "inactive stream"? I'm not sure of
what you mean by that.

>
>> 2. VLC could create the stream on startup and destroy it on exit. This
>> is what Clementine seems to do.
>
> That is not possible since VLC may play different formats at successive times.
> Also...

OK. So that rules out permanent streams. BTW, out of curiosity, why is
this the case? I thought VLC did their own decoding (and thus output a
single stream format).

Also, semi-permanent streams might be the option then: reuse streams
as long as the format doesn't change. This may well be more work than
this problem merits, though.

>
>> 3. VLC could, at startup, create a stream, get the volume and destroy
>> the stream.
>
> Because of flat volumes, doing that would potentially cause spurious changes 
> to
> the master volume and glitches in mixer UIs.

Is this really correct? If pa_stream_connect_playback is set with a
NULL cvolume parameter, PA should set a reasonable volume for the
stream.

>
> Furthermore, all options 1 and 2 fail if another process creates a stream with
> the same role (or whatever matching criteria) in the mean time, and change the
> volume.

I don't think roles are used for this purpose. Streams have
independent volumes, AFAICT.

>> Are there problems with going with option 2? This option has the added
>> benefit the volume can potentially be controlled by another program
>> before starting playback.
>
> Ultimately, the problem is simple. On the one hand, PulseAudio developers
> consider that audio applications shall not show volume UI. Only the dedicated
> mixer application(s) and the session process grabbing the volume media keys
> shall be concerned with the volume. On the other hand, VLC GUI developers want
> to have a volume control.

Indeed, it seems PA devs have convinced many people. Several media
players now no longer come with volume UIs, or at least don't show
them until playback has started.

>
> The two perspectives are incompatible. That is not a technical problem; and
> thus it won't be solved by code.

It doesn't mean it is impossible to work around.

-- 

Saludos,
Felipe Sateler

_______________________________________________
pkg-pulseaudio-devel mailing list
pkg-pulseaudio-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-pulseaudio-devel

Reply via email to