cfiltermpeg2dec.h

来自「mpeg2 decoder filter过滤服务端」· C头文件 代码 · 共 71 行

H
71
字号
//
// CFilterMpeg2Dec.h
//

#ifndef __H_CFilterMpeg2VD__
#define __H_CFilterMpeg2VD__

//#include "IMpeg2VD.h"
#include "CMpeg2Controller.h"

class CFilterMpeg2Dec : public CSource
				//   , public ISpecifyPropertyPages
{
	friend class CFilterMpeg2DecInputPin;
	friend class CDecodedStream;

private:
	CFilterMpeg2DecInputPin *    mMpegInputPin;

	CCritSec           m_csReceive;
	CMpeg2Controller    mMpeg2Controller;	
	
	BOOL               mIsFlushing;
	BOOL               mEOSDelivered;
	BOOL               mEOSReceived;

	// Bitmap infomation
	LONG               mImageWidth;
	LONG               mImageHeight;
	LONG               mOutputImageSize;
	REFERENCE_TIME     mSampleDuration;

private:
	CFilterMpeg2Dec(TCHAR *tszName, LPUNKNOWN punk, HRESULT *phr);
	~CFilterMpeg2Dec();

	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__

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?