CDecodedStream.h
上传用户:hhs829
上传日期:2022-06-17
资源大小:586k
文件大小:2k
- //
- // CDecodedStream.h
- //
- #ifndef __H_CDecodedStream__
- #define __H_CDecodedStream__
- class CFilterMpeg2VD;
- class CMpegController;
- class CDecodedStream : public CSourceStream
- {
- friend class CFilterMpeg2VD;
- private:
- CFilterMpeg2VD * mDecodeFilter;
- CMpegController * mMpegController;
-
- // implement IMediaPosition by passing upstream
- IUnknown * mPosition;
- BOOL mFlushing;
- ULONG mSamplesSent;
- CCritSec mDataAccess;
- public:
- CDecodedStream(TCHAR * inObjectName, HRESULT * outResult, CFilterMpeg2VD * inFilter);
- ~CDecodedStream();
- void SetController(CMpegController * inController);
- // override to expose IMediaPosition
- STDMETHODIMP NonDelegatingQueryInterface(REFIID riid, void **ppv);
- STDMETHODIMP BeginFlush(void);
- STDMETHODIMP EndFlush(void);
- STDMETHODIMP EndOfStream(void);
- HRESULT StopThreadSafely(void);
- HRESULT RunThreadSafely(void);
- protected:
- // Override this to provide the worker thread a means
- // of processing a buffer
- virtual HRESULT FillBuffer(IMediaSample *pSample); // PURE
- virtual HRESULT DecideBufferSize(IMemAllocator * pAllocator,
- ALLOCATOR_PROPERTIES *pprop); // PURE
- virtual HRESULT CheckMediaType(const CMediaType *mtOut);
- virtual HRESULT GetMediaType(int iPosition, CMediaType *pMediaType);
- // IQualityControl
- STDMETHODIMP Notify(IBaseFilter * pSender, Quality q);
- HRESULT CompleteConnect(IPin *pReceivePin);
- STDMETHODIMP QueryId(LPWSTR * Id);
- virtual HRESULT DoBufferProcessingLoop(void);
- virtual HRESULT OnThreadStartPlay(void);
- virtual HRESULT OnThreadDestroy(void);
-
- HRESULT DeliverCurrentPicture(IMediaSample * pSample);
- // Media type
- public:
- CMediaType& CurrentMediaType(void) { return m_mt; }
- };
- #endif // __H_CDecodedStream__