CFilterGraph.h
上传用户:hhs829
上传日期:2022-06-17
资源大小:586k
文件大小:2k
- // CFilterGraph.h: interface for the CFilterGraph class.
- //
- //////////////////////////////////////////////////////////////////////
- #if !defined(AFX_FILTERGRAPH_H__19903DB4_110C_4DC9_8A9C_A839009CAC29__INCLUDED_)
- #define AFX_FILTERGRAPH_H__19903DB4_110C_4DC9_8A9C_A839009CAC29__INCLUDED_
- #if _MSC_VER > 1000
- #pragma once
- #endif // _MSC_VER > 1000
- #include "MemFilter.h"
- class CDataAdmin;
- // Filter graph control in this application
- class CFilterGraph
- {
- public:
- // graph builder interface
- IGraphBuilder *m_pGB;
- // media control interface
- IMediaControl *m_pMC;
- // video window interface
- IVideoWindow *m_pVW;
- // media event interface
- IMediaEventEx *m_pME;
- // media seeking interface
- IMediaSeeking *m_pMS;
- // basic audio interface
- IBasicAudio *m_pBA;
- // Filter running flag
- bool m_bRun;
- // Filter init flag
- bool m_bInit;
- CDataAdmin * m_pDataList;
- HWND m_hOwner;
- // Memory stream
- CMemStream *m_pSourceStream;
- // source filter
- CMemReader *m_pSourceReader;
- protected:
- int m_nLeft;
- int m_nTop;
- int m_nWidth;
- int m_nHeight;
- DWORD m_dwGraphRegister;
- public:
- CFilterGraph(CDataAdmin *inBuffer);
- virtual ~CFilterGraph();
- public:
- bool IsInit(void);
- bool IsRunning(void);
- void SetVideoWndOwner(HWND inWnd);
- void AdjustLength(LONGLONG inAdd);
- bool StartGraph(void);
- bool BuildGraph(void);
- void SetWindowPosition(int nLeft, int nTop, int nWidth, int nHeight);
- void ReleaseGraph(void);
- bool ResetGraph(void); // Re-build filter graph
- // Filter graph view tools
- HRESULT AddGraphToRot(IUnknown *pUnkGraph, DWORD *pdwRegister);
- void RemoveGraphFromRot(DWORD pdwRegister);
- static UINT WaitingThrd(void * pParam);
- };
- #endif // !defined(AFX_FILTERGRAPH_H__19903DB4_110C_4DC9_8A9C_A839009CAC29__INCLUDED_)