本文整理汇总了C++中ComPointer::pparam方法的典型用法代码示例。如果您正苦于以下问题:C++ ComPointer::pparam方法的具体用法?C++ ComPointer::pparam怎么用?C++ ComPointer::pparam使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ComPointer
的用法示例。
在下文中一共展示了ComPointer::pparam方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: getService
template <typename T> ComPointer<T> getService(const Filter &filter, REFGUID guidService, REFIID riid)
{
//normally we should use IID_IMFGetService but this introduces another dependency
//so here we simply define our own IId with the same value
ComPointer<T> ret;
ComPointer<IMFGetService> getService(filter, IID_IMFGetService);
if (getService) {
getService->GetService(guidService, riid, reinterpret_cast<void**>(ret.pparam()));
}
return ret;
}
示例2: SUCCEEDED
QList<InputPin> BackendNode::pins(const Filter &filter, PIN_DIRECTION wantedDirection)
{
QList<InputPin> ret;
if (filter) {
ComPointer<IEnumPins> enumPin;
HRESULT hr = filter->EnumPins(enumPin.pparam());
Q_UNUSED(hr);
Q_ASSERT( SUCCEEDED(hr));
InputPin pin;
while (enumPin->Next(1, pin.pparam(), 0) == S_OK) {
PIN_DIRECTION dir;
hr = pin->QueryDirection(&dir);
Q_ASSERT( SUCCEEDED(hr));
if (dir == wantedDirection) {
ret.append(pin);
}
}
}
return ret;
}
示例3: locker
QHash<QByteArray, QVariant> Backend::objectDescriptionProperties(Phonon::ObjectDescriptionType type, int index) const
{
QMutexLocker locker(&m_directShowMutex);
QHash<QByteArray, QVariant> ret;
switch (type)
{
case Phonon::AudioOutputDeviceType:
{
#ifdef Q_OS_WINCE
ret["name"] = QLatin1String("default audio device");
#else
const AudioMoniker &mon = m_audioOutputs[index];
LPOLESTR str = 0;
HRESULT hr = mon->GetDisplayName(0,0, &str);
if (SUCCEEDED(hr)) {
QString name = QString::fromUtf16((const unsigned short*) str);
ComPointer<IMalloc> alloc;
::CoGetMalloc(1, alloc.pparam());
alloc->Free(str);
ret["name"] = name.mid(name.indexOf('\\') + 1);
}
#endif
}
break;
#ifndef QT_NO_PHONON_EFFECT
case Phonon::EffectType:
{
WCHAR name[80]; // 80 is clearly stated in the MSDN doc
HRESULT hr = ::DMOGetName(m_audioEffects[index], name);
if (SUCCEEDED(hr)) {
ret["name"] = QString::fromUtf16((const unsigned short*) name);
}
}
break;
#endif //QT_NO_PHONON_EFFECT
default:
break;
}
return ret;
}