// By5000Asiplay DemoView.h : CBy5000AsiplayDemoView 类的接口
//


#pragma once
#include "afxwin.h"
#include "afxcmn.h"
#include "By5000asiplay.h"
#include "SystemDlg.h"
#include "AudioDlg.h"
#include "CaptureDlg.h"
#include "CurVideoDlg.h"
#include "NextVideoDlg.h"
#include "TsDlg.h"
#include "MyList.h"


class CBy5000AsiplayDemoView : public CFormView
{
protected: // 仅从序列化创建
	CBy5000AsiplayDemoView();
	DECLARE_DYNCREATE(CBy5000AsiplayDemoView)

public:
	enum{ IDD = IDD_BY5000ASIPLAYDEMO_FORM };

// 属性
public:
	CBy5000AsiplayDemoDoc* GetDocument() const;

// 操作
public:

// 重写
	public:
virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV 支持
	virtual void OnInitialUpdate(); // 构造后第一次调用

// 实现
public:
	virtual ~CBy5000AsiplayDemoView();
#ifdef _DEBUG
	virtual void AssertValid() const;
	virtual void Dump(CDumpContext& dc) const;
#endif

public:
	UINT m_uiCardCount;
	UINT m_uiCardNumber;
	UINT m_uiCardType;
	UINT m_uiVideoMode;

	BOOL m_bIsCardOpen;
	CMyList	m_ListCtrlTsServiceTable;
	//INT m_nTsSearchProgramStatus;
private:

	CString m_strMpegFileName;
	BOOL m_bIsExit;
	BOOL m_bIsPlaying;

	BOOL m_bAutoSwtich;
	BOOL m_bIsFirstFramePause;
	BOOL m_bAnalyzeMediaFile;
	BOOL m_bIsDvdSubPause;
	HANDLE m_hFilePlaybackControlThread;
	HANDLE m_hExitEvent;
	HANDLE m_hEndOfFilePlaybackEvent;
	UINT_PTR m_nIDTimer;
	ULONG m_ulCurrentPlayDuration;
	ULONG m_ulCurrentPlayTime;
	BOOL  m_bSetSwtich;
public:

	CEdit m_MediaTimeCode;
	INT m_nWindowWidth;
	INT m_nWindowHeight;


protected:

// 生成的消息映射函数
protected:
	DECLARE_MESSAGE_MAP()
public:
	afx_msg void OnBnClickedBrowse();
	afx_msg void OnBnClickedPlay();
	afx_msg void OnBnClickedStop();
	afx_msg void OnBnClickedSwitch();

	DWORD FilePlaybackControlHandler();

	afx_msg void OnBnClickedButtonRestoreDefault();
	afx_msg void OnBnClickedButtonSetMediaRate();
	afx_msg void OnBnClickedCheckVideoOutputPreview();
	afx_msg void OnBnClickedCheckVideoCapturePreview();
	afx_msg void OnBnClickedCheckAnalyzeMediaFile();
	afx_msg void OnBnClickedCheckAudioVolumnOverlayMonitor();
	afx_msg void OnBnClickedCheckShowSafeMargins();
	afx_msg void OnBnClickedCheckCapaudioVolumnOverlayMonitor();
	afx_msg void OnBnClickedCheckFirstFramePause();
	

public:
	CTabCtrl m_tabctlHoldWnd;
	CSystemDlg m_dlgSysSet;
	CAudioDlg  m_dlgAudio;
	CCaptureDlg m_dlgCapture;
	CCurVideoDlg m_dlgCurVideo;
	CNextVideoDlg m_dlgNextVideo;
	CTsDlg m_dlgTs;

	afx_msg void OnDestroy();
	afx_msg void OnTimer(UINT nIDEvent);
	afx_msg void OnTcnSelchangeTabHoldwnd(NMHDR *pNMHDR, LRESULT *pResult);

	afx_msg void OnBnClickedButtonTest();
	afx_msg void OnBnClickedResetCard();
	afx_msg void OnBnClickedCheckDvdSubEnable();
	afx_msg void OnBnClickedCheckWriteLogfile();
	afx_msg void OnBnClickedCheck();
};

#ifndef _DEBUG  // By5000Asiplay DemoView.cpp 的调试版本
inline CBy5000AsiplayDemoDoc* CBy5000AsiplayDemoView::GetDocument() const
   { return reinterpret_cast<CBy5000AsiplayDemoDoc*>(m_pDocument); }
#endif

