CFilterMpeg2VD.h
上传用户:hhs829
上传日期:2022-06-17
资源大小:586k
文件大小:2k
- //
- // CFilterMpeg2VD.h
- //
- #ifndef __H_CFilterMpeg2VD__
- #define __H_CFilterMpeg2VD__
- #include "IMpeg2VD.h"
- #include "CMpegController.h"
- class CFilterMpeg2VD : public CSource
- // , public ISpecifyPropertyPages
- {
- friend class CMpegInputPin;
- friend class CDecodedStream;
- private:
- CMpegInputPin * mMpegInputPin;
- CCritSec m_csReceive;
- CMpegController mMpegController;
-
- BOOL mIsFlushing;
- BOOL mEOSDelivered;
- BOOL mEOSReceived;
- // Bitmap infomation
- LONG mImageWidth;
- LONG mImageHeight;
- LONG mOutputImageSize;
- REFERENCE_TIME mSampleDuration;
- private:
- CFilterMpeg2VD(TCHAR *tszName, LPUNKNOWN punk, HRESULT *phr);
- ~CFilterMpeg2VD();
- CDecodedStream * OutputPin() {return (CDecodedStream *) m_paStreams[0];};
- public:
- static CUnknown * WINAPI CreateInstance(LPUNKNOWN punk, HRESULT *phr);
- DECLARE_IUNKNOWN;
- // Basic COM - used here to reveal our own interfaces
- STDMETHODIMP NonDelegatingQueryInterface(REFIID riid, void ** ppv);
- // you need to supply these to access the pins from the enumerator
- // and for default Stop and Pause/Run activation.
- virtual int GetPinCount();
- virtual CBasePin *GetPin(int n);
- STDMETHODIMP FindPin(LPCWSTR Id, IPin ** ppPin);
- STDMETHODIMP Stop();
- STDMETHODIMP Pause();
- HRESULT StartStreaming();
- HRESULT StopStreaming();
- // Input pin's delegating methods
- HRESULT Receive(IMediaSample *pSample);
- // if you override Receive, you may need to override these three too
- HRESULT EndOfStream(void);
- HRESULT BeginFlush(void);
- HRESULT EndFlush(void);
- HRESULT NewSegment(REFERENCE_TIME tStart, REFERENCE_TIME tStop, double dRate);
- // Output pin's delegating methods
- HRESULT CompleteConnect(PIN_DIRECTION inDirection, IPin * inReceivePin);
- // --- ISpecifyPropertyPages ---
- // STDMETHODIMP GetPages(CAUUID *pPages);
- };
- #endif // __H_CFilterMpeg2VD__