home *** CD-ROM | disk | FTP | other *** search
- //==========================================================================;
- //
- // THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
- // KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
- // IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR
- // PURPOSE.
- //
- // Copyright (c) 1992 - 1996 Microsoft Corporation. All Rights Reserved.
- //
- //--------------------------------------------------------------------------;
- //
- // NullInPlace filter - derived from CTransInPlaceFilter.
-
-
- class CNullInPlaceInputPin : public CTransInPlaceInputPin
- {
- public:
- CNullInPlaceInputPin( TCHAR *pObjectName
- , CTransInPlaceFilter *pTransInPlaceFilter
- , HRESULT * phr
- , LPCWSTR pName
- )
- : CTransInPlaceInputPin( pObjectName
- , pTransInPlaceFilter
- , phr
- , pName
- )
- {
- }
-
- HRESULT CheckMediaType(const CMediaType* pmt);
- };
-
- class CNullInPlaceOutputPin : public CTransInPlaceOutputPin
- {
- public:
- CNullInPlaceOutputPin( TCHAR *pObjectName
- , CTransInPlaceFilter *pTransInPlaceFilter
- , HRESULT * phr
- , LPCWSTR pName
- )
- : CTransInPlaceOutputPin( pObjectName
- , pTransInPlaceFilter
- , phr
- , pName
- )
- {
- }
-
- HRESULT CheckMediaType(const CMediaType* pmt);
- };
-
- // CNullInPlace
- //
- class CNullInPlace
- : public CTransInPlaceFilter,
- public INullIPP,
- public ISpecifyPropertyPages
- {
-
- friend class CNullInPlaceInputPin;
- friend class CNullInPlaceOutputPin;
-
- public:
-
- static CUnknown *CreateInstance(LPUNKNOWN punk, HRESULT *phr);
-
- DECLARE_IUNKNOWN;
-
- //
- // --- CTransInPlaceFilter Overrides --
- //
-
- virtual CBasePin *GetPin( int n );
-
- HRESULT Receive(IMediaSample *pSample);
- HRESULT CompleteConnect(PIN_DIRECTION dir,IPin *pReceivePin);
- HRESULT CheckInputType(const CMediaType* mtIn) { return S_OK; }
-
- // Basic COM - used here to reveal our property interface.
- STDMETHODIMP NonDelegatingQueryInterface(REFIID riid, void ** ppv);
-
- STDMETHODIMP get_IPin (IPin **ppPin) ;
- STDMETHODIMP put_MediaType(CMediaType *pmt);
- STDMETHODIMP get_MediaType(CMediaType **pmt);
- STDMETHODIMP get_State(FILTER_STATE *state);
-
-
- //
- // --- ISpecifyPropertyPages ---
- //
-
- STDMETHODIMP GetPages(CAUUID *pPages);
-
- // setup helper
- LPAMOVIESETUP_FILTER GetSetupData();
-
- private:
-
- // Constructor
- CNullInPlace(TCHAR *tszName, LPUNKNOWN punk, HRESULT *phr);
-
- // Overrides the PURE virtual Transform of CTransInPlaceFilter base class
- // This is where the "real work" is done.
- HRESULT Transform(IMediaSample *pSample){ return NOERROR; }
-
- // If there are multiple instances of this filter active, it's
- // useful for debug messages etc. to know which one this is.
- static m_nInstanceCount; // total instances
- int m_nThisInstance;
-
- CMediaType m_mtPreferred ;
-
-
- #ifdef PERF
- int m_idReceive;
- #endif
-
- CCritSec m_NullIPLock; // To serialise access.
- };
-
-