After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 647540 - autoaudiosink picks element to use by rank, but pulsesink/alsasink/jackaudiosink are all PRIMARY
autoaudiosink picks element to use by rank, but pulsesink/alsasink/jackaudios...
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
unspecified
Other Linux
: Normal normal
: 0.10.31
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2011-04-12 09:48 UTC by Mart Raudsepp
Modified: 2011-07-04 16:21 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Mart Raudsepp 2011-04-12 09:48:28 UTC
autoaudiosink picks what element to use based on rank, but most of the audio sink elements are all PRIMARY, so it's undeterministic what will be used. It seems that for example debian patches pulsesink to PRIMARY+10, probably because of this. So we might want to think about how all this should work exactly.
Other autodetect elements might have similar ponderings as well.

This became a topic to me due to totem git now using autoaudiosink for playbin2 audio-sink property, instead of gconf or gsettings audiosink, which might want to be revised by totem separately eventually before 3.2 release.
Comment 1 Sebastian Dröge (slomo) 2011-04-13 14:33:13 UTC
The element selection is still deterministic... elements are sorted by their name if the ranks are equal. Of course this doesn't make this much better ;)

What would you propose as a solution for this? Other than distributions adjusting the ranks for their policies?
Comment 2 Olivier Crête 2011-04-13 15:11:29 UTC
We should probably rank sound servers (pulseaudio and jack) higher than lower-level thing (like alsa), since using alsasink will just result in adding another layer.
Comment 3 David Schleef 2011-06-30 07:33:17 UTC
What exactly is the bug here?  Are there cases where an audio sink element is chosen that causes degraded playback?  Otherwise, if there's no difference, it doesn't matter, right?
Comment 4 Mart Raudsepp 2011-06-30 08:33:21 UTC
I'd call it a degradation if I use a sound server like pulseaudio and instead of outputting to it directly, I get an alsa plugin in the way to go gstreamer -> alsa -> pulseaudio -> alsa -> output instead of gstreamer -> pulseaudio -> alsa -> output  with all the associated compatibility code paths and whatnot. Why have a pulsesink element at all then if it doesn't mean any degradation compared to alsasink...
Comment 5 Stefan Sauer (gstreamer, gtkdoc dev) 2011-07-01 17:42:57 UTC
(In reply to comment #2)
> We should probably rank sound servers (pulseaudio and jack) higher than
> lower-level thing (like alsa), since using alsasink will just result in adding
> another layer.

+1

Ideally we could lower the ranks for sink that are not used. E.g. I hate it when apexsink is trying to connect and fail, as I don't have the hardware. But then I have no idea how to practically do it (except having a UI where I can override the ranks).
Comment 6 David Schleef 2011-07-04 02:54:50 UTC
(Stefan:  Why would apexsink be probed by autoaudiosink?  Its rank is NONE.)

IMO, it makes sense to increase pulsesink to PRIMARY+10, since it really is always preferred over any other output if it happens to be running.

It's unclear if jacksink should be PRIMARY at all, since jack is a "specialty" output, and not general purpose.

To that effect,

commit f69dcaab58b262bb60fbbd561f01b9e049ba8da4
Author: David Schleef <ds@schleef.org>
Date:   Sun Jul 3 19:51:32 2011 -0700

    pulse: Increase ranks to PRIMARY + 10
    
    So that pulsesrc/pulsesink get chosen over other possible PRIMARY
    src/sinks by autoaudiosink.  Presumably, if pulse is available, it
    is always preferred over another src/sink.
    
    Fixes: #647540.
Comment 7 Stefan Sauer (gstreamer, gtkdoc dev) 2011-07-04 16:21:14 UTC
(In reply to comment #6)
> (Stefan:  Why would apexsink be probed by autoaudiosink?  Its rank is NONE.)
> 
My bad, when a user goes to the audio settings in buzztard I get all audiosinks from the registry and probe them. For apexsink this blocks a little.