CFilterTitleOverlay.h
上传用户:hhs829
上传日期:2022-06-17
资源大小:586k
文件大小:2k
- //
- // CFilterTitleOverlay.h
- //
- #ifndef __H_CFilterTitleOverlay__
- #define __H_CFilterTitleOverlay__
- #include "ITitleOverlay.h"
- #include "COverlayController.h"
- #include "OverlayDefs.h"
- class CFilterTitleOverlay : public CTransInPlaceFilter
- , public ISpecifyPropertyPages
- , public ITitleOverlay
- {
- private:
- OVERLAY_TYPE mOverlayType;
- COverlayController * mOverlayController;
- CCritSec mITitleOverlaySync;
- BOOL mNeedEstimateFrameRate;
- private:
- CFilterTitleOverlay(TCHAR *tszName, LPUNKNOWN punk, HRESULT *phr);
- ~CFilterTitleOverlay();
- HRESULT SetInputVideoInfoToController(void);
- void ReleaseOverlayController(void);
- void SideEffectOverlayTypeChanged(void);
- 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);
- // check if you can support mtIn
- virtual HRESULT CheckInputType(const CMediaType* mtIn); // PURE
- virtual HRESULT Transform(IMediaSample *pSample); // PURE
- // Delegating methods
- virtual HRESULT CompleteConnect(PIN_DIRECTION direction, IPin *pReceivePin);
- virtual HRESULT StartStreaming();
- virtual HRESULT StopStreaming();
- // --- ISpecifyPropertyPages ---
- STDMETHODIMP GetPages(CAUUID *pPages);
- // --- ITitleOverlay methods ---
- STDMETHODIMP put_TitleOverlayType(long inOverlayType);
- STDMETHODIMP get_TitleOverlayType(long * outOverlayType);
- STDMETHODIMP put_TitleOverlayStyle(int inUsingCover);
- STDMETHODIMP get_TitleOverlayStyle(int * outUsingCover);
- STDMETHODIMP put_Title(const char * inTitle, int inLength);
- STDMETHODIMP get_Title(char * outBuffer, int * outLength);
- STDMETHODIMP put_TitleColor(BYTE inR, BYTE inG, BYTE inB);
- STDMETHODIMP get_TitleColor(BYTE * outR, BYTE * outG, BYTE * outB);
- STDMETHODIMP put_TitleStartPosition(POINT inStartPos);
- STDMETHODIMP get_TitleStartPosition(POINT * outStartPos);
- STDMETHODIMP put_TitleFont(LOGFONT inFont);
- STDMETHODIMP get_TitleFont(LOGFONT * outFont);
- STDMETHODIMP put_TitleDuration(double inStart, double inEnd);
- STDMETHODIMP get_TitleDuration(double * outStart, double * outEnd);
- };
- #endif // __H_CFilterTitleOverlay__