#pragma once 

#include "TD_PlaySDK.h"
#include "Global.h"
#include <map>
#include <stdio.h>
#include <time.h>
#include <share.h>
#include <string>

#define MAX_MOTION_DETECTION_ROW                18
#define MAX_MOTION_DETECTION_COL                22

#define WM_EVENT_MESSAGE        				WM_USER+5678
#define MSG_FILE_PLAY_END       				0
#define MSG_NEED_DECRYPT_KEY    				1
#define MSG_DECRYPT_KEY_FAILED  				2
#define MSG_DECRYPT_SUCCESS     				3
#define MSG_FILE_SEARCH_END     				4
#define MSG_STREAM_SEARCH_END   				5
#define MSG_VOD_STREAM_END						6

#define MAX_WINDOWNUM							16
#define MAX_SPECIAL_PLAYER_NUM					2							//不显示用于测试回调函数的Player数量
#define MAX_STREAM_SPEED						15000						//CYY ADD   *modify by yangerxing 2014-02-13*
#define MIN_SPEED           					20							//yangerxing  2014-02-13
#define OPENFILE_NORMAL							100
#define OPENFILE_VOD							101
#define CONST_TIMER_GET_PLAYTIME 				1002
#define CONST_INPUT_STREAM	     				1003
#define CONST_MAIN_TIMER						1004
#define CONST_BATCH_CUDA_TEST					1005
#define CONST_BATCH_CAPTURE_BMP					1006

#define SYNC_PLAY_FIRSR_GROUP					0

#define WM_ITEMLBUTTON_DOWN						WM_USER+1000				//左键按下的消息
#define WM_ITEMLBUTTON_UP						WM_USER+1001				//左键按下的消息
#define WM_ITEMLBUTTON_MOVE						WM_USER+1002				//左键按下的消息
#define WM_ITEMLBUTTON_DBCLICK					WM_USER+1004				//左键按下的消息

#define out_put_log_info	OutPutLogMsg("[PLAY-DEMO] %s::%d", __FILE__, __LINE__);OutPutLogMsgEx


enum
{
	SPEED_ADD = 0,
	SPEED_DEC ,
	SPEED_SET
};

//日志输出函数
void	trace_r(const char* _pszFormat, ...);
void	trace_d(const char* _pszFormat, ...);
int		CheckFileSize(const char* _pszFileName);
void	OutPutLogMsg(const char* _pcLogFmt, ...);
void	OutPutLogMsgEx(const char* _pcLogFmt, ...);

//打开文件路径
CString	DialogFileOpenPath(char* _pcType);		
