用于多个输入引脚的CreatePosPassThru [英] CreatePosPassThru for multiple input pins
本文介绍了用于多个输入引脚的CreatePosPassThru的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
对于多个输入引脚,我应该使用什么代替CreatePosPassThru
?
STDMETHODIMP CTransformerOutputPin :: NonDelegatingQueryInterface(REFIID riid, void ** ppv)
{
CheckPointer(ppv,E_POINTER);
ValidateReadWritePtr(ppv, sizeof (PVOID));
* ppv = NULL;
如果(riid == IID_IMediaPosition || riid == IID_IMediaSeeking){
// 我们现在应该有一个输入图钉
如果(m_pPosition == NULL){
HRESULT hr = CreatePosPassThru(
GetOwner(),
错误的,
(IPin *)m_pAudioTransformerFilter-> m_Arrinputpin [ 0 ],
& m_pPosition);
如果(FAILED(hr)){
返回小时;
}
}
返回 m_pPosition-> QueryInterface(riid,ppv);
} 其他 {
返回 CBaseOutputPin :: NonDelegatingQueryInterface(riid,ppv);
}
}
CreatePosPassThru
:创建一个支持IMediaSeeking和IMediaPosition的COM对象,用于单输入pin渲染器和变换过滤器.
STDAPI CreatePosPassThru(
LPUNKNOWN pAgg,
BOOL bRenderer,
IPin * pPin,
IUnknown ** ppPassThru);
当我只有一个输入引脚时,一切都很好.
我有带多个输入的变压器滤波器.
(更新)
这是实际的.
我只是调用所有引脚的所有功能,而不是IPin *,而是使用IPin **和pins_size.
现在我要测试一下.
在我看来,它可行.
What should I use instead of CreatePosPassThru
for multiple input pins?
STDMETHODIMP CTransformerOutputPin::NonDelegatingQueryInterface(REFIID riid, void **ppv)
{
CheckPointer(ppv,E_POINTER);
ValidateReadWritePtr(ppv,sizeof(PVOID));
*ppv = NULL;
if (riid == IID_IMediaPosition || riid == IID_IMediaSeeking) {
// we should have an input pin by now
if (m_pPosition == NULL) {
HRESULT hr = CreatePosPassThru(
GetOwner(),
FALSE,
(IPin *)m_pAudioTransformerFilter->m_Arrinputpin[0],
&m_pPosition);
if (FAILED(hr)) {
return hr;
}
}
return m_pPosition->QueryInterface(riid, ppv);
} else {
return CBaseOutputPin::NonDelegatingQueryInterface(riid, ppv);
}
}
CreatePosPassThru
: Creates a COM object that supports IMediaSeeking and IMediaPosition for single-input pin renderers and transform filters.
STDAPI CreatePosPassThru(
LPUNKNOWN pAgg,
BOOL bRenderer,
IPin *pPin,
IUnknown **ppPassThru);
When I had one input pin, everything was fine.
I have transformer filter with multiple inputs.
(Update)
It is actual.
解决方案
I have upgraded CreatePosPassThru, CSeekingPassThru and got CreatePosPassThruMultiple, CSeekingPassThruMultiple.
I just call all the functions for all pins and instead of IPin * use IPin ** and pins_size.
Now i am going to test this.
It seems to me, that it works.
这篇关于用于多个输入引脚的CreatePosPassThru的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文