#include "IDVP2420DecSDK.h"

#if !defined(AFX_PLAYBACKDLG_H__544924B2_6195_4D95_8897_6F40AF39B038__INCLUDED_)
#define AFX_PLAYBACKDLG_H__544924B2_6195_4D95_8897_6F40AF39B038__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// PlaybackDlg.h : header file
//

#define MAXCHS 2

extern IDVP2420DecSDK	*pDVPDecSDK;
extern BOOL	bSkipDL[MAXCHS];

/*
 stream type - can either be program stream or transport stream
 */
typedef enum {
    PS = 0,
    TS = 1,
} StreamType;

/*
 signal type - can either be PAL or NTSC
 */
typedef enum {
    PAL = 1,
    NTSC = 2
} SignalType;

/*
 MPEG encoding format
 */
typedef enum {
    MPEG1 = 1,
    MPEG2 = 2,
    MPEG4 = 4
} MPEGType;

/*
 Video frame resolution
 */
typedef enum 
{
	D1		= 0,
	VGA		= 1,
	QVGA	= 2,
	SIF		= 3,
	QCIF	= 4
} VideoSize;

/////////////////////////////////////////////////////////////////////////////
// CPlaybackDlg dialog

class CPlaybackDlg : public CDialog
{
private:
	int		m_nChNum;
	int		m_nStreamType;
	int		m_nPlayRatio;
	BOOL	m_bChipInited;
	BOOL	m_bPaused;
	BOOL	m_bDisplayWnd;
    BOOL	m_bBeginScroll;
	char	m_CurPath[MAX_PATH];
	char	m_FileName[MAX_PATH];
	int		m_dTrackBarScale;

	CDialog *m_pDisplayDlg;
	
	void	SetDurationLen(ULONG64 rt);
	void	SetCurPos(ULONG64 rt);

	LRESULT OnDecEOFNotify(WPARAM wParam, LPARAM lParam);

// Construction
public:
	BOOL	m_bDecoded;

	CPlaybackDlg(CWnd* pParent, int nChNum);   // standard constructor

// Dialog Data
	//{{AFX_DATA(CPlaybackDlg)
	enum { IDD = IDD_PLAYBACK_DLG };
		// NOTE: the ClassWizard will add data members here
	//}}AFX_DATA


// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CPlaybackDlg)
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
	//}}AFX_VIRTUAL

// Implementation
protected:

	// Generated message map functions
	//{{AFX_MSG(CPlaybackDlg)
	virtual BOOL OnInitDialog();
	afx_msg void OnDestroy();
	afx_msg void OnPlayBtn();
	afx_msg void OnOpenBtn();
	afx_msg void OnFastBtn();
	afx_msg void OnStopBtn();
	afx_msg void OnRewindBtn();
	afx_msg void OnSsBtn();
	afx_msg void OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar);
	afx_msg void OnTimer(UINT nIDEvent);
	virtual void OnCancel();
	afx_msg void OnDisplaywndChk();
	afx_msg void OnSelchangeMpegCombo();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_PLAYBACKDLG_H__544924B2_6195_4D95_8897_6F40AF39B038__INCLUDED_)
