⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 cfiltergraph.h

📁 《DirectShow开发指南》配套代码代码,需要DirectX SDK 7以上支持。
💻 H
字号:
// 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_)

⌨️ 快捷键说明

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