1 //------------------------------------------------------------------------------
4 // Desc: DirectShow base classes.
6 // Copyright (c) 1992-2002 Microsoft Corporation. All rights reserved.
7 //------------------------------------------------------------------------------
13 //==================================================================
15 // This goes in the factory template table to create new instances
16 // If there is already a mapper instance - return that, else make one
17 // and save it in a static variable so that forever after we can return that.
18 //==================================================================
20 CUnknown
* CSeekingPassThru::CreateInstance(LPUNKNOWN pUnk
, HRESULT
*phr
)
22 return new CSeekingPassThru(NAME("Seeking PassThru"),pUnk
, phr
);
26 STDMETHODIMP
CSeekingPassThru::NonDelegatingQueryInterface(REFIID riid
, void ** ppv
)
28 if (riid
== IID_ISeekingPassThru
) {
29 return GetInterface((ISeekingPassThru
*) this, ppv
);
32 (riid
== IID_IMediaSeeking
||
33 riid
== IID_IMediaPosition
)) {
34 return m_pPosPassThru
->NonDelegatingQueryInterface(riid
,ppv
);
36 return CUnknown::NonDelegatingQueryInterface(riid
, ppv
);
42 CSeekingPassThru::CSeekingPassThru( TCHAR
*pName
, LPUNKNOWN pUnk
, HRESULT
*phr
)
43 : CUnknown(pName
, pUnk
, phr
),
49 CSeekingPassThru::~CSeekingPassThru()
51 delete m_pPosPassThru
;
54 STDMETHODIMP
CSeekingPassThru::Init(BOOL bRendererSeeking
, IPin
*pPin
)
62 new CRendererPosPassThru(
63 NAME("Render Seeking COM object"),
68 NAME("Render Seeking COM object"),
72 if (!m_pPosPassThru
) {
76 delete m_pPosPassThru
;
77 m_pPosPassThru
= NULL
;