summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYoann Lopes <yoann.lopes@qt.io>2017-02-08 15:50:21 +0100
committerYoann Lopes <yoann.lopes@qt.io>2017-04-07 14:58:42 +0000
commit6de2c8aca6736550d87057b0a3f025464bf21246 (patch)
tree1fecebeaadea8f664b9f32a963933fc093d346fe
parentba120a9ba02232d713f8495403158ef06a8e67d4 (diff)
GStreamer: add QT_GSTREAMER_PLAYBIN_AUDIOSINK env variablev5.9.0-beta2
Allows to set a custom audio sink to be used by the media player, instead of the default 'autoaudiosink'. Change-Id: I13ea93a787ba6412a42bf48ecf7d3a822060cbe4 Reviewed-by: Christian Stromme <christian.stromme@qt.io>
-rw-r--r--src/plugins/gstreamer/mediaplayer/qgstreamerplayersession.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/plugins/gstreamer/mediaplayer/qgstreamerplayersession.cpp b/src/plugins/gstreamer/mediaplayer/qgstreamerplayersession.cpp
index cf2ec626..cc7aef36 100644
--- a/src/plugins/gstreamer/mediaplayer/qgstreamerplayersession.cpp
+++ b/src/plugins/gstreamer/mediaplayer/qgstreamerplayersession.cpp
@@ -160,7 +160,8 @@ QGstreamerPlayerSession::QGstreamerPlayerSession(QObject *parent)
}
g_object_set(G_OBJECT(m_playbin), "flags", flags, NULL);
- GstElement *audioSink = gst_element_factory_make("autoaudiosink", "audiosink");
+ const QByteArray envAudioSink = qgetenv("QT_GSTREAMER_PLAYBIN_AUDIOSINK");
+ GstElement *audioSink = gst_element_factory_make(envAudioSink.isEmpty() ? "autoaudiosink" : envAudioSink, "audiosink");
if (audioSink) {
if (usePlaybinVolume()) {
m_audioSink = audioSink;