#if !defined(AFX_DLGVIDEOCONFIG_H__3A80F825_0C60_4AB2_BCEC_8A67B69DA23D__INCLUDED_)
#define AFX_DLGVIDEOCONFIG_H__3A80F825_0C60_4AB2_BCEC_8A67B69DA23D__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// DlgVideoConfig.h : header file
//
#include "MsIpcSDK.h"

enum COMBO_TYPE{
	CT_MAIN_CODEC = 0,
	CT_MAIN_RES		,
	CT_MAIN_FRAME	,
	CT_MAIN_BITRATE	,
	CT_MAIN_BITCTRL	,

	CT_SUB_CODEC = 10,
	CT_SUB_RES		,
	CT_SUB_FRAME	,
	CT_SUB_BITRATE	,
	CT_SUB_BITCTRL	,
};

/////////////////////////////////////////////////////////////////////////////
// CDlgVideoConfig dialog

class CDlgVideoConfig : public CDialog
{
// Construction
public:
	CDlgVideoConfig(CWnd* pParent = NULL);   // standard constructor
	
	LONG m_nUserId;
// Dialog Data
	//{{AFX_DATA(CDlgVideoConfig)
	enum { IDD = IDD_DLG_VIDEO_CONFIG };
	CComboBox	m_cbSubBitCtrl;
	CComboBox	m_cbMainBitCtrl;
	CEdit	m_edText;
	CEdit	m_edSubIFrm;
	CEdit	m_edMainIFrm;
	CComboBox	m_cbTextPos;
	CComboBox	m_cbDatePos;
	CComboBox	m_cbSubRes;
	CComboBox	m_cbMainRes;
	CComboBox	m_cbSubFrmRate;
	CComboBox	m_cbMainFrmRate;
	CComboBox	m_cbDateFmt;
	CComboBox	m_cbSubCodec;
	CComboBox	m_cbMainCodec;
	CComboBox	m_cbSubBitrate;
	CComboBox	m_cbMainBitrate;
	CButton	m_ChkEnableSub;
	CButton	m_ChkOsdText;
	CButton	m_ChkOsdDate;
	//}}AFX_DATA

private:
	char m_productmodel[32];
	void SelectComboString(enum COMBO_TYPE type, LPCTSTR str);
	void SelectComboValue(enum COMBO_TYPE type, int nValue);

	BOOL m_bIsAmba, m_bIsHisi, m_bIsTi, m_bIs5M, m_bIs4M, m_bIs3M, m_bIsH264, m_bIsH265, m_bIsMpeg4, m_bIsMjpeg,	m_bIsSubMjpeg;
	void UpdateInformation();

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CDlgVideoConfig)
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
	//}}AFX_VIRTUAL

// Implementation
private:
	int m_ficker;
	void InitOsdInfo();
	void InitMainStream();
	void InitSubStream();
	int checkMegapixel();
	void InitMainBitrate();
	void InitSubFrameRate();
	void InitSubBitrate();
// 	int getMainBitRateIndex(char* bitRate);
// 	int getSubBitRateIndex(char* bitRate);
protected:

	// Generated message map functions
	//{{AFX_MSG(CDlgVideoConfig)
	virtual BOOL OnInitDialog();
	virtual void OnOK();
	afx_msg void OnChkEnableOsdText();
	afx_msg void OnChkEnableOsdDate();
	afx_msg void OnChkEnableSub();
	afx_msg void OnMainChangeCodec();
	afx_msg void OnMainChangeRes();
	afx_msg void OnSubChangeCodec();
	afx_msg void OnSubChangeRes();
	afx_msg void OnTimer(UINT nIDEvent);
	//}}AFX_MSG

	DECLARE_MESSAGE_MAP()
};

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_DLGVIDEOCONFIG_H__3A80F825_0C60_4AB2_BCEC_8A67B69DA23D__INCLUDED_)
