GStreamer: each QMediaPlayer now has its own volume by default.
authorYoann Lopes <yoann.lopes@digia.com>
Fri, 7 Mar 2014 16:02:37 +0000 (17:02 +0100)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Thu, 3 Apr 2014 10:59:59 +0000 (12:59 +0200)
commit3d51c9565da75b533926ca8bb98fe5746fc37d3b
treebae2ac6cca4163d847b93671ed9256ab49122e46
parenta85e55436a8b9f95cc45b122a5b998d480237fce
GStreamer: each QMediaPlayer now has its own volume by default.

We were using the volume property of GStreamer's playbin element to set
the volume. This could behave differently depending on the system
configuration; it could affect the system volume or the media player
own audio stream.
We now use a 'volume' element to do software attenuation on the audio
data sent to the audio sink, it allows each QMediaPlayer to always have
its own volume.
To preserve the previous behavior, developers can set the
QT_GSTREAMER_USE_PLAYBIN_VOLUME environment variable to true.

[ChangeLog][QtMultimedia][GStreamer] QMediaPlayer::setVolume() doesn't
change the system volume anymore (it could be the case before depending
on the system configuration). Set the QT_GSTREAMER_USE_PLAYBIN_VOLUME
environment variable to true to restore that behavior.

Task-number: QTBUG-30317
Task-number: QTBUG-36511

Change-Id: Ia0249962a74ac21fb110fcb634c08706f8d5767a
Reviewed-by: Wouter Huysentruit <wouter_huysentruit@hotmail.com>
Reviewed-by: Christian Stromme <christian.stromme@digia.com>
src/plugins/gstreamer/mediaplayer/qgstreamerplayersession.cpp
src/plugins/gstreamer/mediaplayer/qgstreamerplayersession.h