[Bug 680779] New: No well-defined semantics for 100% volume on playbin2 - leaky abstraction

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Sun Jul 29 03:16:42 PDT 2012


https://bugzilla.gnome.org/show_bug.cgi?id=680779
  GStreamer | don't know | 0.10.x

           Summary: No well-defined semantics for 100% volume on playbin2
                    - leaky abstraction
    Classification: Platform
           Product: GStreamer
           Version: 0.10.x
        OS/Version: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: Normal
         Component: don't know
        AssignedTo: gstreamer-bugs at lists.freedesktop.org
        ReportedBy: patrakov at gmail.com
         QAContact: gstreamer-bugs at lists.freedesktop.org
     GNOME version: 3.3/3.4


Some applications (mostly those written before PulseAudio became common, or
written on Ubuntu) ask playbin2 or similar elements to set the volume in 100%
(or whatever their internal volume slider points to) and expect a sane result.
Since the problem is common to many applications, I'd say it is a bug in either
pulseaudio or gstreamer, in the sense that gstreamer's volume API is too easy
to misuse when pulseaudio-with-flat-volumes is present.

"Duplicates" or rather workarounds (some already fixed, some not, and some
possibly broken with flat volumes disabled):

https://bugzilla.gnome.org/show_bug.cgi?id=675217 (not fixed)
https://bugs.launchpad.net/decibel-audio-player/+bug/511589 (claimed to be
fixed, but really isn't)
http://allievi.sssup.it/techblog/?p=768 (fixed)
https://bugs.kde.org/show_bug.cgi?id=296589 (don't know)

Pledges to remove flat volumes from pulseaudio or make them non-default:

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=674935
http://pulseaudio.org/ticket/949
https://bugs.freedesktop.org/show_bug.cgi?id=46466 (in some sense)

Easiest reproducer:

gst-launch-0.10 playbin2 uri=file:///path/to/file.flac volume=1.0

Actual result: depends on the default sink. With alsasink, you get exactly the
same behaviour as if there were no "volume=1.0" (i.e. no changes to the ALSA
mixer - if it is set low, you get a quiet sound). With pulsesink, it depends on
pulseaudio configuration. If flat volumes are enabled (i.e. the upstream
default setting), this sets the maximum possible hardware volume, which is a
different behaviour from all other sinks. If flat volumes are disabled (the
default on Ubuntu), it behaves from the user viewpoint just like alsasink but
does not need the internal software volume element.

In other words, in all cases except "pulsesink with flat volumes", the volume
on the playbin is relative to the system mixer setting. In the exceptional case
(that is the default now in most Linux distributions) the volume is absolute
(IOW, relative to the hardware maximum, disregarding the system mixer). And it
is not possible to know if the absolute or relative volume mode is in use.
Moreover, an application that wants to sound "slightly quieter than normal"
should not care whether pulsesink is in use or whether flat volumes are enabled
- so the abstraction provided by gstreamer's playbin2 is leaky and should be
fixed.

Expected result: consistent behaviour, non-leaky abstraction,
relative-to-system-mixer volume scale in all cases, no surprise to users.

BTW,

1) if pulseaudio folks remove flat volumes (or make them relative while keeping
the alsa-mixer-adjusting logic) then this bug can be closed as invalid

2) pulseaudio folks recommend not exposing volume sliders in pulseaudio
applications at all (see e.g. http://pulseaudio.org/ticket/949#comment:1, and
IMHO this should apply to applications that use pulseaudio indirectly through
gstreamer). So maybe it makes sense to fix this bug by removing all kinds of
volume support from pulsesink, because this support is not supposed to be used.

-- 
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list