diff options
author | Andrew den Exter <andrew.den-exter@nokia.com> | 2009-11-12 05:27:25 (GMT) |
---|---|---|
committer | Andrew den Exter <andrew.den-exter@nokia.com> | 2009-11-12 05:31:59 (GMT) |
commit | 300ab260c96d1e0a28f44d7e6c1d80b6124efd6c (patch) | |
tree | f1e70fe42be463219eb7a28915246c28dd766814 /src/3rdparty/phonon/ds9/backend.cpp | |
parent | 857aaee6d6f394eb9dd8dd9a56692cf85bc52581 (diff) | |
download | Qt-300ab260c96d1e0a28f44d7e6c1d80b6124efd6c.zip Qt-300ab260c96d1e0a28f44d7e6c1d80b6124efd6c.tar.gz Qt-300ab260c96d1e0a28f44d7e6c1d80b6124efd6c.tar.bz2 |
Fix compilation of Phonon DS9 backend when Qt is built statically.
qt_plugin_instance() isn't defined in a static build. Assign a pointer
the shared mutex to static member variable in the backend constructor,
rather than returning it from a static member function.
Task-number: QTBUG-5207
Reviewed-by: Justin McPherson
Diffstat (limited to 'src/3rdparty/phonon/ds9/backend.cpp')
-rw-r--r-- | src/3rdparty/phonon/ds9/backend.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/3rdparty/phonon/ds9/backend.cpp b/src/3rdparty/phonon/ds9/backend.cpp index 6ed0145..fbc4bdc 100644 --- a/src/3rdparty/phonon/ds9/backend.cpp +++ b/src/3rdparty/phonon/ds9/backend.cpp @@ -41,6 +41,8 @@ namespace Phonon { namespace DS9 { + QMutex *Backend::directShowMutex = 0; + bool Backend::AudioMoniker::operator==(const AudioMoniker &other) { return other->IsEqual(*this) == S_OK; @@ -50,6 +52,8 @@ namespace Phonon Backend::Backend(QObject *parent, const QVariantList &) : QObject(parent) { + directShowMutex = &m_directShowMutex; + ::CoInitialize(0); //registering meta types @@ -62,11 +66,8 @@ namespace Phonon m_audioOutputs.clear(); m_audioEffects.clear(); ::CoUninitialize(); - } - QMutex *Backend::directShowMutex() - { - return &qobject_cast<Backend*>(qt_plugin_instance())->m_directShowMutex; + directShowMutex = 0; } QObject *Backend::createObject(BackendInterface::Class c, QObject *parent, const QList<QVariant> &args) |