diff options
author | Justin McPherson <justin.mcpherson@nokia.com> | 2009-11-11 03:53:32 (GMT) |
---|---|---|
committer | Justin McPherson <justin.mcpherson@nokia.com> | 2009-11-12 05:39:37 (GMT) |
commit | 88342df1680f2152663ccb2ae0e3b740f4f13ac0 (patch) | |
tree | 599fc4da6f4e6ca1ddf482f3ed2fb090c9c8fc9a /src | |
parent | 77a9c7973bd9091a39abe0e03d9b30292a7a2431 (diff) | |
download | Qt-88342df1680f2152663ccb2ae0e3b740f4f13ac0.zip Qt-88342df1680f2152663ccb2ae0e3b740f4f13ac0.tar.gz Qt-88342df1680f2152663ccb2ae0e3b740f4f13ac0.tar.bz2 |
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')
-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 138a7e4..fcadac2 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 4041f2b..7a06378 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) |