Changeset 561 for trunk/src/3rdparty/phonon/ds9/backend.cpp
- Timestamp:
- Feb 11, 2010, 11:19:06 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
-
Property svn:mergeinfo
set to (toggle deleted branches)
/branches/vendor/nokia/qt/4.6.1 merged eligible /branches/vendor/nokia/qt/current merged eligible /branches/vendor/trolltech/qt/current 3-149
-
Property svn:mergeinfo
set to (toggle deleted branches)
-
trunk/src/3rdparty/phonon/ds9/backend.cpp
r2 r561 42 42 namespace DS9 43 43 { 44 QMutex *Backend::directShowMutex = 0; 45 44 46 bool Backend::AudioMoniker::operator==(const AudioMoniker &other) 45 47 { … … 51 53 : QObject(parent) 52 54 { 53 ::CoInitialize(0); 55 directShowMutex = &m_directShowMutex; 56 57 ::CoInitialize(0); 54 58 55 59 //registering meta types … … 62 66 m_audioOutputs.clear(); 63 67 m_audioEffects.clear(); 64 ::CoUninitialize(); 68 ::CoUninitialize(); 69 70 directShowMutex = 0; 65 71 } 66 72 … … 132 138 QList<int> Backend::objectDescriptionIndexes(Phonon::ObjectDescriptionType type) const 133 139 { 140 QMutexLocker locker(&m_directShowMutex); 134 141 QList<int> ret; 135 142 … … 158 165 LPOLESTR str = 0; 159 166 mon->GetDisplayName(0,0,&str); 160 const QString name = QString::from Utf16((unsigned short*)str);167 const QString name = QString::fromWCharArray(str); 161 168 ComPointer<IMalloc> alloc; 162 169 ::CoGetMalloc(1, alloc.pparam()); … … 205 212 QHash<QByteArray, QVariant> Backend::objectDescriptionProperties(Phonon::ObjectDescriptionType type, int index) const 206 213 { 214 QMutexLocker locker(&m_directShowMutex); 207 215 QHash<QByteArray, QVariant> ret; 208 216 switch (type) … … 217 225 HRESULT hr = mon->GetDisplayName(0,0, &str); 218 226 if (SUCCEEDED(hr)) { 219 QString name = QString::from Utf16((unsigned short*)str);227 QString name = QString::fromWCharArray(str); 220 228 ComPointer<IMalloc> alloc; 221 229 ::CoGetMalloc(1, alloc.pparam()); … … 232 240 HRESULT hr = ::DMOGetName(m_audioEffects[index], name); 233 241 if (SUCCEEDED(hr)) { 234 ret["name"] = QString::from Utf16((unsigned short*)name);242 ret["name"] = QString::fromWCharArray(name); 235 243 } 236 244 }
Note:
See TracChangeset
for help on using the changeset viewer.