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) {
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.