MCPcopy Create free account
hub / github.com/Nevcairiel/LAVFilters / NonDelegatingQueryInterface

Method NonDelegatingQueryInterface

common/baseclasses/transfrm.cpp:817–846  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

815// overriden to expose IMediaPosition and IMediaSeeking control interfaces
816
817STDMETHODIMP
818CTransformOutputPin::NonDelegatingQueryInterface(REFIID riid, __deref_out void **ppv)
819{
820 CheckPointer(ppv, E_POINTER);
821 ValidateReadWritePtr(ppv, sizeof(PVOID));
822 *ppv = NULL;
823
824 if (riid == IID_IMediaPosition || riid == IID_IMediaSeeking)
825 {
826
827 // we should have an input pin by now
828
829 ASSERT(m_pTransformFilter->m_pInput != NULL);
830
831 if (m_pPosition == NULL)
832 {
833
834 HRESULT hr = CreatePosPassThru(GetOwner(), FALSE, (IPin *)m_pTransformFilter->m_pInput, &m_pPosition);
835 if (FAILED(hr))
836 {
837 return hr;
838 }
839 }
840 return m_pPosition->QueryInterface(riid, ppv);
841 }
842 else
843 {
844 return CBaseOutputPin::NonDelegatingQueryInterface(riid, ppv);
845 }
846}
847
848// provides derived filter a chance to grab extra interfaces
849

Callers

nothing calls this directly

Calls 3

CreatePosPassThruFunction · 0.85
GetOwnerFunction · 0.85
QueryInterfaceMethod · 0.45

Tested by

no test coverage detected