www.pudn.com > fastplayer-0.1.zip > FastPlayerDoc.h, change:2002-01-08,size:2977b


// FastPlayerDoc.h : interface of the CFastPlayerDoc class 
// 
///////////////////////////////////////////////////////////////////////////// 
 
#if !defined(AFX_FASTPLAYERDOC_H__D6FFAFF9_0A4E_41DC_AAD8_D65FB25FA37D__INCLUDED_) 
#define AFX_FASTPLAYERDOC_H__D6FFAFF9_0A4E_41DC_AAD8_D65FB25FA37D__INCLUDED_ 
 
#if _MSC_VER > 1000 
#pragma once 
#endif // _MSC_VER > 1000 
 
#include "FiltersDlg.h" 
 
class CFastPlayerDoc : public CDocument 
{ 
protected: // create from serialization only 
	CFastPlayerDoc(); 
	DECLARE_DYNCREATE(CFastPlayerDoc) 
 
// Attributes 
public: 
	// Values for status of the player 
	enum CurrentStatus 
	{ 
		statusEmpty = 0, 
		statusStopped = 1, 
		statusRunning = 2, 
		statusPaused = 3 
	}; 
	CurrentStatus m_currentStatus; 
 
	// COM interfaces to DirectShow 
	IGraphBuilder *m_pGraphBuilder; 
	IMediaControl *m_pMediaControl; 
	IMediaEventEx *m_pMediaEventEx; 
	IMediaSeeking *m_pMediaSeeking; 
	IVideoWindow  *m_pVideoWindow; 
	IBasicVideo   *m_pBasicVideo; 
	IBasicAudio   *m_pBasicAudio; 
 
// Operations 
public: 
	HRESULT Open(const CString& strFile); 
	void Close(); 
	HRESULT Pause(); 
	HRESULT Stop(); 
	HRESULT Play(); 
	void ChangePlaybackPosition(UINT nPosition); 
 
// Overrides 
	// ClassWizard generated virtual function overrides 
	//{{AFX_VIRTUAL(CFastPlayerDoc) 
	public: 
	virtual BOOL OnNewDocument(); 
	virtual void Serialize(CArchive& ar); 
	virtual BOOL OnOpenDocument(LPCTSTR lpszPathName); 
	virtual void OnCloseDocument(); 
	//}}AFX_VIRTUAL 
 
// Implementation 
public: 
	void ShowFilterProperties(const CString& strFilterName); 
	void ShowFilters(); 
	void ShowOptionsDialog(); 
	void WriteDefaultSettings(); 
	void LoadDefaultSettings(); 
	BOOL IsAudioMuted(); 
	BOOL IsInFullScreenMode(); 
	void SetFullScreen(BOOL bFullScreen = TRUE); 
	void UnMute(); 
	void Mute(); 
	void ChangeAudioVolume(int nVolume); 
	int GetAudioVolume(); 
	UINT GetPlaybackPosition(); 
	DWORD m_dwGraphRegister; 
	BOOL m_bFixAC3; 
	BOOL m_bUseWaveOut; 
	int m_nVolume; 
 
	CFiltersDlg *m_pFilters; 
 
	virtual ~CFastPlayerDoc(); 
 
 
#ifdef _DEBUG 
	virtual void AssertValid() const; 
	virtual void Dump(CDumpContext& dc) const; 
#endif 
 
protected: 
	HRESULT RenderFile(const CString& strFile); 
	void ReleaseMediaInterfaces(); 
	 
	HRESULT AddGraphToRot(IUnknown *pUnkGraph, DWORD *pdwRegister); 
	void RemoveGraphFromRot(DWORD pdwRegister); 
	BOOL IsAC3AudioPresent(); 
 
// Generated message map functions 
protected: 
	//{{AFX_MSG(CFastPlayerDoc) 
		// NOTE - the ClassWizard will add and remove member functions here. 
		//    DO NOT EDIT what you see in these blocks of generated code ! 
	//}}AFX_MSG 
	DECLARE_MESSAGE_MAP() 
}; 
 
///////////////////////////////////////////////////////////////////////////// 
 
//{{AFX_INSERT_LOCATION}} 
// Microsoft Visual C++ will insert additional declarations immediately before the previous line. 
 
#endif // !defined(AFX_FASTPLAYERDOC_H__D6FFAFF9_0A4E_41DC_AAD8_D65FB25FA37D__INCLUDED_)