summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/phonon/ds9/backend.cpp
diff options
context:
space:
mode:
authorOlivier Goffart <ogoffart@trolltech.com>2010-03-30 13:49:21 (GMT)
committerOlivier Goffart <ogoffart@trolltech.com>2010-03-30 13:49:21 (GMT)
commit00f7426f3906361fb5addb36e428648eee5e2983 (patch)
treec299b0f6f323ea2f37161cfdf5b2fb33bbe35673 /src/3rdparty/phonon/ds9/backend.cpp
parent429b747d492ef038c2ed58a9a72060d951721252 (diff)
parentae305abfdb795b472b2b9d200bf3b11af00d7d1f (diff)
downloadQt-00f7426f3906361fb5addb36e428648eee5e2983.zip
Qt-00f7426f3906361fb5addb36e428648eee5e2983.tar.gz
Qt-00f7426f3906361fb5addb36e428648eee5e2983.tar.bz2
Merge remote branch 'origin/4.7' into 4.7
Conflicts: src/3rdparty/phonon/ds9/iodevicereader.cpp
Diffstat (limited to 'src/3rdparty/phonon/ds9/backend.cpp')
-rw-r--r--src/3rdparty/phonon/ds9/backend.cpp14
1 files changed, 3 insertions, 11 deletions
diff --git a/src/3rdparty/phonon/ds9/backend.cpp b/src/3rdparty/phonon/ds9/backend.cpp
index fbc4bdc..2c56af7 100644
--- a/src/3rdparty/phonon/ds9/backend.cpp
+++ b/src/3rdparty/phonon/ds9/backend.cpp
@@ -41,8 +41,6 @@ namespace Phonon
{
namespace DS9
{
- QMutex *Backend::directShowMutex = 0;
-
bool Backend::AudioMoniker::operator==(const AudioMoniker &other)
{
return other->IsEqual(*this) == S_OK;
@@ -52,8 +50,6 @@ namespace Phonon
Backend::Backend(QObject *parent, const QVariantList &)
: QObject(parent)
{
- directShowMutex = &m_directShowMutex;
-
::CoInitialize(0);
//registering meta types
@@ -66,8 +62,6 @@ namespace Phonon
m_audioOutputs.clear();
m_audioEffects.clear();
::CoUninitialize();
-
- directShowMutex = 0;
}
QObject *Backend::createObject(BackendInterface::Class c, QObject *parent, const QList<QVariant> &args)
@@ -137,7 +131,6 @@ namespace Phonon
QList<int> Backend::objectDescriptionIndexes(Phonon::ObjectDescriptionType type) const
{
- QMutexLocker locker(&m_directShowMutex);
QList<int> ret;
switch(type)
@@ -164,7 +157,7 @@ namespace Phonon
while (S_OK == enumMon->Next(1, mon.pparam(), 0)) {
LPOLESTR str = 0;
mon->GetDisplayName(0,0,&str);
- const QString name = QString::fromWCharArray(str);
+ const QString name = QString::fromUtf16((unsigned short*)str);
ComPointer<IMalloc> alloc;
::CoGetMalloc(1, alloc.pparam());
alloc->Free(str);
@@ -211,7 +204,6 @@ namespace Phonon
QHash<QByteArray, QVariant> Backend::objectDescriptionProperties(Phonon::ObjectDescriptionType type, int index) const
{
- QMutexLocker locker(&m_directShowMutex);
QHash<QByteArray, QVariant> ret;
switch (type)
{
@@ -224,7 +216,7 @@ namespace Phonon
LPOLESTR str = 0;
HRESULT hr = mon->GetDisplayName(0,0, &str);
if (SUCCEEDED(hr)) {
- QString name = QString::fromWCharArray(str);
+ QString name = QString::fromUtf16((unsigned short*)str);
ComPointer<IMalloc> alloc;
::CoGetMalloc(1, alloc.pparam());
alloc->Free(str);
@@ -239,7 +231,7 @@ namespace Phonon
WCHAR name[80]; // 80 is clearly stated in the MSDN doc
HRESULT hr = ::DMOGetName(m_audioEffects[index], name);
if (SUCCEEDED(hr)) {
- ret["name"] = QString::fromWCharArray(name);
+ ret["name"] = QString::fromUtf16((unsigned short*)name);
}
}
break;