diff options
author | Justin McPherson <justin.mcpherson@nokia.com> | 2009-11-11 13:53:32 +1000 |
---|---|---|
committer | Justin McPherson <justin.mcpherson@nokia.com> | 2009-11-12 15:39:37 +1000 |
commit | 88342df1680f2152663ccb2ae0e3b740f4f13ac0 (patch) | |
tree | 599fc4da6f4e6ca1ddf482f3ed2fb090c9c8fc9a /src/3rdparty/phonon/gstreamer | |
parent | 77a9c7973bd9091a39abe0e03d9b30292a7a2431 (diff) |
gstreamer: Set the glib app name only once and do it in the backend.
Integrated KDE change 1027567 by cguthrie.
Glib issues a warning if this is called more than once so we ensure that's what we do.
Reviewed-by: Dmytro Poplavskiy
Diffstat (limited to 'src/3rdparty/phonon/gstreamer')
-rw-r--r-- | src/3rdparty/phonon/gstreamer/audiooutput.cpp | 1 | ||||
-rw-r--r-- | src/3rdparty/phonon/gstreamer/backend.cpp | 7 |
2 files changed, 7 insertions, 1 deletions
diff --git a/src/3rdparty/phonon/gstreamer/audiooutput.cpp b/src/3rdparty/phonon/gstreamer/audiooutput.cpp index 138a7e414c..fcadac2afe 100644 --- a/src/3rdparty/phonon/gstreamer/audiooutput.cpp +++ b/src/3rdparty/phonon/gstreamer/audiooutput.cpp @@ -42,7 +42,6 @@ AudioOutput::AudioOutput(Backend *backend, QObject *parent) static int count = 0; m_name = "AudioOutput" + QString::number(count++); if (m_backend->isValid()) { - g_set_application_name(qApp->applicationName().toUtf8()); m_audioBin = gst_bin_new (NULL); gst_object_ref (GST_OBJECT (m_audioBin)); gst_object_sink (GST_OBJECT (m_audioBin)); diff --git a/src/3rdparty/phonon/gstreamer/backend.cpp b/src/3rdparty/phonon/gstreamer/backend.cpp index 4041f2bd86..7a06378753 100644 --- a/src/3rdparty/phonon/gstreamer/backend.cpp +++ b/src/3rdparty/phonon/gstreamer/backend.cpp @@ -49,6 +49,13 @@ Backend::Backend(QObject *parent, const QVariantList &) , m_debugLevel(Warning) , m_isValid(false) { + // In order to support reloading, we only set the app name once... + static bool first = true; + if (first) { + first = false; + g_set_application_name(qApp->applicationName().toUtf8()); + } + GError *err = 0; bool wasInit = gst_init_check(0, 0, &err); //init gstreamer: must be called before any gst-related functions if (err) |