gps/GPSProject/MediaPlayer/MediaPlayerDlg.h

118 lines
3.1 KiB
C
Raw Normal View History

2019-05-01 12:32:35 +00:00
// MediaPlayerDlg.h : header file
//
#include "Dshow.h"
#include "streams.h"
#include "uuids.h"
#include "BmpButton.h"
#include "BmpStatic.h"
#include "OpenMoveFileDlg.h"
#pragma comment (lib,"Ole32.lib")
#pragma comment (lib,"Strmiids.lib")
#pragma comment (lib,"Mmtimer.lib")
#if !defined(AFX_MEDIAPLAYERDLG_H__5C22057A_6612_4530_98D4_3DA59D1F6828__INCLUDED_)
#define AFX_MEDIAPLAYERDLG_H__5C22057A_6612_4530_98D4_3DA59D1F6828__INCLUDED_
#if _MSC_VER >= 1000
#pragma once
#endif // _MSC_VER >= 1000
#define WM_DSPLAYER (WM_USER + 101)
// <20><><EFBFBD>Ʋ<EFBFBD><C6B2><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD>Ϣ
#define WM_DRAWPLAYTIME (WM_USER + 106)
// <20><>ʱ<EFBFBD><CAB1><EFBFBD>ص<EFBFBD><D8B5><EFBFBD><EFBFBD><EFBFBD>
void PlayerTimeProc(UINT uTimerID,UINT uMsg,DWORD_PTR dwUser,DWORD_PTR dw1,DWORD dw2);
/////////////////////////////////////////////////////////////////////////////
// CMediaPlayerDlg dialog
class CMediaPlayerDlg : public CDialog
{
private:
CDC m_BgDC;
CDC m_MemDC;
CDC m_BlockDC;
CDC m_BlockDCD;
MMRESULT m_Timer;
CFont m_txtFont;
bool m_BlockD;
bool m_InitDC;
CString m_TitleText;
CString m_SourceFile;
bool m_InitGraph;
bool m_FullScreen;
// DirectShow <20>ӿ<EFBFBD>
IGraphBuilder *m_pGraph; // Graph
IMediaControl *m_pMediaControl; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ӿ<EFBFBD>
IMediaEventEx *m_pEvent; // <20>¼<EFBFBD><C2BC>ӿ<EFBFBD>
IMediaSeeking *m_pSeek; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>λ<EFBFBD>ӿ<EFBFBD>
IVideoWindow *m_pVideo; // <20><>Ƶ<EFBFBD><C6B5><EFBFBD><EFBFBD>
// Construction
public:
void ShowProgress();
CString GetFileName(CString sPath);
void CreateGraph(void);
int GetCurrentPosition(void);
int GetDuration(void);
HRESULT GetPlayerStatus(void);
bool IsStopped(void);
bool IsPaused(void);
bool IsPlaying(void);
void DisposeGraph(void);
bool SetCurrentPosition(int iPosition);
CMediaPlayerDlg(CWnd* pParent = NULL); // standard constructor
~CMediaPlayerDlg();
// Dialog Data
//{{AFX_DATA(CMediaPlayerDlg)
enum { IDD = IDD_MEDIAPLAYER_DIALOG };
CBmpStatic m_labTime;
CStatic m_wndVideo;
CBmpButton m_butStop;
CBmpButton m_butSeek;
CBmpButton m_butPlay;
CBmpButton m_butOpen;
CBmpButton m_butFullScreen;
CBmpButton m_butExit;
//}}AFX_DATA
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CMediaPlayerDlg)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
protected:
HICON m_hIcon;
// Generated message map functions
//{{AFX_MSG(CMediaPlayerDlg)
afx_msg void OnDSPlayer();
afx_msg void OnPlayerTimer(WPARAM wParam, LPARAM lParam);
virtual BOOL OnInitDialog();
afx_msg void OnPaint();
afx_msg BOOL OnEraseBkgnd(CDC* pDC);
afx_msg void OnTimer(UINT nIDEvent);
afx_msg void OnButtonClose();
afx_msg void OnStaticVideo();
afx_msg void OnButtonPlay();
afx_msg void OnButtonOpen();
afx_msg void OnButtonSeek();
afx_msg void OnButtonStop();
afx_msg void OnButtonFullscreen();
afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
//{{AFX_INSERT_LOCATION}}
// Microsoft eMbedded Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_MEDIAPLAYERDLG_H__5C22057A_6612_4530_98D4_3DA59D1F6828__INCLUDED_)