/**----------------------------------------------------------------------
** Copyright	: Video Surveillance(China) Co. Ltd 2006-20007
** File Name	: 
** Description  : Device related macro definithion
**				
** Created On   : 03/19/07
** Created by   : 
** Modification : 
** 
**---------------------------------------------------------------------*/
  
#ifndef __DEVICE_INFO_HEADER__
#define __DEVICE_INFO_HEADER__

/**
 * device vendor
 */
enum
{
	VS_DEV_VENDOR_UNKNOWN = 0x00,
	VS_DEV_VENDOR_YUNLIAN = 0x01,	// 0x01 yunlian
	VS_DEV_VENDOR_HIK	 = 0x02,	// 0x02 hik
	VS_DEV_VENDOR_UTS	 = 0x03,	// 0x03 uts	
	VS_DEV_VENDOR_ZHIYUAN = 0x04,	// 0x04 yunlian 4001D
	VS_DEV_VENDOR_DAHUA   = 0x05,	// 0x05 dahua   
	VS_DEV_VENDOR_TOPSEE	= 0x06,
	VS_DEV_VENDOR_MAX	 ,  //  max value of device vendor
};

typedef enum
{
	ALARM_TYPE_NONE	= 0,
	ALARM_TYPE_MOTIONDECTECT,	//移动侦测
	ALARM_TYPE_FACEDECTECT,		//人脸检测
	ALARM_TYPE_FACERECOGNIZED,	//人脸识别
	ALARM_TYPE_VIDEO_LOST,		//视频丢失
	ALARM_TYPE_VIDEO_COVERED,	//视频遮挡
	ALARM_TYPE_IO_LOW2HIGH,		//IO由低变高
	ALARM_TYPE_IO_HIGH2LOW,		//IO由高变低
	ALARM_TYPE_STORAGE_FULL,	//存储空间不足
	ALARM_TYPE_RECORD_FAILED,	//录像失败
	ALARM_TYPE_EMERGENCY_CALL,    //增加紧急呼叫告警，收到该告警后，用户可手动从客户端开启对讲
}TopseeDevAlarmType;

typedef	enum
{
	EVENT_TYPE_NONE=0,
	EVENT_TYPE_USB_PLUGIN,		//U盘插入
	EVENT_TYPE_USB_UNPLUG,		//U盘拔出
	EVENT_TYPE_SD1_PLUGIN,		//SD1插入
	EVENT_TYPE_SD1_UNPLUG,		//SD1拔出
	EVENT_TYPE_SD2_PLUGIN,		//SD2插入
	EVENT_TYPE_SD2_UNPLUG,		//SD2拔出
	EVENT_TYPE_RECORD_START,	//录像开始
	EVENT_TYPE_RECORD_FINISHED,	//录像结束
	EVENT_TYPE_RECORD_FILE_REMOVED,	//录像文件删除
	EVENT_TYPE_RECORD_DIR_REMOVED,	//录像目录删除
	EVENT_TYPE_START_UPDATE_FIRMWARE, //固件更新需要较长时间
	EVENT_TYPE_UPDATE_FIRMWARE_OK,
	EVENT_TYPE_UPDATE_FIRMWARE_FAILED,
	EVENT_TYPE_UPDATE_CONFIG_OK, //配置更新不需要时间
	EVENT_TYPE_UPDATE_CONFIG_FAILED,
	EVENT_TYPE_START_REBOOT,
	EVENT_TYPE_GPS_INFO,            //增加GPS位置信息，可用于电子地图
}TopseeDevEventType;

/*
 * device type
 */
#define VS_DEV_TYPE_NONE			0x00
#define VS_DEV_TYPE_CAMERA		  0x01
#define VS_DEV_TYPE_ENCODER		 0x02
#define VS_DEV_TYPE_IPCAM		   0x03
#define VS_DEV_TYPE_DVR			 0x04
#define VS_DEV_TYPE_DECODER		 0x05
#define VS_DEV_TYPE_SERIAL		  0x06
#define VS_DEV_TYPE_PTZ			 0x07
#define VS_DEV_TYPE_ALARM_IN		0x08
#define VS_DEV_TYPE_ALARM_OUT	   0x09
#define VS_DEV_TYPE_AUDIO_LINE_IN   0x0A
#define VS_DEV_TYPE_AUDIO_MIC_IN	0x0B
#define VS_DEV_TYPE_AUDIO_OUT	   0x0C
#define VS_DEV_TYPE_MONITOR		 0x0D
#define VS_DEV_TYPE_SOFT_DECODER	0x0E
#define VS_DEV_TYPE_MAX			 VS_DEV_TYPE_SOFT_DECODER+1


/*
 * stream type
 */
#define VS_REC_TYPE_UNCONDITIONAL 'A'  // unconditional recording
#define VS_REC_TYPE_DRIVEN		'B'  // event/alarm-driven recording
#define VS_REC_TYPE_NO_RECORDING  'C'  // no recording
#define VS_REC_TYPE_RECORD_IF_STREAMING  'D'  //有流经过时才录像


/*
 * stream type
 */
enum
{
	VS_STREAM_TYPE_PLAIN		= 0x00,
	VS_STREAM_TYPE_YUNLIAN	= 0x01,
	VS_STREAM_TYPE_HIK		= 0x02,
	VS_STREAM_TYPE_TS		= 0x03,
	VS_STREAM_TYPE_DAHUA		= 0x05,
	VS_STREAM_TYPE_TPSEE		= 0x06,
	VR_ST_MAX
};

/*
 * video codec
 */
#define VS_VIDEO_CODEC_NONE		 0x00
#define VS_VIDEO_CODEC_MPEG4		0x01
#define VS_VIDEO_CODEC_H264		 0x02


/*
 * video format
 */
#define VS_VIDEO_FORMAT_NONE		0x00
#define VS_VIDEO_FORMAT_PAL		 0x01
#define VS_VIDEO_FORMAT_NTSC		0x02

/*
 * video res
 */
#define VS_VIDEO_SIZE_NONE		  0x00
#define VS_VIDEO_SIZE_QCIF		  0x01
#define VS_VIDEO_SIZE_CIF		   0x02
#define VS_VIDEO_SIZE_HD1		  0x03
#define VS_VIDEO_SIZE_D1			0x04


/*
 * PTZ protocol
 */
#define VS_PTZ_PROTO_NONE		   0x00
#define VS_PTZ_PROTO_PELCO_D		0x01
#define VS_PTZ_PROTO_PELCO_P		0x02
#define VS_PTZ_PROTO_SAMSUNG		0x03
#define VS_PTZ_PROTO_OTHER		  0x04

/*
 * PTZ serial parity
 */
#define VS_PTZ_SERRIAL_PAR_NONE	 0x00 
#define VS_PTZ_SERRIAL_PAR_ODD	  0x01
#define VS_PTZ_SERRIAL_PAR_EVEN	 0x02
#define VS_PTZ_SERRIAL_PAR_MARK	 0x03
#define VS_PTZ_SERRIAL_PAR_SPACE	0x04

/*
 * PTZ serial flow control
 */
#define VS_PTZ_SERIAL_FC_NONE	   0x00
#define VS_PTZ_SERIAL_FC_HW		 0x01
#define VS_PTZ_SERIAL_FC_XONOFF	 0x02

/*
 * Audio-in type
 */
#define VS_AUDIO_IN_NONE			0x00
#define VS_AUDIO_IN_MIC			 0x01
#define VS_AUDIO_IN_LINEIN		  0x02

/*
 * Audio-out type
 */
#define VS_AUDIO_OUT_NONE		   0x00
#define VS_AUDIO_OUT_LINEOUT		0x01

/*
 * audio format
 */
#define VS_AUDIO_FORMAT_NONE		0x00
#define VS_AUDIO_FORMAT_G722		0x01
#define VS_AUDIO_FORMAT_G711A	   0x02
#define VS_AUDIO_FORMAT_G711MU	  0x03
#define VS_AUDIO_FORMAT_ADPCM	   0x04
#define VS_AUDIO_FORMAT_G726		0x05
#define VS_AUDIO_FORMAT_BUTT		0x06
#define VS_AUDIO_FORMAT_MPT		 0x07


/*
 * sound track
 */
#define VS_AUDIO_SOUND_TRACK_NONE   0x00
#define VS_AUDIO_SOUND_TRACK_MONO   0x01
#define VS_AUDIO_SOUND_TRACK_STEREO 0x02

/*
 * Alarm-in device type
 */
#define VS_ALARM_IN_NONE			0x00
#define VS_ALARM_IN_FIRE			0x01
#define VS_ALARM_IN_SMOKE		   0x02
#define VS_ALARM_IN_INFRARED		0x03
#define VS_ALARM_IN_GAS			 0x04
#define VS_ALARM_IN_TEMPERATURE	 0x05
#define VS_ALARM_IN_GATING		  0x06
#define VS_ALARM_IN_OTHER		   0x07

/*
 * Alarm-in device alarm level
 */
#define VS_ALARM_LEVEL_CRITICAL	 0x01
#define VS_ALARM_LEVEL_MAJOR		0x02
#define VS_ALARM_LEVEL_MINOR		0x03
#define VS_ALARM_LEVEL_WARNING	  0x04


/*
 * Alarm-out device type
 */
#define VS_ALARM_OUT_NONE		   0x00
#define VS_ALARM_OUT_BELL		   0x01
#define VS_ALARM_OUT_LAMP		   0x02
#define VS_ALARM_OUT_OTHER		  0x03




/*
 * vendor and device name info
 */
#define VS_MAX_CHINESE_DESC  64
#define VS_MAX_ENGLISH_DESC  64

typedef struct VS_VENDOR_INFO_S
{
	char szEnglish[VS_MAX_ENGLISH_DESC];
	char szChinese[VS_MAX_CHINESE_DESC];
}VS_VENDOR_INFO_T;


typedef struct VS_DEVTYPE_INFO_S
{
	char szEnglish[VS_MAX_ENGLISH_DESC];
	char szChinese[VS_MAX_CHINESE_DESC];
}VS_DEVTYPE_INFO_T;

extern VS_VENDOR_INFO_T g_vs_vendor_info[VS_DEV_VENDOR_MAX];
extern VS_DEVTYPE_INFO_T g_vs_devtype_info[VS_DEV_TYPE_MAX];

	
#endif /* __DEVICE_INFO_HEADER__ */

