/**
 * Copyright (c) 2023, ZheJiang Dahua Technology CO.,LTD.
 * All rights reserved.
 *
*/
#ifndef DPSDK_DPSDK_H
#define DPSDK_DPSDK_H

#include "DPSDKDefine.h"

//////////////////////////////////////////////////////////////////////////
/*
 *	Callback interface definition
 */
/**
 * @brief	Set event callback function.
 * @param	[IN] iSessionID			User session ID
 * @param	[IN] fEventCallBack		Event callback function
 * @param	[IN] pUserData			User data
 * @return	Return 0 if succeeded, return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_SetEventCallBack(DPSDK_INT32 iSessionID,
														   EventCallBack fEventCallBack = NULL,
														   DPSDK_VOID* pUserData = NULL);

/**
 * @brief	Set event callback function.
 * @param	[IN] iSessionID			User session ID
 * @param	[IN] fEventCallBack		Event callback function
 * @param	[IN] pUserData			User data
 * @return	Return 0 if succeeded, return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_SetEventCallBackEx(DPSDK_INT32 iSessionID,
															 EventCallBackEx fEventCallBack = NULL,
															 DPSDK_VOID* pUserData = NULL);

DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_SetEventCallBackForUrl(DPSDK_INT32 iSessionID,
																 EventCallBack fEventCallBack = NULL,
																 DPSDK_VOID* pUserData = NULL);

DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_SetMediaEventCallBack(DPSDK_INT32 iSessionID,
																EventCallBack fEventCallBack = NULL,
																DPSDK_VOID* pUserData = NULL);
//////////////////////////////////////////////////////////////////////////
/*
 *	Init interface
 */
/**
 * @brief	System initialization.
 * @return	Return 0 if succeeded, return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_Init();

/**
 * @brief	System decinitialization.
 * @return	Return 0 if succeeded, return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_Uninit();

//////////////////////////////////////////////////////////////////////////
/*
 *	Global Settings interface
 */
/**
 * @brief	Set log information.
 * @param	[IN] pLogPath		Log root directory
 * @param	[IN] iLogLevel		Log level. For details, see DPSDK_LOG_LEVEL_TYPE definition.
 * @return	Return 0 if succeeded, return error code if failed.
 * @note	This interface shall be called before initialization.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_SetLogInfoEx(const DPSDK_CHAR* pLogPath,
	DPSDK_INT32 iLogLevel);

/**
 * @brief	Enable decoding process.
 * @param	[IN] iProcessNum	Process number enabled
 * @param	[IN] iChannelNum	Decoding channel number of single process
 * @return	Return 0 if succeeded, return error code if failed.
 * @note	This interface shall be called before initialization.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_StartDecodeProcess(DPSDK_INT32 iProcessNum, DPSDK_INT32 iChannelNum);

/**
 * @brief	Set platform data compression type.
 * @param	[IN] iCompressType	Compression mode. For details, see DPSDK_COMPRESS_TYPE definition.
 * @return	Return 0 if succeeded, return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_SetCompressType(DPSDK_INT32 iCompressType);

/**
* @brief	Set Talk Type.
* @param	[IN] iTalkType			talk type, 1=DHAV, 0=old head 00 00 01.
* @return
*/
DPSDK_EXPORT DPSDK_VOID DPSDK_CALL DPSDK_SetTalkType(DPSDK_INT32 iTalkType);

/*@brief	Vtcall Support Rudp.
* @param[IN] iSessionId			user Sessionid
* @param[IN] bSupport			true, support
* @return
*/
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_UpdateVtcallSupportRudp(DPSDK_INT32 iSessionId, DPSDK_BOOL bSupport);

//////////////////////////////////////////////////////////////////////////
/*
 *	Login related interface
 */

/**
 * @brief	User login.
 * @param	[IN] pLoginParam	Login parameter
 * @param	[OUT] pSessionID	User session ID
 * @param	[OUT] pRetInfo      result
 * @return	Return 0 if succeeded, return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_Login(DPSDK_LOGIN_PARAM* pLoginParam,
												DPSDK_INT32* pSessionID,
												DPSDK_LOGIN_RET* pRetInfo = NULL);						
/**
* @brief	User relogin.
* @param	[IN] iSessionID	User session ID
* @return	Return 0 if succeeded, return error code if failed.
*/
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_Relogin(DPSDK_INT32 iSessionID);

/**
 * @brief	User logout.
 * @param	[IN] iSessionID	User session ID
 * @return	Return 0 if succeeded, return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_Logout(DPSDK_INT32 iSessionID);

/**
* @brief	Get Config Product Info.
* @param	[IN] iSessionID	User session ID
* @param	[OUT] pProductInfo	Product Info
* @return	Return 0 if succeeded, return error code if failed.
*/
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_GetConfigProductInfo(DPSDK_INT32 iSessionID, DPSDK_GET_PRODUCT_INFO* pProductInfo);

/**
* @brief	Get Oversea Platform Info.
* @param	[IN] iSessionID	User session ID
* @param	[OUT] pOverseaPlatformInfo	Platform Info
* @return	Return 0 if succeeded, return error code if failed.
*/
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_GetOverseaPlatformInfo(DPSDK_INT32 iSessionID, DPSDK_GET_OVERSEA_PLATFORMINFO* pOverseaPlatformInfo);

/**
* @brief	Set to enable https or not.
* @param	[IN] iHttpsMode			https mode, 0=disable, 1=enable£¬ 2=one-way authentication with cert. For details, see DPSDK_HTTPS_MODE definition.
* @return
*/
DPSDK_EXPORT DPSDK_VOID DPSDK_CALL DPSDK_SetHttpsMode(DPSDK_INT32 iHttpsMode);

/**
* @brief	Set to CA certificate verification.
* @param	[IN] pCertPath			CA certificate file path
* @return
*/
DPSDK_EXPORT DPSDK_VOID DPSDK_CALL DPSDK_SetCertificatePath(const DPSDK_CHAR* pCertPath);

/**
* @brief	Set language type.
* @param	[IN] language			language type, zh-cn:chinese, en-us:english,
* @return
*/
DPSDK_EXPORT DPSDK_VOID DPSDK_CALL DPSDK_SetLanguage(const char* language);

/**
 * @brief	Set SSL info of MQ.
 * @param	[IN] pSSLInfo			SSL info of MQ.
 * @return	Return 0 if succeeded, return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_SetSSLInfo(DPSDK_MQ_SSL_INFO* pSSLInfo);

/**
 * @brief	Get SDK version number.
 * @return	Return 0 if succeeded, return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_GetVersion();

/**
 * @brief	get file by url (http:/https:)
 * @param	[IN] pParam			parameter
 * @return	Return 0 if succeeded, return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_GetFileByUrl(DPSDK_GETFILE_PARAM* pParam);

/**
 * @brief	Acquire parameter person according to id
 * @param	[IN] iSessionID				User Session ID
 * @param	[IN] szPersonId				Parameter Person id
 * @param	[OUT] pPersonInfo			Parameter Person Info
 * @return	Return 0 if succeeded, return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_GetPersonDetail(DPSDK_INT32 iSessionID,
															  DPSDK_CHAR* szPersonId,
															  DPSDK_SERVER_PERSON_INFO* pPersonInfo);

//************************************
// Method:    DPSDK_GetPlatformIndustyType
// FullName:  DPSDK_GetPlatformIndustyType
// Access:    public 
// Returns:   DPSDK_INT32
// Qualifier:
//************************************
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_GetPlatformIndustyType(DPSDK_INT32 iSessionID, DPSDK_PLATFORMINDSUTYINFO* pPlatformIndustyType);


/**
 * @brief	Get address information of application client.
 * @param	[IN] iSessionID		User session ID
 * @param	[OUT] pBuf			Data buffer
 * @param	[IN] uiBufLen		Data buffer length
 * @return	Return 0 if succeeded, return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_GetClientRoad(DPSDK_INT32 iSessionID,
														DPSDK_CHAR* pBuf,
														DPSDK_UINT32 uiBufLen);

DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_GetClientUpdateInfo(DPSDK_INT32 iSessionID,
															  DPSDK_CHAR* pBuf,
															  DPSDK_UINT32 uiBufLen);

/**
* @brief	Acquire all config
* @param	[IN] iSessionID				User Session ID
* @param	[OUT] pConfigInfo			All Config Info
* @return	Return 0 if succeeded, return error code if failed.
*/
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_GetAllConfig(DPSDK_INT32 iSessionID,
													   DPSDK_ALL_SERVER_CONFIG_INFO* pConfigInfo,
													   DPSDK_WATERMARK_INFO_LIST* pWaterMarkConfigInfo,
													   DPSDK_UINT32 uiBufLen);

/*
* @brief	is need to Add token field interface.
* @param	[IN] iSessionID			User session ID
* @param	[OUT] pIsNeed			is need
* @return	Return 0 if succeeded, return error code if failed.
*/
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_IsNeedAddTokenForWeb(DPSDK_INT32 iSessionID, DPSDK_BOOL* pIsNeed);

/**
 * @brief	Get version information of application client.
 * @param	[IN] iSessionID		User session ID
 * @param	[OUT] pBuf			Data buffer
 * @param	[IN] uiBufLen		Data buffer length
 * @return	Return 0 if succeeded, return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_GetClientVersion(DPSDK_INT32 iSessionID,
														   DPSDK_CHAR* pBuf,
														   DPSDK_UINT32 uiBufLen);

/**
* @brief	get server type
* @param	[IN] iSessionID			User session ID
* @param	[OUT] pServerType		Server type see DPSDK_SERVER_TYPE definition
* @return	Return 0 if succeeded, return error code if failed.
*/
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_GetServerType(DPSDK_INT32 iSessionID,
	DPSDK_INT32* pServerType);

/**
* @brief	Get the configured linkage channel number through the channel number.
* @param	[IN] iSessionID			User session ID
* @param	[IN] pChannelID			Channel ID
* @param	[IN] fDataCallBack					Data synchronization callback function, refer to DPSDK_DATA_GET_MAINSUB_GROUP_INFO for data type
* @param	[IN] pUserData						User Data
* @return	Return 0 if succeeded, return error code if failed.
*/
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_GetMainSubGroup(DPSDK_INT32 iSessionID,
	DPSDK_CHAR* pChannelID,
	DPSDK_DataCallback fDataCallBack,
	DPSDK_VOID* pUserData);

/**
 * @brief	Get menu right information. 
 * @param	[IN] iSessionID				User session ID
 * @param	[OUT] pMenuRightList		Menu right list
 * @param	[IN] uiBufLen				Buffer length
 * @param	[OUT] pForbiddenMenuList	Forbidden Menu right list
 * @param	[IN] uiForbiddenMenuBufLen	Forbidden Menu Buffer length
 * @param	[IN] pMenuType				Menu Type: "1"-Management menu, "2"-Client menu
 * @return	Return 0 if succeeded, return error code if failed.
 * @note	uiBufLen = sizeof(DPSDK_MENU_RIGHT_LIST) + (num-1)*sizeof(DPSDK_MENU_RIGHT)
 *			 Parameter num refers to the number of menu rights you need to query. Parameter num >= 1.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_GetMenuRight(DPSDK_INT32 iSessionID,
													   DPSDK_MENU_RIGHT_LIST* pMenuRightList,
													   DPSDK_UINT32 uiBufLen,
													   DPSDK_MENU_RIGHT_LIST* pForbiddenMenuList,
													   DPSDK_UINT32 uiForbiddenMenuBufLen,
													   DPSDK_CHAR* pMenuType = NULL);
/**
* @brief	Get REST handle.
* @param	[IN] iSessionID			User session ID
* @return	Return REST handle if succeeded. Return NULL if failed.
* @note		Temporary interface which needs to be removed later. 
*/
DPSDK_EXPORT DPSDK_LPVOID DPSDK_CALL DPSDK_GetRestHandle(DPSDK_INT32 iSessionID);

//////////////////////////////////////////////////////////////////////////
/*
 *	User related interface
 */

/**
 * @brief	Save User Private Data
 * @param	[IN] iSessionID				User Session ID
 * @param	[IN] pUserDataName			User Data Name
 * @param	[IN] pUserData				User Data
 * @param	[IN] uiDataLen				User Data Length
 * @return	Return 0 if succeeded, return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_SaveUserData(DPSDK_INT32 iSessionID,
													   DPSDK_CHAR* pUserDataName,
													   DPSDK_CHAR* pUserData,
													   DPSDK_UINT32 uiDataLen);
/**
 * @brief	Acquire User Private Data
 * @param	[IN] iSessionID				User Session ID
 * @param	[IN] pUserDataName			User Data Name
 * @param	[OUT] pUserData				User Data
 * @return	Return 0 if succeeded, return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_GetUserData(DPSDK_INT32 iSessionID,
													  DPSDK_CHAR* pUserDataName,
													  DPSDK_CHAR** pUserData);

/**
 * @brief	Delete User Private Data
 * @param	[IN] iSessionID				User Session ID
 * @param	[IN] pUserDataName			User Data Name
 * @return	Return 0 if succeeded, return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_DelUserData(DPSDK_INT32 iSessionID,
													  DPSDK_CHAR* pUserDataName);
/**
* @brief	Get user token.
* @param	[IN] iSessionID			User session ID
* @param	[OUT] pTokenBuffer		Token buffer
* @param	[IN] iBufLen			Buffer length
* @return	Return 0 if succeeded, return error code if failed.
* @note		Temporary interface which needs to be removed later.
*/
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_GetUserToken(DPSDK_INT32 iSessionID,
	DPSDK_CHAR* pTokenBuffer,
	DPSDK_UINT32 iBufLen);
//////////////////////////////////////////////////////////////////////////
/*
 *	Time calibration interface
 */

/**
 * @brief	Network-wide timing.
 * @param	[IN] iSessionID				User session ID
 * @return	Return 0 if succeeded, return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_SyncTime(DPSDK_INT32 iSessionID);

/**
 * @brief	Set server time.
 * @param	[IN] iSessionID				User session ID
 * @param	[IN] pServerTimeInfo		Server time
 * @return	Return 0 if succeeded, return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_ServerTime(DPSDK_INT32 iSessionID, 
													DPSDK_SERVER_TIME* pServerTimeInfo);


/**
 * @brief	Get sync server time.
 * @param	[IN] iSessionID					User session ID
 * @param	[OUT] pSyncServerTimeResult		Sync server time
 * @return	Return 0 if succeeded, return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_GetSyncServerTime(DPSDK_INT32 iSessionID, 
											   DPSDK_SYNCSERVER_TIME* pSyncServerTimeResult);

//////////////////////////////////////////////////////////////////////////
/*
 *	Video Preview Interface
 */

/**
 * @brief	Start unicast video preview.
 * @param	[IN] iSessionID			User session ID
 * @param	[IN] pRealPlayParam		Video preview parameters. For details, see DPSDK_REALPLAY_PARAM structure.
 * @param	[IN] pTrackId			Track ID
 * @param	[OUT] pMediaSessionID	Media session ID
 * @return	Return 0 if succeeded, return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_StartRealPlay(DPSDK_INT32 iSessionID, 
														DPSDK_REALPLAY_PARAM* pRealPlayParam,
														DPSDK_INT32* pMediaSessionID);
/**
 * @brief	Start unicast video preview.
 * @param	[IN] iSessionID			User session ID
 * @param	[IN] pRealPlayParam		Video preview parameters. For details, see DPSDK_REALPLAY_PARAM structure.
 * @param	[IN] pTrackId			Track ID
 * @param	[OUT] pUrl	        Url,Token
 * @return	Return 0 if succeeded, return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_GetRealStreamUrl(DPSDK_INT32 iSessionID, 
														   DPSDK_REALSTREAM_PARAM* struRealStream,
														   DPSDK_URL* pUrl);

/**
 * @brief	Start multicast video preview.
 * @param	[IN] iSessionID			User session ID
 * @param	[IN] pMulitcastParam	Video preview parameters. For details, see DPSDK_MULITCAST_REALPLAY_PARAM structure.
 * @param	[OUT] pMediaSessionID	Media session ID
 * @return	Return 0 if succeeded, return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_StartMulitcastRealPlay(DPSDK_INT32 iSessionID, 
																DPSDK_MULITCAST_REALPLAY_PARAM* pMulitcastParam,
																DPSDK_INT32* pMediaSessionID);

/**
 * @brief	Start multi-image video preview.
 * @param	[IN] iSessionID			User session ID
 * @param	[IN] pMulitviewParam	Video preview parameters. For details, see DPSDK_MULITVIEW_REALPLAY_PARAM structure.
 * @param	[OUT] pMediaSessionID	Media session ID
 * @return	Return 0 if succeeded, return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_StartMulitviewRealPlay(DPSDK_INT32 iSessionID, 
																DPSDK_MULITVIEW_REALPLAY_PARAM* pMulitviewParam,
																DPSDK_INT32* pMediaSessionID);

/**
 * @brief	Close video preview.
 * @param	[IN] iSessionID			User session ID
 * @param	[IN] iMediaSessionID	Media session ID
 * @return	Return 0 if succeeded, return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_StopRealPlay(DPSDK_INT32 iSessionID,
 													   DPSDK_INT32 iMediaSessionID);



/** 
 * @brief	Get play mode.
 * @param	[IN] iSessionID			User session ID
 * @param	[IN] iMediaSessionID	Media Session ID
 * @param	[OUT] pStreamMode		Play mode. For details, see DPSDK_STREAM_MODE.
 * @return	Return 0 if succeeded, return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_GetPlayStreamMode(DPSDK_INT32 iSessionID,
															DPSDK_INT32 iMediaSessionID,
															DPSDK_UINT32* pStreamMode);

/** 
 * @brief	Set play mode.
 * @param	[IN] iSessionID			User session ID
 * @param	[IN] iMediaSessionID	Media Session ID
 * @param	[IN] uiStreamMode		Play mode. For details, see DPSDK_STREAM_MODE Enum.
 * @param	[IN] uiDelayTime		Timeout period. Effective when uiStreamMode is set to STREAM_CUSTOM_MODE.
 * @return	Return 0 if succeeded, return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_SetPlayStreamMode(DPSDK_INT32 iSessionID,
															DPSDK_INT32 iMediaSessionID,
															DPSDK_UINT32 uiStreamMode,
															DPSDK_UINT32 uiDelayTime);

/**
 * @brief	Operate (lock, unlock) videos.
 * @param	[IN] iSessionID			User session ID
 * @param	[IN] iMediaSessionID	Media Session ID
 * @param	[IN] pCodeID			Video channel ID
 * @param	[IN] iOperateType		Operation Type. For details, see DPSDK_VIDEO_LOCK_TYPE.
 * @return	Return 0 if succeeded, return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_OperateRealPlay(DPSDK_INT32 iSessionID,
														  DPSDK_INT32 iMediaSessionID,
														  DPSDK_CHAR* pCodeID, 
														  DPSDK_INT32 iOperateType);

/**
 * @brief	Get the URL of platform snapshot images.(VSL)
 * @param	[IN] iSessionID			User session ID
 * @param	[IN] pChannelID			Channel ID
 * @param	[OUT] pPicURL			Snapshot URL
 * @param	[IN] uiPicURLSize		Memory size of pPicURL
 * @return	Return 0 if succeeded, return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_PlatformSnapshotURL(DPSDK_INT32 iSessionID,
														      DPSDK_CHAR* pChannelID,
														      DPSDK_CHAR* pPicURL,
															  DPSDK_UINT32 uiBufSize);
//////////////////////////////////////////////////////////////////////////
/*
 *	Video Playback Interface
 */
 /**
 * @brief	Query record information in the channel.
 * @param	[IN] iSessionID			User session ID
 * @param	[IN] pChannelID			Channel ID
 * @param	[OUT] pRecordInfo		Channel record information
 * @return	Return 0 if succeeded, return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_GetRecordStatus(DPSDK_INT32 iSessionID, DPSDK_CHAR* pChannelID, DPSDK_RECORD_STATUS_INFO* pRecordInfo);

/**
 * @brief	Add record tag.
 * @param	[IN] iSessionID			User session ID
 * @param	[IN] pAddRecordTagInfo	Add record tag parameters. For details, see DPSDK_ADD_RECORD_TAG_PARAM structure.
 * @param	[OUT] pTagId			Tag ID
 * @return	Return 0 if succeeded, return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_AddRecordTag(DPSDK_INT32 iSessionID, DPSDK_ADD_RECORD_TAG_PARAM* pAddRecordTagInfo, DPSDK_CHAR* pTagId, DPSDK_INT32 iBufferLen);

/**
* @brief	Delete record tag.
* @param	[IN] iSessionID			User session ID
* @param	[IN] uTagId				Record tag ID
* @return	Return 0 if succeeded. Return error code if failed.
*/
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_DelRecordTag(DPSDK_INT32 iSessionID, DPSDK_CHAR* pTagId, DPSDK_BASE_PARAM* pBaseInfo = NULL);

/**
 * @brief	Query record tag.
 * @param	[IN] iSessionID				User session ID
 * @param	[IN] pQueryRecordTag		Conditions to query the record tag. For details, see DPSDK_QUERY_RECORD_TAG_PARAM structure.
 * @param	[OUT] pRecordTagList		Query results. For detailed parameters, see DPSDK_RECORD_TAG_INFO_LIST.
 * @return	Return 0 if succeeded, return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_QueryRecordTag(DPSDK_INT32 iSessionID, DPSDK_QUERY_RECORD_TAG_PARAM* pQueryRecordTag, DPSDK_RECORD_TAG_INFO_LIST** pRecordTagList, DPSDK_UINT32* pTotal = NULL);
/**
 * @brief	Lock the record.
 * @param	[IN] iSessionID				User session ID
 * @param	[IN] pLockRecordInfo		Locking record parameters. For details, see DPSDK_LOCK_RECORD_PARAM structure.
 * @param	[OUT] pLockId				Lock ID
 * @return	Return 0 if succeeded, return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_LockRecord(DPSDK_INT32 iSessionID, DPSDK_LOCK_RECORD_PARAM* pLockRecordInfo, DPSDK_INT32* pLockId);

/**
 * @brief	Unlock the record.
 * @param	[IN] iSessionID				User session ID
 * @param	[IN] pLockId				Unlock ID. The number is specified by iCount.
 * @param	[IN] iCount					Unlock number
 * @return	Return 0 if succeeded, return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_UnlockRecord(DPSDK_INT32 iSessionID, DPSDK_UINT32* pLockId, DPSDK_INT32 iCount);

/**
 * @brief	Query record lock information.
 * @param	[IN] iSessionID				User session ID
 * @param	[IN] pQueryLockRecord		Query the record lock conditions. For details, see DPSDK_QUERY_LOCK_RECORD_PARAM structure.
 * @param	[OUT] pLockRecordList		Query results. For details, see DPSDK_RECORD_LOCK_INFO_LIST.
 * @return	Return 0 if succeeded, return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_QueryLockRecord(DPSDK_INT32 iSessionID, DPSDK_QUERY_LOCK_RECORD_PARAM* pQueryLockRecord, DPSDK_RECORD_LOCK_INFO_LIST** pLockRecordList);

/**
 * @brief	Lock record file.(VSL)
 * @param	[IN] iSessionID				User session ID
 * @param	[IN] pLockFileInfo			Parameters to Lock Record Files
 * @param	[OUT] pResult				Lock result
 * @return	Return 0 if succeeded, return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_LockRecordFile(DPSDK_INT32 iSessionID, DPSDK_LOCK_RECORD_FILE_PARAM* pLockFileInfo, DPSDK_LOCK_RECORD_FILE_RESULT* pResult);

/**
 * @brief	Unlock record file.(VSL)
 * @param	[IN] iSessionID				User session ID
 * @param	[IN] pUnlockFileInfo		Parameters to unlock record files
 * @param	[OUT] pResult				Unlock result
 * @return	Return 0 if succeeded, return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_UnlockRecordFile(DPSDK_INT32 iSessionID, DPSDK_UNLOCK_RECORD_FILE_PARAM* pUnlockFileInfo, DPSDK_LOCK_RECORD_FILE_RESULT* pResult);

/**
 * @brief	Query record Date.
 * @param	[IN] iSessionID				User session ID
 * @param	[IN] pQueryDateInfo			Conditions to query record date.For details, see DPSDK_QUERY_RECORD_DATE_PARAM structure.
 * @param	[OUT] pRecordDate			Query results. For detailed parameters, see DPSDK_RECORD_DATE_INFO.
 * @return	Return 0 if succeeded, return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_QueryRecordDate(DPSDK_INT32 iSessionID, DPSDK_QUERY_RECORD_DATE_PARAM* pQueryDateInfo, DPSDK_RECORD_DATE_INFO* pRecordDate);

/**
 * @brief	Query records.
 * @param	[IN] iSessionID				User session ID
 * @param	[IN] pQueryRecord			Conditions to query the record. For details, see DPSDK_QUERY_RECORD_PARAM structure.
 * @param	[OUT] pRecordList			Query results. For detailed parameters, see DPSDK_RECORD_INFO_LIST.
 * @param	[IN] uiBufLen				Buffer length
 * @return	Return 0 if succeeded, return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_QueryRecord(DPSDK_INT32 iSessionID, DPSDK_QUERY_RECORD_PARAM* pQueryRecord, DPSDK_RECORD_INFO_LIST* pRecordList, DPSDK_UINT32 uiBufLen);

/**
 * @brief	Delete records.
 * @param	[IN] iSessionID				User session ID
 * @param	[IN] pDeleteRecord			Conditions to delete records. For details, see DPSDK_DELETE_RECORD_REASON_PARAM structure.
 * @return	Return 0 if succeeded, return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_DeleteRecord(DPSDK_INT32 iSessionID, DPSDK_DELETE_RECORD_REASON_PARAM* pDeleteRecord);

/**
 * @brief	Query alarm records
 * @param	[IN] iSessionID				User session ID
 * @param	[IN] pQueryAlarmRecord		Conditions to query alarm records.For details, see DPSDK_QUERY_ALARM_RECORD_PARAM structure.
 * @param	[OUT] pRecordList			Query results. For detailed parameters, see DPSDK_RECORD_PARAM.
 * @param	[IN] uiBufLen				Buffer length
 * @return	Return 0 if succeeded, return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_QueryAlarmRecord(DPSDK_INT32 iSessionID, DPSDK_QUERY_ALARM_RECORD_PARAM* pQueryAlarmRecord, DPSDK_RECORD_INFO_LIST* pRecordList, DPSDK_UINT32 uiBufLen);

 /**
 * @brief	Start playback by time
 * @param	[IN] iSessionID			User session ID
 * @param	[IN] pPlaybackParam		Playback by time parameters.For details, see DPSDK_PLAYBACK_PARAM structure.
 * @param	[OUT] pMediaSessionID	Media session ID
 * @return	Return 0 if succeeded, return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_StartPlaybackByTime(DPSDK_INT32 iSessionID,
															  DPSDK_PLAYBACK_BY_TIME_PARAM* pPlaybackParam,
															  DPSDK_INT32* pMediaSessionID);
/**
 * @brief	Start playback by record.
 * @param	[IN] iSessionID			User session ID
 * @param	[IN] pPlaybackParam		Playback by record parameters. For details, see DPSDK_PLAYBACK_PARAM structure.
 * @param	[OUT] pMediaSessionID	Media session ID
 * @return	Return 0 if succeeded, return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_StartPlaybackByFile(DPSDK_INT32 iSessionID,
															  DPSDK_PLAYBACK_BY_FILE_PARAM* pPlaybackParam,
															  DPSDK_INT32* pMediaSessionID);
 
/**
 * @brief	Get playback url by file.
 * @param	[IN] iSessionID			User session ID
 * @param	[IN] pPlaybackParam		Playback by record parameters. For details, see DPSDK_PLAYBACK_BY_FILE_PARAM structure.
 * @param	[OUT]pUrl				Url and token
 * @return	Return 0 if succeeded, return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_GetRecordUrlByFile(DPSDK_INT32 iSessionID,
													         DPSDK_GET_PLAYBACK_URL_BY_FILE_PARAM* pPlaybackParam,
													         DPSDK_URL* pUrl);

/**
 * @brief	Get playback url by Time.
 * @param	[IN] iSessionID			User session ID
 * @param	[IN] pPlaybackParam		Playback by record parameters. For details, see DPSDK_PLAYBACK_BY_TIME_PARAM structure.
 * @param	[OUT]pUrl				Url and token
 * @return	Return 0 if succeeded, return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_GetRecordUrlByTime(DPSDK_INT32 iSessionID,
															 DPSDK_GET_PLAYBACK_URL_BY_TIME_PARAM* pPlaybackParam,
															 DPSDK_URL* pUrl);
/** 
 * @brief	Stop playing.
 * @param	[IN] iSessionID			User session ID
 * @param	[IN] iMediaSessionID	Media session ID
 * @return	Return 0 if succeeded, return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_StopPlayback(DPSDK_INT32 iSessionID,
													   DPSDK_INT32 iMediaSessionID);

/**
 * @brief	Seek play.
 * @param	[IN] iSessionID			User session ID
 * @param	[IN] iMediaSessionID	Media session ID
 * @param	[IN] pPlaybackSeekParam Seek playback parameters. For details, see DPSDK_PLAYBACK_SEEK_PARAM structure.
 * @return	Return 0 if succeeded, return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_PlaybackSeek(DPSDK_INT32 iSessionID,
													   DPSDK_INT32 iMediaSessionID, 
													   DPSDK_PLAYBACK_SEEK_PARAM* pPlaybackSeekParam);

/**
 * @brief	Set the play speed.
 * @param	[IN] iSessionID			User session ID
 * @param	[IN] iMediaSessionID	Media session ID
 * @param	[IN] eSpeed				Playback speed
 * @return	Return 0 if succeeded, return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_SetPlaybackSpeed(DPSDK_INT32 iSessionID,
														   DPSDK_INT32 iMediaSessionID, 
														   DPSDK_PLAYBACK_SPEED iSpeed);

/**
* @brief	Set the play speed.
* @param	[IN] iSessionID			User session ID
* @param	[IN] iMediaSessionID	Media session ID
* @param	[IN] pSpeedParam		speed param
* @return	Return 0 if succeeded, return error code if failed.
*/
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_SetPlaybackSpeedByScaleMode(DPSDK_INT32 iSessionID,
	DPSDK_INT32 iMediaSessionID,
	DPSDK_PLAYBACK_SPEED_PARAM* pSpeedParam);

/** 
 * @brief	Pause the playback.
 * @param	[IN] iSessionID			User session ID
 * @param	[IN] iMediaSessionID	Media session ID
 * @return	Return 0 if succeeded, return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_PlaybackPause(DPSDK_INT32 iSessionID,
														DPSDK_INT32 iMediaSessionID);

/**
 * @brief	Restore playback
 * @param	[IN] iSessionID			User session ID
 * @param	[IN] iMediaSessionID	Media session ID
 * @return	Return 0 if succeeded, return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_PlaybackResume(DPSDK_INT32 iSessionID,
														 DPSDK_INT32 iMediaSessionID);

/** 
 * @brief	Single frame play.
 * @param	[IN] iSessionID			User session ID
 * @param	[IN] iMediaSessionID	Media session ID
 * @return	Return 0 if succeeded, return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_PlaybackFrameStep(DPSDK_INT32 iSessionID,
															DPSDK_INT32 iMediaSessionID);

/** 
 * @brief	Get the current play time.
 * @param	[IN] iSessionID			User session ID
 * @param	[IN] iMediaSessionID	Media session ID
 * @return	Return 0 if succeeded, return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_GetPlayedTime(DPSDK_INT32 iSessionID,
														DPSDK_INT32 iMediaSessionID, 
														DPSDK_TIMET* pTime);

/**
 * @brief	Get the stream provider type.
 * @param	[IN] iSessionID			User session ID
 * @param	[IN] iMediaSessionID	Media session ID
 * @param	[OUT] pProviderType	Provider type	
 * @return	Return 0 if succeeded, return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_GetProviderType(DPSDK_INT32 iSessionID,
														  DPSDK_INT32 iMediaSessionID, 
														  DPSDK_INT32 *pProviderType);

/**
 * @brief	Set stream callback of wall playback.
 * @param	[IN] iSessionID			User session ID
 * @param	[IN] iMediaSessionID	Media session ID
 * @param	[IN] pFun				Callback function address
 * @param	[IN] pUserData			Callback function user parameters
 * @return	Return 0 if succeeded, return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_SetTVWallPlaybackCallBack(DPSDK_INT32 iSessionID,
																	DPSDK_INT32 iMediaSessionID, 
																	DPSDK_TVWALL_PLAYBACK_CALLBACK pFun, 
																	DPSDK_VOID* pUserData);

/**
 * @brief	Enable sync playback
 * @param	[IN] iSessionID			User session ID
 * @param	[IN] iMediaSessionID	Media session ID
 * @param	[OUT] pSyncPlayHandle	handle of sync playback
 * @return	Return 0 if succeeded, return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_OpenSyncPlayback(DPSDK_INT32 iSessionID,
														   DPSDK_INT32 iMediaSessionID,
														   DPSDK_LPVOID *pSyncPlayHandle);

/**
 * @brief	Add to sync playback
 * @param	[IN] iSessionID			User session ID
 * @param	[IN] iMediaSessionID	Media session ID
 * @param	[IN] SyncPlayHandle		Handle of sync playback
 * @return	Return 0 if succeeded, return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_AddToSyncPlayback(DPSDK_INT32 iSessionID,
															DPSDK_INT32 iMediaSessionID,
															DPSDK_LPVOID SyncPlayHandle);

/**
 * @brief	Delete sync playback
 * @param	[IN] iSessionID			User session ID
 * @param	[IN] iMediaSessionID	Media session ID
 * @param	[IN] SyncPlayHandle		Handle of sync playback
 * @return	Return 0 if succeeded, return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_DelFromSyncPlayback(DPSDK_INT32 iSessionID,
															  DPSDK_INT32 iMediaSessionID,
															  DPSDK_LPVOID SyncPlayHandle);

/**
 * @brief	Set the direction of sync playback.
 * @param	[IN] iSessionID			User session ID
 * @param	[IN] iMediaSessionID	Media session ID
 * @param	[IN] SyncPlayHandle		Handle of sync playback
 * @param	[IN] iDirection			Direction of sync playback: 0-forward; 1-backword.
 * @return	Return 0 if succeeded, return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_SetSyncPlaybackDirection(DPSDK_INT32 iSessionID,
																   DPSDK_INT32 iMediaSessionID,
																   DPSDK_LPVOID SyncPlayHandle, 
																   DPSDK_INT32 iDirection);

/**
 * @brief	Set the speed of sync playback.
 * @param	[IN] iSessionID			User session ID
 * @param	[IN] iMediaSessionID	Media session ID
 * @param	[IN] SyncPlayHandle		Handle of sync playback
 * @param	[IN] fSpeed				Speed of sync playback
 * @return	Return 0 if succeeded, return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_SetSyncPlaybackSpeed(DPSDK_INT32 iSessionID,
															   DPSDK_INT32 iMediaSessionID,
															   DPSDK_LPVOID SyncPlayHandle, 
															   DPSDK_FLOAT fSpeed);

/**
 * @brief	Pause sync playback
 * @param	[IN] iSessionID			User session ID
 * @param	[IN] iMediaSessionID	Media session ID
 * @param	[IN] SyncPlayHandle		Handle of sync playback
 * @return	Return 0 if succeeded, return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_SyncPlaybackPause(DPSDK_INT32 iSessionID,
															DPSDK_INT32 iMediaSessionID,
															DPSDK_LPVOID SyncPlayHandle);

/**
 * @brief	Restore sync playback
 * @param	[IN] iSessionID			User session ID
 * @param	[IN] iMediaSessionID	Media session ID
 * @param	[IN] SyncPlayHandle		Handle of sync playback
 * @param	[IN] bPause				Pause tag, true: pause; false: playbak resumed.
 * @return	Return 0 if succeeded, return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_SyncPlaybackResume(DPSDK_INT32 iSessionID,
															 DPSDK_INT32 iMediaSessionID,
															 DPSDK_LPVOID SyncPlayHandle);

/**
 * @brief	Play by single frame
 * @param	[IN] iSessionID			User session ID
 * @param	[IN] iMediaSessionID	Media session ID
 * @param	[IN] SyncPlayHandle		Handle of sync playback
 * @return	Return 0 if succeeded, return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_SyncPlayblackFrameStep(DPSDK_INT32 iSessionID,
																 DPSDK_INT32 iMediaSessionID,
																 DPSDK_LPVOID SyncPlayHandle);

/**
 * @brief	Close sync playback.
 * @param	[IN] iSessionID			User session ID
 * @param	[IN] iMediaSessionID	Media session ID
 * @param	[IN] SyncPlayHandle		Handle of sync playback
 * @return	Return 0 if succeeded, return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_CloseSyncPlayback(DPSDK_INT32 iSessionID,
															DPSDK_INT32 iMediaSessionID,
															DPSDK_LPVOID SyncPlayHandle);

/**
 * @brief	Query if the playback stream is smart stream or not.
 * @param	[IN] iSessionID			User session ID
 * @param	[IN] iMediaSessionID	Media session ID
 * @param	[OUT] pbSmartStream		Smart stream type
 * @return	Return 0 if succeeded, return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_QueryPlayblakSmartStream(DPSDK_INT32 iSessionID,
																   DPSDK_INT32 iMediaSessionID,
																   DPSDK_BOOL *pbSmartStream);


/**
* @brief	Start unicast video playback by url.
* @param	[IN] pRealPlayParam		Video preview parameters.
* @param	[IN] iMediaSessionID	 Media session ID is created by user
* @return	Return 0 if succeeded. Return error code if failed.
*/
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_DHPContinuePlaybackByTime(DPSDK_PLAYBACK_BY_URL_PARAM* pPlayBackParam,DPSDK_INT32 iMediaSessionID);

//////////////////////////////////////////////////////////////////////////
/*
 *	Local Playback Interface
 */

/**
 * @brief	playback by local file
 * @param	[IN] pPlaybackParam		Playback parameter, see DPSDK_PLAYBACK_BY_LOCALFILE_PARAM structure
 * @param	[OUT] pMediaSessionID	Media session ID
 * @return	Return 0 if succeeded, return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_StartPlaybackByLocalFile(DPSDK_INT32 iSessionID, 
																   DPSDK_PLAYBACK_BY_LOCALFILE_PARAM* pPlaybackParam,
																   DPSDK_INT32* pMediaSessionID);

/**
 * @brief	set play direction
 * @param	[IN] iMediaSessionID	Media session ID
 * @param	[IN] iDirection			Direction, 0=forward; 1=back
 * @return	Return 0 if succeeded, return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_SetLocalPlaybackDirection(DPSDK_INT32 iSessionID, 
																	DPSDK_INT32 iMediaSessionID, 
																	DPSDK_INT32 iDirection);
/**
 * @brief	set play position
 * @param	[IN] iMediaSessionID	Media session ID
 * @param	[IN] fPlayPos			File relative position, range 0-100%
 * @return	Return 0 if succeeded, return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_SetLocalPlaybackPos(DPSDK_INT32 iSessionID,
															  DPSDK_INT32 iMediaSessionID, 
															  DPSDK_FLOAT fPlayPos);

/**
 * @brief	set play position by absolute time
 * @param	[IN] iMediaSessionID	Media session ID
 * @param	[IN] iPlayTime			Absolute time
 * @return	Return 0 if succeeded, return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_SetLocalPlaybackPosByTime(DPSDK_INT32 iSessionID,
																	DPSDK_INT32 iMediaSessionID,
																	DPSDK_UINT32 iPlayTime);

/**
 * @brief	get play position
 * @param	[IN] iMediaSessionID	Media session ID
 * @param	[OUT] pPlayPos			File relative position, range 0-100%
 * @return	Return 0 if succeeded, return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_GetLocalPlaybackPos(DPSDK_INT32 iSessionID,
															  DPSDK_INT32 iMediaSessionID, 
															  DPSDK_FLOAT* pPlayPos);

/**
 * @brief	get play start and end time
 * @param	[IN] iMediaSessionID	Media session ID
 * @param	[OUT] pStartTime		Start time
 * @param	[OUT] pEndTime			End time
 * @return	Return 0 if succeeded, return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_GetLocalPlaybackStartEndTime(DPSDK_INT32 iSessionID,
																	   DPSDK_INT32 iMediaSessionID, 
																       DPSDK_INT32 *pStartTime,
																       DPSDK_INT32 *pEndTime);

/**
 * @brief	get play strTimeRange
 * @param	[IN] iMediaSessionID	Media session ID
 * @param	[OUT] strTimeRange		strTimeRange
 * @return	Return 0 if succeeded, return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_GetRemoteFilePlaybackTimeRange(DPSDK_INT32 iSessionID,
	DPSDK_INT32 iMediaSessionID, DPSDK_CHAR* strTimeRange);

/**
 * @brief	Start unicast video preview by url.
 * @param	[IN] pRealPlayParam		Video preview parameters. 
 * @param	[OUT] pMediaSessionID	 Media session ID
 * @return	Return 0 if succeeded. Return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_StartRealPlayByURL(DPSDK_REALPLAY_BY_URL_PARAM* pRealPlayParam,
														     DPSDK_INT32* pMediaSessionID);

/**
* @brief	Set Player Window Size, Only For MacOS
* @param	[IN] iSessionID			User session ID
* @param	[IN] iMediaSessionID	Media session ID
* @param	[IN] iWidth				Player Window Width
* @param	[IN] iHeight	 		Player Window Height
* @return	Return 0 if succeeded. Return error code if failed.
*/
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_SetPlayWndSizeForMacOS(DPSDK_INT32 iSessionID, DPSDK_INT32 iMediaSessionID, DPSDK_INT32 iWidth, DPSDK_INT32 iHeight);

/**
 * @brief	Stop unicast video preview by url.
 * @param	[IN] iMediaSessionID	 Media session ID
 * @return	Return 0 if succeeded. Return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_StopRealPlayByURL(DPSDK_INT32 iMediaSessionID);

/**
 * @brief	Start unicast video preview by url.
 * @param	[IN] pRealPlayParam		Video preview parameters.
 * @param	[IN] iMediaSessionID	 Media session ID
 * @return	Return 0 if succeeded. Return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_StartRealPlayByURLEx(DPSDK_REALPLAY_BY_URL_PARAM* pRealPlayParam,
														     DPSDK_INT32 iMediaSessionID);


/**
 * @brief	Start unicast video talk by url.
 * @param	[IN] pRealPlayParam		Video preview parameters.
 * @param	[IN] iMediaSessionID	 Media session ID
 * @return	Return 0 if succeeded. Return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_StartTalkByURLEx(DPSDK_START_TALK_BYURL_PARAM* pTalkParam,
														     DPSDK_INT32 iMediaSessionID);

/**
 * @brief	Stop unicast video preview by url.
 * @param	[IN] iMediaSessionID	 Media session ID
 * @return	Return 0 if succeeded. Return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_StopTalkByURL(DPSDK_INT32 iMediaSessionID);

/**
 * @brief	Start unicast video playback by url.
 * @param	[IN] pRealPlayParam		Video preview parameters.
 * @param	[IN] iMediaSessionID	 Media session ID is created by user
 * @return	Return 0 if succeeded. Return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_StartPlayBackByURLEx(DPSDK_PLAYBACK_BY_URL_PARAM* pPlayBackParam,
														     DPSDK_INT32 iMediaSessionID);

/**
 * @brief	Stop unicast video playback by session id.
 * @param	[IN] iMediaSessionID	 Media session ID is created by user
 * @return	Return 0 if succeeded. Return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_StopPlayBackByURL(DPSDK_INT32 iMediaSessionID);

/**
* @brief	Pause the playback.
* @param	[IN] iMediaSessionID	Media session ID
* @return	Return 0 if succeeded. Return error code if failed.
*/
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_PlaybackPauseEx(DPSDK_INT32 iMediaSessionID);

/**
* @brief	Resume playing.
* @param	[IN] iMediaSessionID	Media session ID
* @return	Return 0 if succeeded. Return error code if failed.
*/
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_PlaybackResumeEx(DPSDK_INT32 iMediaSessionID);
/** 
* @brief	Set Volume
* @param	[IN] iMediaSessionID	Media Session ID
* @param	[IN] uiVolume			Volume Value
* @return	Return 0 if succeeded, return error code if failed. 
*/
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_SetVolumeEx(DPSDK_INT32 iMediaSessionID,
													  DPSDK_UINT32 uiVolume);

/**	
* @brief	Set if it is to display intelligent info 
* @param	[IN] iMediaSessionID	Media Session ID
* @param	[IN] enumType			Type, refer to DPSDK_IVS_VISIBLE definition
* @param	[IN] bVisible Display sign  true  display  false    not display
* @return	Return 0 if succeeded, return error code if failed.
*/
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_SetIvsShowFlagEx( DPSDK_INT32 iMediaSessionID,
														   DPSDK_UINT32 uiType, 
														   DPSDK_BOOL bVisible);


/**
* @brief	Open audio via exclusive mode
* @param	[IN] iSessionID			User Session ID
* @param	[IN] iMediaSessionID	Media Session ID
* @return	Return 0 if succeeded, return error code if failed.
*/
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_OpenSoundEx(DPSDK_INT32 iMediaSessionID);

/**
* @brief	Set the play speed.
* @param	[IN] iSessionID			User session ID
* @param	[IN] iMediaSessionID	Media session ID
* @param	[IN] eSpeed				Playback speed
* @return	Return 0 if succeeded, return error code if failed.
*/
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_SetPlaybackSpeedEx(DPSDK_INT32 iMediaSessionID,DPSDK_PLAYBACK_SPEED iSpeed);

/**
* @brief	Open audio via exclusive mode
* @param	[IN] iSessionID			User Session ID
* @param	[IN] iMediaSessionID	Media Session ID
* @return	Return 0 if succeeded, return error code if failed.
*/
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_RealPlayOpenSound(DPSDK_INT32 iMediaSessionID);

/**
* @brief	Seek play.
* @param	[IN] iMediaSessionID	Media session ID
* @param	[IN] pPlaybackSeekParam Seek playback parameters. For details, see DPSDK_PLAYBACK_SEEK_PARAM structure.
* @return	Return 0 if succeeded. Return error code if failed.
*/
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_PlaybackSeekEx(DPSDK_INT32 iMediaSessionID, 
														 DPSDK_PLAYBACK_SEEK_PARAM_Ex* pPlaybackSeekParam);

/** 
* @brief	Acquire current frame time
* @param	[IN] iSessionID			User Session ID
* @param	[IN] iMediaSessionID	Media Session ID
* @param	[OUT] pFrameTime		Frame Time
* @return	Return 0 if succeeded, return error code if failed.
*/
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_GetFrameTimeEx(DPSDK_INT32 iMediaSessionID, 
														 DPSDK_TIMET* pFrameTime);

/**
 * @brief	Get channel real-time temperature 
 * @param	[IN] iSessionID			User session ID
 * @param	[IN] pChannelId			Channel ID
 * @param	[IN] iPosX				x coordinates
 * @param	[IN] iPosY				y coordinates
 * @param	[OUT] pTemperatureInfo	Temperature data
 * @return	Return 0 if succeeded, return error code if failed.
 * @note		The tested position coordinated, value 0~8192
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_GetChannelTemperature(DPSDK_INT32 iSessionID,
																DPSDK_CHAR* pChannelId,
																DPSDK_INT32 iPosX,
																DPSDK_INT32 iPosY,
																DPSDK_TEMPERATURE_INFO* pTemperatureInfo);

/**
* @brief	Close audio via exclusive mode
* @param	[IN] iSessionID			User Session ID
* @param	[IN] iMediaSessionID	Media Session ID
* @return	Return 0 if succeeded, return error code if failed. 
*/
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_CloseSoundEx(DPSDK_INT32 iMediaSessionID);

/**
* @brief	Pause download
* @param	[IN] iMediaSessionID		Media session ID
* @return	Return 0 if succeeded, return error code if failed.
*/
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_PauseDownloadRecordEx(DPSDK_INT32 iDownloadID);

/**
* @brief	Restore download
* @param	[IN] iMediaSessionID		Media session ID
* @return	Return 0 if succeeded, return error code if failed.
*/
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_ResumeDownloadRecordEx(DPSDK_INT32 iDownloadID);

/**
* @brief	Get record download information
* @param	[IN] iDownloadID			Download ID
* @param	[OUT] pDownloadInfo			Record download information. For detailed meanings, see DPSDK_DOWNLOAD_RECORD_INFO.
* @return	Return 0 if succeeded, return error code if failed.
*/
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_GetDownloadRecordInfoEx(DPSDK_INT32 iDownloadID, DPSDK_DOWNLOAD_RECORD_INFO* pDownloadInfo, DPSDK_UINT32 uiBufLen);

/**
* @brief	Enable sync playback
* @param	[IN] iMediaSessionID	Media session ID
* @param	[OUT] pSyncPlayHandle	handle of sync playback
* @return	Return 0 if succeeded, return error code if failed.
*/
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_OpenSyncPlaybackEx(DPSDK_INT32 iMediaSessionID, DPSDK_LPVOID *pSyncPlayHandle);

/**
* @brief	Add to sync playback
* @param	[IN] iMediaSessionID	Media session ID
* @param	[IN] SyncPlayHandle		Handle of sync playback
* @return	Return 0 if succeeded, return error code if failed.
*/
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_AddToSyncPlaybackEx(DPSDK_INT32 iMediaSessionID, DPSDK_LPVOID SyncPlayHandle);

/**
* @brief	Delete sync playback
* @param	[IN] iMediaSessionID	Media session ID
* @param	[IN] SyncPlayHandle		Handle of sync playback
* @return	Return 0 if succeeded, return error code if failed.
*/
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_DelFromSyncPlaybackEx(DPSDK_INT32 iMediaSessionID, DPSDK_LPVOID SyncPlayHandle);

/**
* @brief	Set the direction of sync playback.
* @param	[IN] iMediaSessionID	Media session ID
* @param	[IN] SyncPlayHandle		Handle of sync playback
* @param	[IN] iDirection			Direction of sync playback: 0-forward; 1-backword.
* @return	Return 0 if succeeded, return error code if failed.
*/
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_SetSyncPlaybackDirectionEx(DPSDK_INT32 iMediaSessionID, DPSDK_LPVOID SyncPlayHandle, DPSDK_INT32 iDirection);

/**
* @brief	Set the speed of sync playback.
* @param	[IN] iMediaSessionID	Media session ID
* @param	[IN] SyncPlayHandle		Handle of sync playback
* @param	[IN] fSpeed				Speed of sync playback
* @return	Return 0 if succeeded, return error code if failed.
*/
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_SetSyncPlaybackSpeedEx(DPSDK_INT32 iMediaSessionID, DPSDK_LPVOID SyncPlayHandle, DPSDK_FLOAT fSpeed);

/**
* @brief	Pause sync playback
* @param	[IN] iMediaSessionID	Media session ID
* @param	[IN] SyncPlayHandle		Handle of sync playback
* @return	Return 0 if succeeded, return error code if failed.
*/
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_SyncPlaybackPauseEx(DPSDK_INT32 iMediaSessionID, DPSDK_LPVOID SyncPlayHandle);

/**
* @brief	Restore sync playback
* @param	[IN] iMediaSessionID	Media session ID
* @param	[IN] SyncPlayHandle		Handle of sync playback
* @param	[IN] bPause				Pause tag, true: pause; false: playbak resumed.
* @return	Return 0 if succeeded, return error code if failed.
*/
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_SyncPlaybackResumeEx(DPSDK_INT32 iMediaSessionID,	DPSDK_LPVOID SyncPlayHandle);

/**
* @brief	Play by single frame
* @param	[IN] iMediaSessionID	Media session ID
* @param	[IN] SyncPlayHandle		Handle of sync playback
* @return	Return 0 if succeeded, return error code if failed.
*/
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_SyncPlayblackFrameStepEx(DPSDK_INT32 iMediaSessionID,	DPSDK_LPVOID SyncPlayHandle);

/**
* @brief	Close sync playback.
* @param	[IN] iMediaSessionID	Media session ID
* @param	[IN] SyncPlayHandle		Handle of sync playback
* @return	Return 0 if succeeded, return error code if failed.
*/
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_CloseSyncPlaybackEx(DPSDK_INT32 iMediaSessionID, DPSDK_LPVOID SyncPlayHandle);

/**
* @brief	Audio Enable Status
* @param	[IN] iMediaSessionID	Media Session ID
* @param	[OUT] pIsOpenSound		true=Enable, false=Disable
* @return	Return 0 if succeeded, return error code if failed.
* @remark	It is true for enabling both exclusive and sharing audio
*/
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_IsOpenSoundStateEx(DPSDK_INT32 iMediaSessionID,	DPSDK_BOOL* pIsOpenSound);

/**
* @brief	Start unicast video download by url.
* @param	[IN] pDownloadParam		Video download parameters.
* @param	[IN] iMediaSessionID	 Media session ID is created by user
* @return	Return 0 if succeeded. Return error code if failed.
*/
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_StartDownloadByRtspURLEx(DPSDK_DOWNLOAD_BY_RTSPURL_PARAM* pDownloadParam, DPSDK_INT32* pMediaSessionID);

/**
* @brief	Set audio channel state
* @param	[IN] iMediaSessionID	Media Session ID
* @param	[IN] iChannelID			Channel ID
* @param	[IN] iFlag				Flag
* @return	Return 0 if succeeded, return error code if failed.
*/
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_SetAudioChannelStateEx(DPSDK_INT32 iMediaSessionID, DPSDK_INT32 iChannelID, DPSDK_INT32 iFlag);

/**
* @brief	Get audio channel state
* @param	[IN] iMediaSessionID	Media Session ID
* @param	[IN] iChannelID			Channel ID
* @param	[OUT] pFlag				Flag
* @return	Return 0 if succeeded, return error code if failed.
*/
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_GetAudioChannelStateEx(DPSDK_INT32 iMediaSessionID, DPSDK_INT32 iChannelID, DPSDK_INT32* pFlag);

/**
* @brief	Get audio channels count
* @param	[IN] iMediaSessionID	Media Session ID
* @param	[OUT] pChannelsCount	Audio channels count
* @return	Return 0 if succeeded, return error code if failed.
*/
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_GetAudioChannelsCountEx(DPSDK_INT32 iMediaSessionID, DPSDK_UINT32* pChannelsCount);
/**
* @brief	Set Player Window Size, Only For MacOS
* @param	[IN] iMediaSessionID	Media session ID
* @param	[IN] iWidth				Player Window Width
* @param	[IN] iHeight	 		Player Window Height
* @return	Return 0 if succeeded. Return error code if failed.
*/
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_SetPlayWndSizeForMacOSEx(DPSDK_INT32 iMediaSessionID, DPSDK_INT32 iWidth, DPSDK_INT32 iHeight);

//////////////////////////////////////////////////////////////////////////
/*
 *	Voice Intercom Interface
 */

 /**
 * @brief	Start intercom
 * @param	[IN] iSessionID			User session ID
 * @param	[IN] pStartTalkParam	Start talk parameters
 * @param	[OUT] pStartTalkRes		Return the correct parameter when it does not match.
 * @param	[OUT] pMediaSessionID	Media session ID
 * @return	Return 0 if succeeded, return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_StartTalk(DPSDK_INT32 iSessionID,
													DPSDK_START_TALK_PARAM* pStartTalkParam,
													DPSDK_START_TALK_RESULT* pStartTalkRes,
													DPSDK_INT32* pMediaSessionID);
/**
 * @brief	Start unicast video preview.
 * @param	[IN] iSessionID			User session ID
 * @param	[IN] pRealPlayParam		Video preview parameters. For details, see DPSDK_REALPLAY_PARAM structure.
 * @param	[IN] pTrackId			Track ID
 * @param	[OUT] pUrl	        Url,Token
 * @param	[OUT] pMediaSessionID	Media session ID
 * @return	Return 0 if succeeded, return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_GetTalkStreamUrl(DPSDK_INT32 iSessionID, 
														   DPSDK_Get_TALK_URL_PARAM* pStartTalkParam,
														   DPSDK_URL* pUrl,
														   DPSDK_INT32* pMediaSessionID);
/**
 * @brief	Close intercom
 * @param	[IN] iSessionID			User session ID
 * @param	[IN] iMediaSessionID	Media session ID
 * @return	Return 0 if succeeded, return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_StopTalk(DPSDK_INT32 iSessionID,
												   DPSDK_INT32 iMediaSessionID);

/**
 * @brief	Close intercom
 * @param	[IN] iSessionID			User session ID
 * @param	[IN] iMediaSessionID	Media session ID
 * @param	[IN] pSetparameter		parameter
 * @param	[IN] iTimeOut			time out
 * @return	Return 0 if succeeded, return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_SetTalkParam(DPSDK_INT32 iSessionID, 
													   const char* pSetparameter, 
													   DPSDK_INT32 iTimeOut ,
													   DPSDK_INT32 iMediaSessionID);

 /**
 * @brief	Start intercom
 * @param	[IN] iSessionID			User session ID
 * @param	[IN] pStartTalkParam	Start talk parameters
 * @param	[OUT] pBroadcastTalkRet	Broadcast talk return info
 * @return	Return 0 if succeeded, return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_StartBroadcastTalk(DPSDK_INT32 iSessionID,
													DPSDK_START_BROADCAST_TALK_PARAM* pStartTalkParam,
													DPSDK_BROADCAST_TALK_RET* pBroadcastTalkRet = NULL);

/**
 * @brief	Close intercom
 * @param	[IN] iSessionID			User session ID
 * @return	Return 0 if succeeded, return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_StopBroadcastTalk(DPSDK_INT32 iSessionID);

//////////////////////////////////////////////////////////////////////////
/*
 *	Record Interface
 */

/**	
 * @brief	Start to take records.
 * @param	[IN] iSessionID			User session ID
 * @param	[IN] iMediaSessionID	Media session ID
 * @param	[IN] pLocalRecordParam
 * @return	Return 0 if succeeded, return error code if failed.
 * @remark	The imported record name does not have suffix.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_StartRecord(DPSDK_INT32 iSessionID,
													  DPSDK_INT32 iMediaSessionID,
													  const DPSDK_RECORD_DOWNLOAD_PARAM* pLocalRecordParam);

/**	
 * @brief	Stop recording
 * @param	[IN] iSessionID			User session ID
 * @param	[IN] iMediaSessionID	Media session ID
 * @param	[OUT] pRecordFile		Record file list. Record results are not needed when importing NULL.
 * @param	[IN] uiBufLen			Buffer length
 * @return	Return 0 if succeeded, return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_StopRecord(DPSDK_INT32 iSessionID,
													 DPSDK_INT32 iMediaSessionID,
													 DPSDK_FILE_STORE_LIST* pRecordFile,
													 DPSDK_UINT32 uiBufLen);

/** 
 * @brief	Check if the device is taking a record.
 * @param	[IN] iSessionID			User session ID
 * @param	[IN] iMediaSessionID	Media session ID
 * @param	[OUT] pIsRecord			True: taking a record. False: not taking a record.
 * @return	Return 0 if succeeded, return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_IsRecordState(DPSDK_INT32 iSessionID,
														DPSDK_INT32 iMediaSessionID,
														DPSDK_BOOL* pIsRecord);
/** 
 * @brief	Set split record length.
 * @param	[IN] iSessionID			User session ID
 * @param	[IN] iMediaSessionID	Media session ID
 * @param	[IN] uiSplitRecordLen   Record split length. Unit: M
 * @return	Return 0 if succeeded, return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_SetSplitRecordLen(DPSDK_INT32 iSessionID,
															DPSDK_INT32 iMediaSessionID,
															DPSDK_UINT32 uiSplitRecordLen);

/*
*	Video Analysis
*/

/**
* @brief	Video analysis operation
* @param	[IN] iSessionID			User Session ID
* @param	[IN] iMediaSessionID	Media Session ID
* @param	[IN] struParam			Video analysis param, refer to DPSDK_VIDEO_ANALYSIS_PARAM definition
* @return	Return 0 if succeeded, return error code if failed.
*/
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_OperateVideoAnalysis(DPSDK_INT32 iSessionID,
	DPSDK_INT32 iMediaSessionID,
	DPSDK_VIDEO_ANALYSIS_PARAM struParam);

//////////////////////////////////////////////////////////////////////////
/*
 *	Download Interface
 */

/**
 * @brief	Download by time
 * @param	[IN] iSessionID				User session ID
 * @param	[IN] pDownloadByTimeParam   For detailed meanings, see DPSDK_DOWNLOAD_BY_TIME_PARAM.
 * @param	[OUT] pMediaSessionID		Media session ID
 * @return	Return 0 if succeeded, return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_StartDownloadRecordByTime(DPSDK_INT32 iSessionID,
																	DPSDK_DOWNLOAD_BY_TIME_PARAM* pDownloadByTimeParam,
																	DPSDK_INT32* pMediaSessionID);

/**
* @brief	Download by filepath
* @param	[IN] iSessionID				User session ID
* @param	[IN] pDownloadByTimeByFilePathParam   For detailed meanings, see DPSDK_DOWNLOAD_BY_TIME_BY_FILEPATH_PARAM.
* @param	[OUT] pMediaSessionID		Media session ID
* @return	Return 0 if succeeded. Return error code if failed.
*/
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_StartDownloadRecordByTimeByFilePath(DPSDK_INT32 iSessionID,
																			  DPSDK_DOWNLOAD_BY_TIME_BY_FILEPATH_PARAM* pDownloadByTimeByFilePathParam,
																			  DPSDK_INT32* pMediaSessionID);

/**
 * @brief	Download by file
 * @param	[IN] iSessionID				User session ID
 * @param	[IN] pDownloadByFileParam   For detailed meanings, see DPSDK_DOWNLOAD_BY_FILE_PARAM.
 * @param	[OUT] pMediaSessionID		Media session ID
 * @return	Return 0 if succeeded, return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_StartDownloadRecordByFile(DPSDK_INT32 iSessionID, 
																	DPSDK_DOWNLOAD_BY_FILE_PARAM* pDownloadByFileParam, 
																	DPSDK_INT32* pMediaSessionID);

/**
 * @brief	Stop download
 * @param	[IN] iSessionID				User session ID
 * @param	[IN] iMediaSessionID		Media session ID
 * @return	Return 0 if succeeded, return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_StopDownloadRecord(DPSDK_INT32 iSessionID, DPSDK_INT32 iMediaSessionID);

/**
 * @brief	Pause download
 * @param	[IN] iSessionID				User session ID
 * @param	[IN] iMediaSessionID		Media session ID
 * @return	Return 0 if succeeded, return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_PauseDownloadRecord(DPSDK_INT32 iSessionID, DPSDK_INT32 iMediaSessionID);

/**
 * @brief	Restore download
 * @param	[IN] iSessionID				User session ID
 * @param	[IN] iMediaSessionID		Media session ID
 * @return	Return 0 if succeeded, return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_ResumeDownloadRecord(DPSDK_INT32 iSessionID, DPSDK_INT32 iMediaSessionID);

/**
 * @brief	Get record download information
 * @param	[IN] iSessionID				User session ID
 * @param	[IN] iMediaSessionID		Media session ID
 * @param	[OUT] pDownloadInfo			Record download information. For detailed meanings, see DPSDK_DOWNLOAD_RECORD_INFO.
 * @return	Return 0 if succeeded, return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_GetDownloadRecordInfo(DPSDK_INT32 iSessionID, DPSDK_INT32 iMediaSessionID, DPSDK_DOWNLOAD_RECORD_INFO* pDownloadInfo, DPSDK_UINT32 uiBufLen);

/**
 * @brief	Set download max task number
 * @param	[IN] iSessionID				User session ID
 * @param	[IN] iMaxTaskNum			Max task number
 * @return	Return 0 if succeeded, return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_SetDownloadMaxTaskNum(DPSDK_INT32 iSessionID, DPSDK_INT32 iMaxTaskNum);

//////////////////////////////////////////////////////////////////////////
/*
 *	Snapshot Interface
 */

/** 
 * @brief	Snapshot and keep the picture into the file.
 * @param	[IN] iSessionID			User session ID
 * @param	[IN] iMediaSessionID	Media session ID
 * @param	[IN] uiPicFormat		Picture format. For details, see DPSDK_PIC_FORMAT.
 * @param	[IN] pPath				Picture storage path
 * @return	Return 0 if succeeded, return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_Get24BitPictureFile(DPSDK_INT32 iSessionID,
															  DPSDK_INT32 iMediaSessionID,
															  DPSDK_UINT32 uiPicFormat,
															  DPSDK_CHAR* pPath);

/**
* @brief	Snapshot and keep the picture into the file.
* @param	[IN] iSessionID			User session ID
* @param	[IN] iMediaSessionID	Media session ID
* @param	[IN] uiPicFormat		Picture format. For details, see DPSDK_PIC_FORMAT.
* @param	[IN] pPath				Picture storage path
* @return	Return 0 if succeeded, return error code if failed.
*/
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_Get24BitPictureFileEx(
	DPSDK_INT32 iMediaSessionID,
	DPSDK_UINT32 uiPicFormat,
	DPSDK_CHAR* pPath);

/**
 * @brief	Snapshot and save the picture data in the buffer address.
 * @param	[IN] iSessionID			User session ID
 * @param	[IN] iMediaSessionID	Media session ID
 * @param	[OUT] pPicBuf			The buffer addresses to store the picture data are distributed by the user and its size shall be no smaller than the picture size.
									The recommended size for BMP pictures: DPSDK_BITMAP_FILE_HEADER_LEN + DPSDK_BITMAP_INFO_HEADER_LEN + iVideoWidth * iVideoHeight * 4
 *									The recommended size for JPEG pictures: iVideoWidth * iVideoHeight * 3 / 2
 * @param	[IN] iBufsize			Buffer size
 * @param	[OUT] pPicSize			Actually snapped picture size 
 * @param	[IN] uiPicFormat		Picture format. For details, see DPSDK_PIC_FORMAT.
 * @return	Return 0 if succeeded, return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_GetPictureBuf(DPSDK_INT32 iSessionID,
														DPSDK_INT32 iMediaSessionID,
														DPSDK_CHAR* pPicBuf, 
														DPSDK_INT32 iBufsize,
														DPSDK_INT32* pPicSize, 
														DPSDK_UINT32 uiPicFormat);

/**
* @brief	Snapshot and save the picture data in the buffer address.
* @param	[IN] iSessionID			User session ID
* @param	[IN] iMediaSessionID	Media session ID
* @param	[OUT] pPicBuf			The buffer addresses to store the picture data are distributed by the user and its size shall be no smaller than the picture size.
The recommended size for BMP pictures: DPSDK_BITMAP_FILE_HEADER_LEN + DPSDK_BITMAP_INFO_HEADER_LEN + iVideoWidth * iVideoHeight * 4
*									The recommended size for JPEG pictures: iVideoWidth * iVideoHeight * 3 / 2
* @param	[IN] iBufsize			Buffer size
* @param	[OUT] pPicSize			Actually snapped picture size
* @param	[IN] uiPicFormat		Picture format. For details, see DPSDK_PIC_FORMAT.
* @return	Return 0 if succeeded, return error code if failed.
*/
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_GetPictureBufEx(
	DPSDK_INT32 iMediaSessionID,
	DPSDK_CHAR* pPicBuf,
	DPSDK_INT32 iBufsize,
	DPSDK_INT32* pPicSize,
	DPSDK_UINT32 uiPicFormat);

/**
 * @brief	Transfer picture data to pictures in BMP format.
 * @param	[IN] iSessionID			User session ID
 * @param	[IN] iMediaSessionID	Media session ID
 * @param	[IN] pConvertBMP		Picture data needed to be transferred. For details, see DPSDK_CONVERT_BMP.
 * @return	Return 0 if succeeded, return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_ConvertToBmpFile(DPSDK_INT32 iSessionID,
														   DPSDK_INT32 iMediaSessionID,
														   DPSDK_CONVERT_BMP* pConvertBMP);

/**
 * @brief	Transfer picture data to pictures in JPEG format.
 * @param	[IN] iSessionID			User session ID
 * @param	[IN] iMediaSessionID	Media session ID
 * @param	[IN] pConvertJPEG	Picture data needed to be transferred. For details, see DPSDK_CONVERT_JPEG.
 * @return	Return 0 if succeeded, return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_ConvertToJpegFile(DPSDK_INT32 iSessionID,
															DPSDK_INT32 iMediaSessionID,
															DPSDK_CONVERT_JPEG* pConvertJPEG);

//////////////////////////////////////////////////////////////////////////
/*
 *	Fisheye Interface
 */

/** 
 * @brief	Enable Fisheye
 * @param	[IN] iSessionID			User Session ID
 * @param	[IN] iMediaSessionID	Media Session ID
 * @param	[IN] uiFishType			Fisheye enable type, refer to DPSDK_FISH_TYPE definition
 * @param	[IN] pPtzChannelParam	Smart track initialization channel parameter
 * @return	Return 0 if succeeded, return error code if failed. 
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_StartFisheyeEx(DPSDK_INT32 iSessionID,
														 DPSDK_INT32 iMediaSessionID,
														 DPSDK_UINT32 uiFishType, 
														 DPSDK_MHFPTZ_INIT_PARAM* pPtzChannelParam);

/** 
 * @brief	Disable Fisheye
 * @param	[IN] iSessionID			User Session ID
 * @param	[IN] iMediaSessionID	Media Session ID
 * @return	Return 0 if succeeded, return error code if failed. 
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_CloseFisheye(DPSDK_INT32 iSessionID,
													   DPSDK_INT32 iMediaSessionID);

/**
 * @brief	Fisheye parameter initialization
 * @param	[IN] iSessionID			User Session ID
 * @param	[IN] iMediaSessionID	Media Session ID
 * @param	[OUT] pOptParam			Fisheye Parameter
 * @return	Return 0 if succeeded, return error code if failed. 
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_InitFisheyeOptParam(DPSDK_INT32 iSessionID,
															  DPSDK_INT32 iMediaSessionID,
															  DPSDK_FISH_OPTPARAM* pOptParam);

/**
 * @brief	Fisheye Parameter Initialization
 * @param	[IN] iSessionID			User Session ID
 * @param	[IN] iMediaSessionID	Media Session ID
 * @param	[OUT] pOptParam			Fisheye Parameter
 * @return	Return 0 if succeeded, return error code if failed. 
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_ReleaseFisheyeOptParamBuffer(DPSDK_FISH_OPTPARAM* pOptParam);

/** 
 * @brief	Update Fisheye Parameter
 * @param	[IN] iSessionID			User Session ID
 * @param	[IN] iMediaSessionID	Media Session ID
 * @param	[IN] pOptParam			Fisheye Parameter
 * @return	Return 0 if succeeded, return error code if failed. 
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_UpdateFisheyeOptParam(DPSDK_INT32 iSessionID,
																DPSDK_INT32 iMediaSessionID,
																DPSDK_FISH_UPDATE_PARAM* pOptParam);

/** 
 * @brief	Acquire Fisheye Parameter
 * @param	[IN] iSessionID			User Session ID
 * @param	[IN] iMediaSessionID	Media Session ID
 * @param	[OUT] pOptParam			Fisheye Parameter
 * @return	Return 0 if succeeded, return error code if failed. 
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_GetFisheyeInfo(DPSDK_INT32 iSessionID,
														 DPSDK_INT32 iMediaSessionID,
														 DPSDK_FISH_OPTPARAM* pOptParam);

/**
 * @brief	Set Fisheye Parameter
 * @param	[IN] iSessionID			User Session ID
 * @param	[IN] iMediaSessionID	Media Session ID
 * @param	[IN] pOptParam			Fisheye Parameter
 * @return	Return 0 if succeeded, return error code if failed. 
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_SetFisheyeInfo(DPSDK_INT32 iSessionID,
														 DPSDK_INT32 iMediaSessionID,
														 DPSDK_FISH_OPTPARAM* pOptParam);

/**
 * @brief	Acquire Fisheye Status
 * @param	[IN] iSessionID			User Session ID
 * @param	[IN] iMediaSessionID	Media Session ID
 * @param	[OUT] pIsOpened			If fisheye is enabled, true=enable, false=disable
 * @return	Return 0 if succeeded, return error code if failed. 
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_GetFisheyeState(DPSDK_INT32 iSessionID,
														  DPSDK_INT32 iMediaSessionID,
														  DPSDK_BOOL* pIsOpened);

/**
 * @brief	Set and acquire fisheye parameter
 * @param	[IN] iSessionID			User session ID
 * @param	[IN] iMediaSessionID	Media session ID
 * @param	[IN OUT] pEptzParam		Fisheye Parameter
 * @param	[IN] bSecondRegion		Fill in 1 when operating the second window under floating mode (It is 0 by default)
 * @return	Return 0 if succeeded, return error code if failed. 
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_GetFisheyeEptzUpdateParam(DPSDK_INT32 iSessionID,
																	DPSDK_INT32 iMediaSessionID,
																	DPSDK_FISH_EPTZPARAM* pEptzParam, 
																	DPSDK_BOOL bSecondRegion = false);

/** 
 * @brief	Enable or disable second fisheye window in the floating mode
 * @param	[IN] iSessionID			User Session ID
 * @param	[IN] iMediaSessionID	Media Session ID
 * @param	[IN] hDestWnd			Window Handle
 * @param	[IN] pOptParam			Fisheye Parameter
 * @param	[IN] bEnable			Enable or diable the second window under floating mode
 * @return	Return 0 if succeeded, return error code if failed. 
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_ShowFisheyeSecondRegion(DPSDK_INT32 iSessionID,
																  DPSDK_INT32 iMediaSessionID,
																  HCWND hDestWnd, 
																  DPSDK_FISH_OPTPARAM* pOptParam, 
																  DPSDK_BOOL bEnable);

/**
 * @brief	Control fisheye device to zoom and move/acquire smart track info
 * @param	[IN] iSessionID			User Session ID
 * @param	[IN] iMediaSessionID	Media Session ID
 * @param	[IN OUT] pFishBasePtzInfo  E-PTZ zoom and move option
 * @return	Return 0 if succeeded, return error code if failed. 
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_ControlFishEye(DPSDK_INT32 iSessionID,
														 DPSDK_INT32 iMediaSessionID,
														 DPSDK_FISH_EPTZPARAM* pFishBasePtzInfo);

/**
 * @brief	Acquire fisheye PTZ parameter
 * @param	[IN] iSessionID			User Session ID
 * @param	[IN] iMediaSessionID	Media Session ID
 * @param	[IN OUT] pEptzFrameInfo Fisheye PTZ related parameter storage structure
 * @param	[IN] bSecondRegion		Fill in 1 when operating the second window under floating mode(It is 0 by default)
 * @return	Return 0 if succeeded, return error code if failed. 
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_GetFishEyePtzInfo(DPSDK_INT32 iSessionID,
															DPSDK_INT32 iMediaSessionID,
															DPSDK_FISH_EPTZPARAM* pEptzFrameInfo,
															DPSDK_BOOL bSecondRegion);

/**
 * @brief	Set Fisheye Parameter
 * @param	[IN] iSessionID			User Session ID
 * @param	[IN] iMediaSessionID	Media Session ID
 * @param	[IN] pFishParams		Fisheye Parameter
 * @return	Return 0 if succeeded, return error code if failed.  
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_SetFisheyeParams(DPSDK_INT32 iSessionID,
														   DPSDK_INT32 iMediaSessionID,
														   DPSDK_FISH_PARAMS* pFishParams);

/**
 * @brief	Acquire Fisheye Parameter
 * @param	[IN] iSessionID			User Session ID
 * @param	[IN] iMediaSessionID	Media Session ID
 * @param	[IN OUT] pFishOptParamBase  Fisheye Parameter
 * @return	Return 0 if succeeded, return error code if failed. 
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_GetFisheyeParams(DPSDK_INT32 iSessionID,
														   DPSDK_INT32 iMediaSessionID,
														   DPSDK_FISH_OPTPARAM* pFishOptParamBase);

/**
* @brief	Get Page humans by session
* @param	[IN] iSessionID				User session ID
* @param	[IN] iMediaSessionID	Media Session ID
* @param	[IN] fDataCallBack			Data synchronization callback function
* @param	[IN] pUserData				User Data
* @return	Return 0 if succeeded. Return error code if failed.
*/
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_GetFisheyeEptzUpdateParams(DPSDK_INT32 iSessionID,
	DPSDK_INT32 iMediaSessionID,
	DPSDK_DataCallback fDataCallBack,
	DPSDK_VOID* pUserData);


/**
* @brief	Get Page humans by session
* @param	[IN] iSessionID				User session ID
* @param	[IN] pSession				Session info
* @param	[IN] DPSDK_FISH_TABLE_PTZDETAILOPTPARAM			fish ptz param
* @return	Return 0 if succeeded. Return error code if failed.
*/
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_SetFisheyeEptzUpdateParams(DPSDK_INT32 iSessionID,
	DPSDK_INT32 iMediaSessionID,
	DPSDK_FISH_TABLE_PTZDETAILOPTPARAM* pParam);


//////////////////////////////////////////////////////////////////////////
/*
 *	Video Basic Inteface
 */

/** 
 * @brief	Enable Video Call Back
 * @param	[IN] iSessionID			User Session ID
 * @param	[IN] iMediaSessionID	Media Session ID
 * @param	[IN] iCallBackType		Callback type, refer to DPSDK_CALLBACK_TYPE definition
 * @param	[IN] bEnable			True: Enable, False: Disable
 * @return	Return 0 if succeeded, return error code if failed. 
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_SetVideoCallBackEnable(DPSDK_INT32 iSessionID,
																 DPSDK_INT32 iMediaSessionID,
																 DPSDK_INT32 iCallBackType,
																 DPSDK_BOOL bEnable);

/** 
 * @brief	Enable Hardware Acceleration
 * @param	[IN] iSessionID			User Session ID
 * @param	[IN] iMediaSessionID	Media Session ID
 * @param	[IN] iDecodeType		Decode type, refer to DPSDK_DECODE_TYPE definition
 * @return	Return 0 if succeeded, return error code if failed. 
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_SetDecode(DPSDK_INT32 iSessionID,
													DPSDK_INT32 iMediaSessionID,
													DPSDK_INT32 iDecodeType);

/** 
 * @brief	If it is to enable internal adjustment strategy of HD image
 * @param	[IN] iSessionID			User Session ID
 * @param	[IN] iMediaSessionID	Media Session ID
 * @param	[IN] iAdjustment		iAdjustment: Ê¹ÄÜ±ê¼Ç 0£º²»³éÖ¡£¬1£º×ÔÊÊÓ¦³éÖ¡£¬2£ºÇ¿ÖÆ³éÖ¡
 * @return	Return 0 if succeeded, return error code if failed. 
 * @remark	The interface is only used for network playback
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_EnableLargePicAdjustment(DPSDK_INT32 iSessionID,
																   DPSDK_INT32 iMediaSessionID,
																   DPSDK_INT32 iAdjustment);
/** 
 * @brief	Acquire original picture size
 * @param	[IN] iSessionID			User Session ID
 * @param	[IN] iMediaSessionID	Media Session ID
 * @param	[OUT] pWidth			Width
 * @param	[OUT] pHeight			Height
 * @return	Return 0 if succeeded, return error code if failed. 
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_GetPictureSize(DPSDK_INT32 iSessionID,
 														 DPSDK_INT32 iMediaSessionID,
														 DPSDK_INT32* pWidth, 
														 DPSDK_INT32* pHeight);

/**
* @brief	Set picture rate
* @param	[IN] iSessionID			User Session ID
* @param	[IN] iMediaSessionID	Media Session ID
* @param	[IN] nWidthProportion, 				Width Proportion
* @param	[IN] nHeightProportion);			Height HeightProportion
* @return	Return 0 if succeeded, return error code if failed.
*/
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_SetViewProportion(DPSDK_INT32 iSessionID,
															DPSDK_INT32 iMediaSessionID,
															DPSDK_INT32 nWidthProportion,
															DPSDK_INT32 nHeightProportion);

/**
* @brief	Acquire original picture size
* @param	[IN] iSessionID			User Session ID
* @param	[IN] iMediaSessionID	Media Session ID
* @param	[OUT] pWidth			Width
* @param	[OUT] pHeight			Height
* @return	Return 0 if succeeded, return error code if failed.
*/
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_GetPictureSizeEx(
	DPSDK_INT32 iMediaSessionID,
	DPSDK_INT32* pWidth,
	DPSDK_INT32* pHeight);

/** 
 * @brief	Set audio channel state
 * @param	[IN] iSessionID			User Session ID
 * @param	[IN] iMediaSessionID	Media Session ID
 * @param	[IN] iChannelID			Channel ID
 * @param	[IN] iFlag				Flag
 * @return	Return 0 if succeeded, return error code if failed. 
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_SetAudioChannelState(DPSDK_INT32 iSessionID,
															   DPSDK_INT32 iMediaSessionID,
															   DPSDK_INT32 iChannelID,
															   DPSDK_INT32 iFlag);

/** 
 * @brief	Get audio channel state
 * @param	[IN] iSessionID			User Session ID
 * @param	[IN] iMediaSessionID	Media Session ID
 * @param	[IN] iChannelID			Channel ID
 * @param	[OUT] pFlag				Flag
 * @return	Return 0 if succeeded, return error code if failed. 
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_GetAudioChannelState(DPSDK_INT32 iSessionID,
															   DPSDK_INT32 iMediaSessionID,
															   DPSDK_INT32 iChannelID,
															   DPSDK_INT32* pFlag);

/** 
 * @brief	Get audio channels count
 * @param	[IN] iSessionID			User Session ID
 * @param	[IN] iMediaSessionID	Media Session ID
 * @param	[OUT] pChannelsCount	Audio channels count
 * @return	Return 0 if succeeded, return error code if failed. 
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_GetAudioChannelsCount(DPSDK_INT32 iSessionID,
																DPSDK_INT32 iMediaSessionID,
																DPSDK_UINT32* pChannelsCount);

/** 
 * @brief	Acquire Volume
 * @param	[IN] iSessionID			User Session ID
 * @param	[IN] iMediaSessionID	Media Session ID
 * @param	[OUT] pVolume			Volume Value
 * @return	Return 0 if succeeded, return error code if failed. 
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_GetVolume(DPSDK_INT32 iSessionID,
													DPSDK_INT32 iMediaSessionID,
													DPSDK_UINT32* pVolume);

/** 
 * @brief	Set Volume
 * @param	[IN] iSessionID			User Session ID
 * @param	[IN] iMediaSessionID	Media Session ID
 * @param	[IN] uiVolume			Volume Value
 * @return	Return 0 if succeeded, return error code if failed. 
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_SetVolume(DPSDK_INT32 iSessionID,
													DPSDK_INT32 iMediaSessionID,
													DPSDK_UINT32 uiVolume);

/**
 * @brief	Open audio via exclusive mode
 * @param	[IN] iSessionID			User Session ID
 * @param	[IN] iMediaSessionID	Media Session ID
 * @return	Return 0 if succeeded, return error code if failed. 
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_OpenSound(DPSDK_INT32 iSessionID,
													DPSDK_INT32 iMediaSessionID);

/**
 * @brief	Close audio via exclusive mode
 * @param	[IN] iSessionID			User Session ID
 * @param	[IN] iMediaSessionID	Media Session ID
 * @return	Return 0 if succeeded, return error code if failed. 
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_CloseSound(DPSDK_INT32 iSessionID,
													 DPSDK_INT32 iMediaSessionID);

/** 
 * @brief	Open audio via sharing mode
 * @param	[IN] iSessionID			User Session ID
 * @param	[IN] iMediaSessionID	Media Session ID
 * @return	Return 0 if succeeded, return error code if failed. 
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_OpenSoundShare(DPSDK_INT32 iSessionID,
														 DPSDK_INT32 iMediaSessionID);

/** 
 * @brief	Close sharing mode audio
 * @param	[IN] iSessionID			User Session ID
 * @param	[IN] iMediaSessionID	Media Session ID
 * @return	Return 0 if succeeded, return error code if failed. 
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_CloseSoundShare(DPSDK_INT32 iSessionID,
														  DPSDK_INT32 iMediaSessionID);

/**
 * @brief	Audio Enable Status
 * @param	[IN] iSessionID			User Session ID
 * @param	[IN] iMediaSessionID	Media Session ID
 * @param	[OUT] pIsOpenSound		true=Enable, false=Disable
 * @return	Return 0 if succeeded, return error code if failed. 
 * @remark	It is true for enabling both exclusive and sharing audio
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_IsOpenSoundState(DPSDK_INT32 iSessionID,
														   DPSDK_INT32 iMediaSessionID,
														   DPSDK_BOOL* pIsOpenSound);

/**
 * @brief	get video packet loss rate
 * @param	[IN] iSessionID			User Session ID
 * @param	[IN] iMediaSessionID	Media Session ID
 * @param	[OUT] pLossPacketRate	Loss rate
 * @return	Return 0 if succeeded, return error code if failed. 
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_GetLossPacketRate(DPSDK_INT32 iSessionID,
															DPSDK_INT32 iMediaSessionID,
															DPSDK_DOUBLE*  pLossPacketRate);

/**
 * @brief	Set Video Parameter
 * @param	[IN] iSessionID			User Session ID
 * @param	[IN] iMediaSessionID	Media Session ID
 * @param	[IN] iBrightness		Brightness	Default 64: Range 0-128
 * @param	[IN] iContrast			Contrast	Default 64: Range 0-128
 * @param	[IN] iSaturation		Saturation	Default 64: Range 0-128
 * @param	[IN] iHue				Hue	        Default 64: Range 0-128
 * @return	Return 0 if succeeded, return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_SetColor(DPSDK_INT32 iSessionID,
												   DPSDK_INT32 iMediaSessionID,
												   DPSDK_INT32 iBrightness, 
												   DPSDK_INT32 iContrast, 
												   DPSDK_INT32 iSaturation, 
												   DPSDK_INT32 iHue);

/**
 * @brief	Acquire Video Parameter
 * @param	[IN] iSessionID			User Session ID
 * @param	[IN] iMediaSessionID	Media Session ID
 * @param	[OUT] pBrightness		Brightness 	Default 64: Range 0-128
 * @param	[OUT] pContrast			Contrast	Default 64£ºRange 0-128
 * @param	[OUT] pSaturation		Saturation	Default 64£ºRange 0-128
 * @param	[OUT] pHue				Hue 	    Default 64£ºRange 0-128
 * @return	Return 0 if succeeded, return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_GetColor(DPSDK_INT32 iSessionID,
												   DPSDK_INT32 iMediaSessionID,
												   DPSDK_INT32* pBrightness, 
												   DPSDK_INT32* pContrast, 
												   DPSDK_INT32* pSaturation, 
												   DPSDK_INT32* pHue);

/** 
 * @brief	Set or add display area, it can display with regional zoom
 * @param	[IN] iSessionID			User Session ID
 * @param	[IN] iMediaSessionID	Media Session ID
 * @param	[IN] pRECT				Regional display area 
 * @param	[IN] hDestWnd			Display window handle
 * @param	[IN] bEnable			Open or close display area 	true Open	false Close
 * @return	Return 0 if succeeded, return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_SetDisplayRegion(DPSDK_INT32 iSessionID,
														   DPSDK_INT32 iMediaSessionID,
														   DPSDK_RECT* pRECT, 
														   HCWND hDestWnd, 
														   DPSDK_BOOL bEnable,
														   DPSDK_INT32 nMode = 0);

/**
	 * @brief	Get Video Compression
	 * @param	[IN]iSessionID				User session ID
	 * @param	[OUT] pVideoCompressInfo	 	Video Compression info
	 * @return	Return 0 if succeeded, return error code if failed.
	 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_GetVideoCompression(DPSDK_INT32 iSessionID, DPSDK_VIDEO_COMPRESS_INFO* pVideoCompressInfo);

/**
 * @brief	Set VRMode
 * @param	[IN] iSessionID			User Session ID
 * @param	[IN] iMediaSessionID	Media Session ID
 * @param	[In] sVRMode		    DPSDK_SET_VR_MODE_INFO
 * @return	Return 0 if succeeded, return error code if failed. 
 * @remark	start VR or stop VR
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_SetVRMode(DPSDK_INT32 iSessionID,
															DPSDK_INT32 iMediaSessionID,
															DPSDK_SET_VR_MODE_INFO sVRMode);
/**
 * @brief	Set Stereo Rotates
 * @param	[IN] iSessionID			User Session ID
 * @param	[IN] iMediaSessionID	Media Session ID
 * @param	[IN] sRotateInfo		DPSDK_SETSTEREO_ROTATE_INFO
 * @return	Return 0 if succeeded, return error code if failed. 
 * @remark	
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_SetStereoRotate(DPSDK_INT32 iSessionID,
													DPSDK_INT32 iMediaSessionID,
													DPSDK_SETSTEREO_ROTATE_INFO sRotateInfo);

/**
 * @brief	Set Stereo PerspectiveFovy
 * @param	[IN] iSessionID			User Session ID
 * @param	[IN] iMediaSessionID	Media Session ID
 * @param	[IN] sFovyInfo		DPSDK_SETSTEREO_FOVY_INFO
 * @return	Return 0 if succeeded, return error code if failed. 
 * @remark	
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_SetStereoPerspectiveFovy(DPSDK_INT32 iSessionID,
													DPSDK_INT32 iMediaSessionID,
													DPSDK_SETSTEREO_FOVY_INFO sFovyInfo);

/**
 * @brief	Get VR Coord2DTrans Matrix
 * @param	[IN] iSessionID			User Session ID
 * @param	[IN] iMediaSessionID	Media Session ID
 * @param	[IN] nRegionNum		
 * @param	[IN] InX		
 * @param	[IN] InY		
 * @param	[OUT] OutX		
  * @param	[OUT] OutY		
 * @return	Return 0 if succeeded, return error code if failed. 
 * @remark	
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_GetVRCoord2DTransMatrix(DPSDK_INT32 iSessionID,
																  DPSDK_INT32 iMediaSessionID,
																  DPSDK_DWORD nRegionNum, 
																  DPSDK_UINT32 InX,
																  DPSDK_UINT32 InY,
																  DPSDK_FLOAT* OutX,
																  DPSDK_FLOAT* OutY);

/**
 * @brief	Get VR Coord 3D Trans Matrix
 * @param	[IN] iSessionID			User Session ID
 * @param	[IN] iMediaSessionID	Media Session ID
 * @param	[IN] nRegionNum		
 * @param	[IN] InX		
 * @param	[IN] InY		
 * @param	[OUT] OutX		
  * @param	[OUT] OutY		
 * @return	Return 0 if succeeded, return error code if failed. 
 * @remark	
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_GetVRCoord3DTransMatrix(DPSDK_INT32 iSessionID, 
																  DPSDK_INT32 iMediaSessionID,
																  DPSDK_DWORD nRegionNum, 
																  DPSDK_FLOAT InX,
																  DPSDK_FLOAT InY,
																  DPSDK_UINT32* OutX,
																  DPSDK_UINT32* OutY);
/**
 * @brief	Get Stereo Rotate
 * @param	[IN] iSessionID			User Session ID
 * @param	[IN] iMediaSessionID	Media Session ID
 * @param	[OUT] pRotateX		
  * @param	[OUT] pRotateY	
 * @return	Return 0 if succeeded, return error code if failed. 
 * @remark	
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_GetStereoRotate(DPSDK_INT32 iSessionID,
															DPSDK_INT32 iMediaSessionID,
															DPSDK_DOUBLE* pRotateX,DPSDK_DOUBLE* pRotateY);

/**
 * @brief	Get Stereo Fovy
 * @param	[IN] iSessionID			User Session ID
 * @param	[IN] iMediaSessionID	Media Session ID
 * @param	[OUT] pFavy		
 * @return	Return 0 if succeeded, return error code if failed. 
 * @remark	
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_GetStereoFovy(DPSDK_INT32 iSessionID,
															DPSDK_INT32 iMediaSessionID,
															DPSDK_DOUBLE* pFavy);

/** 
 * @brief	Set or add display area, it can display with regional zoom
 * @param	[IN] iSessionID			User Session ID
 * @param	[IN] iMediaSessionID	Media Session ID
 * @param	[IN] pRECT				Regional display area 
 * @return	Return 0 if succeeded, return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_SetIvsDisplayRegion(DPSDK_INT32 iSessionID,
														   DPSDK_INT32 iMediaSessionID,
														   DPSDK_RECT* pRECT);

/**
* @brief	Set target box trajectory display
* @param	[IN] iSessionID			User Session ID
* @param	[IN] iMediaSessionID	Media Session ID
* @param	[IN] pReq				display param
* @return	Return 0 if succeeded, return error code if failed.
*/
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_SetObjectBoxTrajectoryDisplay(DPSDK_INT32 iSessionID,
	DPSDK_INT32 iMediaSessionID,
	DPSDK_OBJTRAJECTORYDISPLAY_REQ* pReq);

/** 
 * @brief	Enable video enhance algorithm function, it needs to include IvseDll.dll library	
 * @param	[IN] iSessionID			User Session ID
 * @param	[IN] iMediaSessionID	Media Session ID
 * @return	Return 0 if succeeded, return error code if failed.
 * @remark	It is only valid to Dahua stream, the algorithm takes longer time, it is not recommeded to use for HD video
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_StartIVSE(DPSDK_INT32 iSessionID,
													DPSDK_INT32 iMediaSessionID);

/**
 * @brief	Stop video enhance algorithm function
 * @param	[IN] iSessionID			User Session ID
 * @param	[IN] iMediaSessionID    Media Session ID
 * @return	Return 0 if succeeded, return error code if failed.
 * @remark	It is only valid to Dahua stream
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_StopIVSE(DPSDK_INT32 iSessionID,
												   DPSDK_INT32 iMediaSessionID);

/** 
 * @brief	Set video enhance parameter, it can call to combine multiple IVSE library several times	
 * @param	[IN] iSessionID			User Session ID
 * @param	[IN] iMediaSessionID	Media Session ID
 * @param	[IN] struIVSEInfo		Video Enhance Parameter
 * @param	[IN] bEnable			Enable Switch
 * @return	Return 0 if succeeded, return error code if failed.
 * @remark	It is only valid to Dahua stream
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_SetIVSE(DPSDK_INT32 iSessionID,
												  DPSDK_INT32 iMediaSessionID,
												  DPSDK_IVSE_INFO* pIVSEInfo, 
												  DPSDK_BOOL bEnable);

/** 
 * @brief	Acquire current stream data length
 * @param	[IN] iSessionID			User Session ID
 * @param	[IN] iMediaSessionID	Media Session ID
 * @param	[OUT] pFrameDataLen	Stream Data Length
 * @return	Return 0 if succeeded, return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_GetFrameDataLen(DPSDK_INT32 iSessionID,
														  DPSDK_INT32 iMediaSessionID,
														  DPSDK_UINT32* pFrameDataLen);

/** 
 * @brief	Acquire current frame time
 * @param	[IN] iSessionID			User Session ID
 * @param	[IN] iMediaSessionID	Media Session ID
 * @param	[OUT] pFrameTime		Frame Time
 * @return	Return 0 if succeeded, return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_GetFrameTime(DPSDK_INT32 iSessionID,
													   DPSDK_INT32 iMediaSessionID,
													   DPSDK_TIMET* pFrameTime);

/**
* @brief	Acquire current frame render time
* @param	[IN] iSessionID			User Session ID
* @param	[IN] iMediaSessionID	Media Session ID
* @param	[OUT] pFrameTime		Frame Render Time
* @return	Return 0 if succeeded, return error code if failed.
*/
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_GetFrameRenderTime(DPSDK_INT32 iSessionID,
															 DPSDK_INT32 iMediaSessionID,
															 DPSDK_TIMET* pFrameTime);

/** 
 * @brief	Acquire video size from stream
 * @param	[IN] iSessionID			User Session ID
 * @param	[IN] iMediaSessionID	Media Session ID
 * @param	[OUT] pWidth			Width 
 * @param	[OUT] pHeight			Height
 * @return	Return 0 if succeeded, return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_GetVideoFrameSize(DPSDK_INT32 iSessionID,
															DPSDK_INT32 iMediaSessionID,
															DPSDK_INT32* pWidth, 
															DPSDK_INT32* pHeight);

/** 
 * @brief	Acquire current frame serial number
 * @param	[IN] iSessionID			User Session ID
 * @param	[IN] iMediaSessionID	Media Session ID
 * @param	[OUT] pFrameNum			Frame Serial Number
 * @return	Return 0 if succeeded, return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_GetFrameNumber(DPSDK_INT32 iSessionID,
														 DPSDK_INT32 iMediaSessionID,
														 DPSDK_INT32* pFrameNum);

/**
 * @brief	Acquire remaining data size of source buffer zone
 * @param	[IN] iSessionID			User Session ID
 * @param	[IN] iMediaSessionID	Media Session ID
 * @param	[OUT] pBufferRemain		Remaining data size of buffer zone, unit is BYTE
 * @return	Return 0 if succeeded, return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_GetSourceBufferRemain(DPSDK_INT32 iSessionID,
																DPSDK_INT32 iMediaSessionID,
																DPSDK_INT32* pBufferRemain);

/**
 * @brief	Acquire the size of designated buffer zone
 * @param	[IN] iSessionID			User Session ID
 * @param	[IN] iMediaSessionID	Media Session ID
 * @param	[IN] uiVaxBufType		Buffer type, refer to DPSDK_VAX_BUF_TYPE enumeration definition
 * @param	[OUT] pBufferSize		Buffer zone size
 * @return	Return 0 if succeeded, return error code if failed.	
 * @remark	It returns to buffer zone value according to different parameters successdfully, source buffer zone returns to byte, buffer zone returns to frame number after decoding		
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_GetBufferValue(DPSDK_INT32 iSessionID,
														 DPSDK_INT32 iMediaSessionID,
														 DPSDK_UINT32 uiVaxBufType,
														 DPSDK_INT32* pBufferSize);

//////////////////////////////////////////////////////////////////////////
/*
 *	Intelligent Interface
 */

/**	
 * @brief	Set if it is to display intelligent info 
 * @param	[IN] iSessionID			User Session ID
 * @param	[IN] iMediaSessionID	Media Session ID
 * @param	[IN] enumType			Type, refer to DPSDK_IVS_VISIBLE definition
 * @param	[IN] bVisible Display sign  true  display  false    not display
 * @return	Return 0 if succeeded, return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_SetIvsShowFlag(DPSDK_INT32 iSessionID,
														 DPSDK_INT32 iMediaSessionID,
														 DPSDK_UINT32 uiType, 
														 DPSDK_BOOL bVisible);

/**
* @brief	Set IvsDraw Language Type
* @param	[IN] iLanguageType			Language Type 0 - zh 1 -en
* @return	Return 0 if succeeded, return error code if failed.
*/
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_SetIvsDrawLanguageType(DPSDK_UINT32 iLanguageType);

/**	
 * @brief	Set if it is to display RuleName  
 * @param	[IN] iSessionID			User Session ID
 * @param	[IN] iMediaSessionID	Media Session ID
 * @param	[IN] bEnable Display sign  true  display  false    not display
 * @return	Return 0 if succeeded, return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_SetRuleNameConfig(DPSDK_INT32 iSessionID,
														 DPSDK_INT32 iMediaSessionID,
														 DPSDK_BOOL bEnable);


/**
 * @brief	Acquire target category ID according to location
 * @param	[IN] iSessionID			User Session ID
 * @param	[IN] iMediaSessionID	Media Session ID
 * @param	[IN] iPortX				Spot X Value
 * @param	[IN] iPortY				Spot Y Value
 * @param	[OUT] pClassID			Target Category id
 * @return	Return 0 if succeeded, return error code if failed.
 * @remark	Applied to smart tracking
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_GetIvsClassId(DPSDK_INT32 iSessionID,
	DPSDK_INT32 iMediaSessionID,
	DPSDK_INT32 iPortX,
	DPSDK_INT32 iPortY,
	DPSDK_INT32* pClassID);
/**	
 * @brief	Acquire ID of designated target according to location 
 * @param	[IN] iSessionID			User Session ID
 * @param	[IN] iMediaSessionID	Media Session ID
 * @param	[IN] iPortX				Spot X Value
 * @param	[IN] iPortY				Spot Y Value
 * @param	[OUT] pObjectID			Designated Target id
 * @return	Return 0 if succeeded, return error code if failed.
 * @remark	Applied to smart tracking 
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_GetIvsObjectId(DPSDK_INT32 iSessionID,
														 DPSDK_INT32 iMediaSessionID,
														 DPSDK_INT32 iPortX, 
														 DPSDK_INT32 iPortY,
														 DPSDK_INT32* pObjectID);
/**	
 * @brief	Set designated target id
 * @param	[IN] iSessionID			User Session ID
 * @param	[IN] iMediaSessionID	Media Session ID
 * @param	[IN] iClassID			Category id
 * @param	[IN] pObjectID			Designated target id
 * @param	[IN] bAttach		    If it is to draw the shape and color of tracking object
 * @return	Return 0 if succeeded, return error code if failed.
 * @remark	Applied to smart tracking
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_SetIvsObjectId(DPSDK_INT32 iSessionID,
														 DPSDK_INT32 iMediaSessionID,
														 DPSDK_INT32 iClassID,
														 DPSDK_INT32 iObjectID,
														 DPSDK_BOOL bAttach);

//ÉèÖĂÖ¸¶¨Ä¿±ê¿̣ÑƠÉ«
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_SetTrackObjectColor(DPSDK_INT32 iSessionID, DPSDK_INT32 iMediaSessionID,
																							DPSDK_INT32 iClassID,
																							DPSDK_INT32 iObjectID,
																							DPSDK_INT32 iObjectType, 
																							DPSDK_BOOL bSpecialShape);
/**	
 * @brief	Acquire enter and leave number
 * @param	[IN] iSessionID			User Session ID
 * @param	[IN] iMediaSessionID	Media Session ID
 * @param	[OUT] pInValue			Enter Number
 * @param	[OUT] pOutValue			Leave Number
 * @return	Return 0 if succeeded, return error code if failed.
 * @remark	Applied to people counting 
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_GetIvsPCInOutValue(DPSDK_INT32 iSessionID,
															 DPSDK_INT32 iMediaSessionID,
															 DPSDK_INT32* pInValue, 
															 DPSDK_INT32* pOutValue);

DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_GetAllIvsObjectInfo(DPSDK_INT32 iSessionID, 
															  DPSDK_INT32 iMediaSessionID, 
															  DPSDK_IVSOBJECTLIST* pList);

//////////////////////////////////////////////////////////////////////////
/*
 *	Split Interface
 */

/** 
 * @brief	Splicing algorithm, used for display of 4K screen
 * @param	[IN] iSessionID			User Session ID
 * @param	[IN] iMediaSessionID	Media Session ID
 * @param	[IN] iMode				Mode, 0 is basic mode, 1 is 1+3 mode, 2 is 1+5 mode etc. refer to DPSDK_SPLIT_TRECE_TYPE
 * @return	Return 0 if succeeded, return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_SplitProc(DPSDK_INT32 iSessionID,
													DPSDK_INT32 iMediaSessionID,
													DPSDK_UINT32 iMode);

/** 
 * @brief	Splicing algorithm,it needs amplified rectangle location for update
 * @param	[IN] iSessionID			User Session ID
 * @param	[IN] iMediaSessionID	Media Session ID
 * @param	[IN] pAreaRectList		Initial address of rectangle coordinate array 
									If nMode is 0, then it should be NULL;
									If nMode is 1 or 4, then the size of the array is 3;
									If nMode is 2, then the size of the array is 5;
									If nMode is 5, then the size of array is 6 
 * @return	Return 0 if succeeded, return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_SplitProcUpdate(DPSDK_INT32 iSessionID,
														  DPSDK_INT32 iMediaSessionID,
														  DPSDK_DISPLAY_RECT_LIST* pAreaRectList);

//////////////////////////////////////////////////////////////////////////
/*
 *	ANPR Interface
 */

/** 
 * @brief	Start ANPR Image Monitoring
 * @param	[IN] iSessionID				User Session ID
 * @param	[IN] pBayPicParam			ANPR Image Parameter
 * @param	[OUT] pMonitorSessionID		Monitoring Session ID
 * @return	Return 0 if succeeded, return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_StartBayonetPicture(DPSDK_INT32 iSessionID,
															  DPSDK_PICTURE_MONITOR* pBayPicParam,
															  DPSDK_INT32* pMonitorSessionID);

/** 
 * @brief	Stop ANPR Image Monitoring
 * @param	[IN] iSessionID				User Session ID
 * @param	[IN] iMonitorSessionID		Monitoring Session ID
 * @return	Return 0 if succeeded, return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_StopBayonetPicture(DPSDK_INT32 iSessionID,
															 DPSDK_INT32 iMonitorSessionID,
															 DPSDK_CHANNEL_ID* pChannelId=NULL);


/**
* @brief	Start ANPR Image Monitoring
* @param	[IN] iSessionID				User Session ID
* @param	[IN] pBayPicParam			ANPR Image Parameter
* @param	[OUT] pMonitorSessionID		Monitoring Session ID
* @return	Return 0 if succeeded, return error code if failed.
*/
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_StartBayonetPicHttp(DPSDK_INT32 iSessionID,
	DPSDK_PICTURE_MONITOR* pBayPicParam,
	DPSDK_INT32* pMonitorSessionID);

/**
* @brief	Stop ANPR Image Monitoring
* @param	[IN] iSessionID				User Session ID
* @param	[IN] iMonitorSessionID		Monitoring Session ID
* @param	[IN] pChannelID				ChannelID
* @return	Return 0 if succeeded, return error code if failed.
*/
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_StopBayonetPicHttp(DPSDK_INT32 iSessionID,
	DPSDK_INT32 iMonitorSessionID,
	DPSDK_CHANNEL_ID* pChannelId);


/**
* @brief	Stop ANPR Image Monitoring
* @param	[IN] iSessionID				User Session ID
* @param	[IN] iMonitorSessionID		Monitoring Session ID
* @param	[IN] pChannelID				ChannelID
* @return	Return 0 if succeeded, return error code if failed.
*/
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_StopBayonetPicHttpEx(DPSDK_INT32 iSessionID,
	DPSDK_INT32 iMonitorSessionID,
	DPSDK_CHANNEL_ID* pChannelId);

/**
 * @brief	Acquire ANPR Image Monitoring Dictionary Data
 * @param	[IN] iSessionID				User Session ID
 * @param	[IN] pLanguage				Language, e.g.£ºzh_CN
 * @param	[IN] iDictionaryType		Dictionary type,refer to DPSDK_BAYONET_DICTIONARY_TYPE definition
 * @param	[OUT] pDicListXml			Dictionary data list xml
 * @return	Return 0 if succeeded, return error code if failed.
 * @note		pDicListXml needs to be released by DPSDK_ReleaseDataBuffer interface
 *
 *			pDicListXml format shown as follows
 *			<List>
 *				<Item>
 *					<id>id</id>							--Item ID
 *					<itemCode>name</itemCode>			--Item Coding
 *					<itemName>name</itemName>			--Item Name
 *					<itemPar1>name</itemPar1>			--Parameter 1
 *					<itemPar2>name</itemPar2>			--Parameter 2
 *					<itemType>name</itemType>			--Type coding, ID of dictionary type
 *					<itemTypeName>name</itemTypeName>	--Type name, name of dictionary type
 *					<memo>name</memo>					--Item Description
 *					<sort>name</sort>					--Sorting Code
 *					<stat>name</stat>					--Status
 *				</Item>
 *			</List>
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_GetBayonetDictionary(DPSDK_INT32 iSessionID,
															   DPSDK_CHAR* pLanguage,
															   DPSDK_INT32 iDictionaryType,
															   DPSDK_CHAR** pDicListXml);

/**
 * @brief	Acquire Section List Data
 * @param	[IN] iSessionID						User Session ID
 * @param	[IN] fDataCallBack					Data synchronization callback function, refer to DPSDK_DATA_ITC_SECTION_LIST for data type
 * @param	[IN] pUserData						User Data
 * @return	Return 0 if succeeded, return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_GetAllItcSections(DPSDK_INT32 iSessionID,
															DPSDK_DataCallback fDataCallBack,
															DPSDK_VOID* pUserData);

/**
 * @brief	Add car control
 * @param	[IN] iSessionID						User Session ID
 * @param	[IN] pParam							Car control parameter
 * @return	Return 0 if succeeded, return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_AddCarControl(DPSDK_INT32 iSessionID,
														DPSDK_CAR_CTRL_PARAM* pParam);

/**
 * @brief	Get count of car_capture records
 * @param	[IN] iSessionID						User Session ID
 * @param	[IN] pParam							parameter
 * @param	[OUT] pResult						Result
 * @return	Return 0 if succeeded, return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL  DPSDK_GetCarCaptureRecordCount(DPSDK_INT32 iSessionID, 
															 DPSDK_CAR_CAPTURE_RECORD_COUNT_PARAM* pParam, 
															 DPSDK_EXPRESS_RECORDS_COUNT_INFO* pResult);

/**
 * @brief	Get count of range_speed records
 * @param	[IN] iSessionID						User Session ID
 * @param	[IN] pParam							parameter
 * @param	[OUT] pResult						Result
 * @return	Return 0 if succeeded, return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL  DPSDK_GetRangeSpeedRecordCount(DPSDK_INT32 iSessionID, 
															 DPSDK_RANGE_SPEED_ROCORD_COUNT_PARAM* pParam, 
															 DPSDK_EXPRESS_RECORDS_COUNT_INFO* pResult);

/**
 * @brief	Get count of survey_alarm records
 * @param	[IN] iSessionID						User Session ID
 * @param	[IN] pParam							parameter
 * @param	[OUT] pResult						Result
 * @return	Return 0 if succeeded, return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL  DPSDK_GetSurveyAlarmRecordCount(DPSDK_INT32 iSessionID, 
															  DPSDK_SURVEY_ALARM_RECORD_COUNT_PARAM* pParam, 
															  DPSDK_EXPRESS_RECORDS_COUNT_INFO* pResult);

/**
* @brief	Get count of violation records
 * @param	[IN] iSessionID						User Session ID
 * @param	[IN] pParam							Break rules and regulations record count parameter
 * @param	[OUT] pResult						Result
 * @return	Return 0 if succeeded, return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL  DPSDK_GetPeccancyRecordCount(DPSDK_INT32 iSessionID, 
														   DPSDK_PECCANCY_ROCORD_COUNT_PARAM* pParam, 
														   DPSDK_EXPRESS_RECORDS_COUNT_INFO* pResult);

/**
 * @brief	Acquire Organization Data according to condition
 * @param	[IN] iSessionID				Organization Session ID
 * @param	[IN] pQueryOrgInfo			Organization Query Condition, refer to DPSDK_QUERY_ORG_INFO definition
 * @param	[IN] uiQueryLen				Organization Query Condition Length
 * @param	[IN] fDataCallBack			Data Synchronization Callback Function, refer to DPSDK_DATA_ORG_INFO for data type.
 * @param	[IN] pUserData				User Data
 * @return	Return 0 if succeeded, return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_GetOrganization(DPSDK_INT32 iSessionID,
														  DPSDK_QUERY_ORG_INFO* pQueryOrgInfo,
														  DPSDK_UINT32 uiQueryLen,
														  DPSDK_DataCallback fDataCallBack,
														  DPSDK_VOID* pUserData);

/**
 * @brief	Acquire device tree via hierarchy
 * @param	[IN] iSessionID				User Session ID
 * @param	[IN] pParam					Hierarchy Query Condition
 * @param	[IN] pPageInfo				Page Info
 * @param	[OUT] uiTotal				Total number of records
 * @param	[IN] fDataCallBack			Data synchronization callback function, refer to DPSDK_DATA_DEVICE_LAYERED for data type
 * @param	[IN] pUserData				User Data
 * @return	Return 0 if succeeded, return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_GetDeviceByLayered(DPSDK_INT32 iSessionID,
															 DPSDK_GET_DEVICE_LAYERED_PARAM* pParam,
															 DPSDK_PAGE_INFO* pPageInfo,
															 DPSDK_INT32* pTotal,
															 DPSDK_DataCallback fDataCallBack,
															 DPSDK_VOID* pUserData);

/**
 * @brief	Get grade device tree
 * @param	[IN] iSessionID				User Session ID
 * @param	[IN] pParam					Param
 * @param	[IN] fDataCallBack			Data sync callback function, refer to DPSDK_DATA_TREE_GRADE_DEVICE_TREE_INFO for data type
 * @param	[IN] pUserData				User Data
 * @return	Return 0 if succeeded, return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_GetGradeDeviceTree(DPSDK_INT32 iSessionID, 
															 DPSDK_TREE_GRADE_DEVICE_TREE_PARAM* pParam, 
															 DPSDK_DataCallback fDataCallBack, 
															 DPSDK_VOID* pUserData);

/**
 * @brief	Release Data Cache
 * @param	[IN] pBuffer				Cache that needs to be released
 * @return	Return 0 if succeeded, return error code if failed.
 * @note		pBuffer is the cache space which is internally applied by sdk
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_ReleaseDataBuffer(DPSDK_CHAR* pBuffer);

DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_GetChnlInfobyDev(DPSDK_INT32 iSessionID, 
														   DPSDK_CHANNEL_ID* pChnlId, 
														   DPSDK_TVWALL_CHANNEL_INFO* pChnlInfo);
/**
* @brief	Acquire SearchTree Data according to condition
* @param	[IN] iSessionID				User Session ID
* @param	[IN] pQuerySearchInfo		Search Condition, refer to DPSDK_GET_SEARCHTREE
* @param	[IN] fDataCallBack			Data Synchronization Callback Function, refer to DPSDK_DATA_ORG_INFO for data type.
* @param	[IN] pUserData				User Data
* @return	Return 0 if succeeded, return error code if failed.
**/
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_GetSearchTree(DPSDK_INT32 iSessionID,
														DPSDK_GET_SEARCHTREE_CONDITION* pQuerySearchInfo,
														DPSDK_DataCallback fDataCallBack,
														DPSDK_VOID* pUserData);

/**
* @brief	Acquire all organization trees (exclude device, channel)
* @param	[IN] iSessionID				User Session ID
* @param	[IN] iOrgType				Organization type, default is 1, basic organization
* @param	[IN] pOrgCodes				Specify query recursion suborganization, Default incoming NULL
* @param	[IN] fDataCallBack			Data synchronization callback function, refer to DPSDK_DATA_ALL_ORG_INFO for data type
* @param	[IN] pUserData				User Data
* @return	Return 0 if succeeded, return error code if failed.
**/
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_GetAllOrg(DPSDK_INT32 iSessionID,
													DPSDK_INT32 iOrgType,
													DPSDK_CHAR* pOrgCodes, 
													DPSDK_DataCallback fDataCallBack,
													DPSDK_VOID* pUserData);


DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_GetEncStatistics(DPSDK_INT32 iSessionID, int* pTotal, int* pOnline);

DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_CheckDeviceStatus(DPSDK_INT32 iSessionID,
															DPSDK_DEVICE_LIST* pList,
															DPSDK_DataCallback fDataCallBack,
															DPSDK_VOID* pUserData);

DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_CheckChannelStatus(DPSDK_INT32 iSessionID,
															 DPSDK_CHANNEL_LIST* pList,
															 DPSDK_DataCallback fDataCallBack,
															 DPSDK_VOID* pUserData);
/**
 * @brief	Acquire Device Data
 * @param	[IN] iSessionID				User Session ID
 * @param	[IN] pQueryDevInfo			Query Condition,
 * @param	[IN] uiQueryLen				Query Condition Length,
 * @param	[IN] fDataCallBack			Data sync callback function, refer to DPSDK_DATA_DEVICE_INFO for data type
 * @param	[OUT] pUserData				User Data
 * @return	Return 0 if succeeded, return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_GetDevice(DPSDK_INT32 iSessionID,
													DPSDK_QUERY_DEV_INFO* pQueryDevInfo,
													DPSDK_UINT32 uiQueryLen,
													DPSDK_DataCallback fDataCallBack,
													DPSDK_VOID* pUserData);

//////////////////////////////////////////////////////////////////////////
/*
 *	TV wall interface (Client)
 */ 

/**
 * @brief	Get TV wall list 
 * @param	[IN] iSessionID				User session ID
 * @param	[OUT] pTVWallList 			TV wall list 
 * @param	[IN] uiBufLen	 			Buffer size
 * @return	Return 0 if succeeded, return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_GetTVWallList(DPSDK_INT32 iSessionID,
														DPSDK_TVWALL_LIST* pTVWallList,
														DPSDK_UINT32 uiBufLen);

/**
 * @brief	Get TV wall information 
 * @param	[IN] iSessionID				User session ID
 * @param	[IN] iTVWallID 				TV wall ID
 * @param	[OUT] pTVWallInfo 			TV wall info 
 * @return	Return 0 if succeeded, return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_GetTVWallInfo(DPSDK_INT32 iSessionID,
														DPSDK_INT32 iTVWallID,
														DPSDK_TVWALL_INFO* pTVWallInfo);

/**
 * @brief	Get decoded channel Xml of the bonding TV wall£¨do not use now£©
 * @param	[IN] iSessionID				User session ID
 * @param	[IN] iTVWallID 				TV wall ID
 * @param	[OUT] pScreenDecoderXml 	Decoded channel Xml of the bonding TV wall
 * @return	Return 0 if succeeded, return error code if failed.
 * @note		pScreenDecoderXml shall be released by DPSDK_ReleaseDataBuffer
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_GetTVWallScreenDecoderXml(DPSDK_INT32 iSessionID,
																	DPSDK_INT32 iTVWallID,
																	DPSDK_CHAR** pScreenDecoderXml);

/**
 * @brief	Get TV wall task list 
 * @param	[IN] iSessionID				User session ID
 * @param	[IN] iTVWallID 				TV wall ID
 * @param	[OUT] pTaskList 			TV wall task list
 * @param	[IN] uiBufLen	 			Buffer size 
 * @return	Return 0 if succeeded, return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_GetTVWallTaskList(DPSDK_INT32 iSessionID,
															DPSDK_INT32 iTVWallID,
															DPSDK_TVWALL_TASK_LIST* pTaskList,
															DPSDK_UINT32 uiBufLen);

/**
 * @brief	Get TV wall task info 
 * @param	[IN] iSessionID				User session ID
 * @param	[IN] iTVWallID 				TV wall ID
 * @param	[IN] iTaskID 				Task ID
 * @param	[IN] fDataCallBack			Data synchronization call function. Refer to DPSDK_DATA_TVWALL_TASK_INFO for data type. 
 * @param	[IN] pUserData				User data 
 * @return	Return 0 if succeeded, return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_GetTVWallTaskInfo(DPSDK_INT32 iSessionID, 
															DPSDK_INT32 iTVWallID, 
															DPSDK_INT32 iTaskID, 
															DPSDK_DataCallback fDataCallBack,
															DPSDK_VOID* pUserData,
															DPSDK_BASE_PARAM* pBaseInfo = NULL);

/**
 * @brief	Get TV wall task Xml £¨do not use now£©
 * @param	[IN] iSessionID				User session ID
 * @param	[IN] iTVWallID 				TV wall ID
 * @param	[IN] iTaskID 				Task ID
 * @param	[OUT] pTaskXml			 	Task Xml info
 * @return	Return 0 if succeeded, return error code if failed.
 * @note		pTaskXml shall be released by DPSDK_ReleaseDataBuffer
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_GetTVWallTaskXml(DPSDK_INT32 iSessionID,
														   DPSDK_INT32 iTVWallID,
														   DPSDK_INT32 iTaskID,
														   DPSDK_CHAR** pTaskXml);

/**
 * @brief	Get current running TV wall task info
 * @param	[IN] iSessionID				User session ID
 * @param	[OUT] pTaskList 			TV wall task list
 * @param	[IN] uiBufLen	 			Buffer size 
 * @return	Return 0 if succeeded, return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_GetCurrentTVWallTaskInfo(DPSDK_INT32 iSessionID,
																   DPSDK_CURRENT_TVWALL_TASK_LIST* pTaskList,
																   DPSDK_UINT32 uiBufLen);

/**
 * @brief	Delete TV wall task 
 * @param	[IN] iSessionID				User session ID
 * @param	[IN] iTVWallId 				TV wall ID
 * @param	[IN] iTaskId 				Task ID
 * @return	Return 0 if succeeded, return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_DeleteTVWallTask(DPSDK_INT32 iSessionID,
														   DPSDK_INT32 iTVWallId,
														   DPSDK_INT32 iTaskId,
															DPSDK_BASE_PARAM* pBaseInfo = NULL);


/**
 * @brief	Add TV wall task £¨do not use now£©
 * @param	[IN] iSessionID				User session ID
 * @param	[IN] pTaskBaseInfo 			TV wall task info
 * @param	[IN] pTaskXmlData 			TV wall task Xml
 * @return	Return 0 if succeeded, return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_AddTVWallTask(DPSDK_INT32 iSessionID,
														DPSDK_TVWALL_TASK_BASE_INFO* pTaskBaseInfo,
														DPSDK_CHAR* pTaskXmlData); 

/**
 * @brief	Add or save TV wall task 
 * @param	[IN] iSessionID				User session ID
 * @param	[IN] pTaskInfo 				TV wall task 
 * @return	Return 0 if succeeded, return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_AddTVWallTaskEx(DPSDK_INT32 iSessionID,
														  DPSDK_TVWALL_TASK_INFO* pTaskInfo);

/**
 * @brief	Print Decoder 
 * @param	[IN] iSessionID				User session ID
 * @param	[IN] pParam 				Print Decoder Param 
 * @return	Return 0 if succeeded, return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_TVWallPrintDecoder(DPSDK_INT32 iSessionID,
														     DPSDK_TVWALL_PRINT_DECODER_PARAM* pParam);


/**
 * @brief	Control output to TV wall (do not use now)
 * @param	[IN] iSessionID				User session ID
 * @param	[IN] pCtrlInfo 				Control output to TV wall info
 * @param	[IN] pTaskXmlData 			TV wall task Xml
 * @return	Return 0 if succeeded, return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_MapToTVWall(DPSDK_INT32 iSessionID,
													  DPSDK_TVWALL_CONTROL_INFO* pCtrlInfo,
													  DPSDK_CHAR* pTaskXmlData); 

/**
 * @brief	Control output to TV wall 
 * @param	[IN] iSessionID				User session ID
 * @param	[IN] pCtrlInfo 				Control output to TV wall info
 * @param	[IN] pTaskInfoList 			TV wall task list 
 * @return	Return 0 if succeeded, return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_MapToTVWallEx(DPSDK_INT32 iSessionID,
														DPSDK_TVWALL_CONTROL_INFO* pCtrlInfo,
														DPSDK_TVWALL_TASK_INFO_LIST* pTaskInfoList);
/**
 * @brief	Save TV wall task file 
 * @param	[IN] iSessionID				User session ID
 * @param	[IN] szFileName				File name
 * @param	[IN] pTaskInfoList 			TV wall task list 
 * @return	Return 0 if succeeded, return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_SaveTVWallProjectFile(DPSDK_INT32 iSessionID,
																DPSDK_CHAR* szFileName,
																DPSDK_TVWALL_TASK_INFO_LIST* pTaskInfoList);

/**
 * @brief	Get TV wall task file 
 * @param	[IN] iSessionID				User session ID
 * @param	[IN] szFileName				File name 
 * @param	[IN] fDataCallBack			Data synchronization call function. Refer to DPSDK_DATA_GET_TVWALL_PROJECT_FILE for data type
 * @param	[IN] pUserData				User data 
 * @return	Return 0 if succeeded, return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_GetTVWallProjectFile(DPSDK_INT32 iSessionID,
															   DPSDK_CHAR* szFileName,
															   DPSDK_DataCallback fDataCallBack,
															   DPSDK_VOID* pUserData);

/**
 * @brief	Control screen on/off 
 * @param	[IN] iSessionID				User session ID
 * @param	[IN] pCtrlInfo 				On/off control info
 * @return	Return 0 if succeeded, return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_TVWallPowerControl(DPSDK_INT32 iSessionID,
															 DPSDK_TVWALL_POWER_CONTROL_INFO* pCtrlInfo); 

/**
 * @brief	Add frame on the screen 
 * @param	[IN] iSessionID				User session ID
 * @param	[IN] pScreenAddFrame 		Adding frame on the video parameters
 * @return	Return 0 if succeeded, return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_TVWallScreenAddFrame(DPSDK_INT32 iSessionID,
															   DPSDK_TVWALL_SCREEN_ADD_FRAME* pScreenAddFrame);

/**
 * @brief	Fisheye instant on TV wall 
 * @param	[IN] iSessionID				User session ID
 * @param	[IN] pFishEyeToWall 		Fisheye instant on TV wall  parameters
 * @return	Return 0 if succeeded, return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_TVWallFishEyeToWall(DPSDK_INT32 iSessionID,
															  DPSDK_TVWALL_FISH_EYE_TO_WALL* pFishEyeToWall);

/**
 * @brief	Open new window 
 * @param	[IN] iSessionID				User session ID
 * @param	[IN] pOpenWndList 			Opening new window list 
 * @param	[IN] uiBufLen 				Buffer size 
 * @return	Return 0 if succeeded, return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_TVWallOpenWindows(DPSDK_INT32 iSessionID,
															DPSDK_TVWALL_OPEN_WINDOW* pOpenWndList,
															DPSDK_INT32 uiBufLen);

/**
 * @brief	Get TV wall capability set 
 * @param	[IN] iSessionID				User session ID
 * @param	[IN] iTvWallId		 		TV wall ID
 * @param	[IN] pScreenCapsList 		        Capability set 
 * @param	[IN] uiBufLen 				Buffer size 
 * @return	Return 0 if succeeded, return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_GetTVWallScreenCaps(DPSDK_INT32 iSessionID,
															  DPSDK_INT32 iTvWallId,
															  DPSDK_TVWALL_SCREEN_CAPS_LIST* pScreenCapsList,
															  DPSDK_INT32 uiBufLen);

//////////////////////////////////////////////////////////////////////////
/*
 *	TV wall interface (Manager)
 */

/**
 * @brief	Config TV wall Windows 
 * @param	[IN] iSessionID				User session ID
 * @param	[IN] pTVWallWindowsInfo 	TV wall windows info
 * @param	[IN] fDataCallBack			Data synchronization call function. Refer to DPSDK_DATA_CONFIG_TVWALL_WINDOWS_RESULT for data type
 * @param	[IN] pUserData				User data 
 * @return	Return 0 if succeeded, return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_ConfigTVWallWindows(DPSDK_INT32 iSessionID,
															  DPSDK_TVWALL_CONFIG_WINDOWS_INFO* pTVWallWindowsInfo,
															  DPSDK_DataCallback fDataCallBack,
															  DPSDK_VOID* pUserData);

/**
 * @brief	Get TV wall Windows 
 * @param	[IN] iSessionID				User session ID
 * @param	[IN] iTVWallId				TVWall Id 
 * @param	[IN] fDataCallBack			Data synchronization call function. Refer to DPSDK_DATA_GET_TVWALL_WINDOWS_LIST for data type
 * @param	[IN] pUserData				User data 
 * @return	Return 0 if succeeded, return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_GetTVWallWindowsList(DPSDK_INT32 iSessionID,
															   DPSDK_INT32 iTVWallId,
														       DPSDK_DataCallback fDataCallBack,
														       DPSDK_VOID* pUserData);

/**
 * @brief	Save TV wall settings 
 * @param	[IN] iSessionID				User session ID
 * @param	[IN] pTVWallInfo 			TV wall info
 * @return	Return 0 if succeeded, return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_SaveTVWallConfigInfo(DPSDK_INT32 iSessionID,
															   DPSDK_TVWALL_CONFIG_INFO* pTVWallInfo);

/**
 * @brief	Add TV wall settings 
 * @param	[IN] iSessionID				User session ID
 * @param	[IN] pTVWallInfo 			TV wall info
 * @param	[OUT] pTvWallID 			TV wall ID
 * @return	Return 0 if succeeded, return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_AddTVWallConfigInfo(DPSDK_INT32 iSessionID,
															  DPSDK_TVWALL_CONFIG_INFO* pTVWallInfo,
															  DPSDK_INT32* pTvWallID);

/**
 * @brief	Switch TV wall status
 * @param	[IN] iSessionID				User session ID
 * @param	[IN] iTvWallId 				TV wall ID
 * @param	[IN] bStat 					Status false:disable,true:enable
 * @return	Return 0 if succeeded, return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_SetTVWallStatus(DPSDK_INT32 iSessionID,
														  DPSDK_INT32 iTVWallId,
														  DPSDK_BOOL bStat); 

/**
 * @brief	Delete TV wall 
 * @param	[IN] iSessionID				User session ID
 * @param	[IN] iTVWallId 				TV wall ID
 * @return	Return 0 if succeeded, return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_DeleteTVWall(DPSDK_INT32 iSessionID,
													   DPSDK_INT32 iTVWallId, DPSDK_DataCallback fDataCallBack = NULL, DPSDK_VOID* pUserData = NULL);

/**
 * @brief	Get TV wall configuration info
 * @param	[IN] iSessionID				User session ID
 * @param	[IN] iTVWallId 				TV wall ID
 * @param	[OUT] pTvWallInfo 			TV wall info
 * @return	Return 0 if succeeded, return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_GetTVWallConfigInfo(DPSDK_INT32 iSessionID,
															  DPSDK_INT32 iTVWallId,
															  DPSDK_TVWALL_CONFIG_INFO* pTVWallInfo);


/**
 * @brief	Check the TV wall name exists or not
 * @param	[IN] iSessionID				User session ID
 * @param	[IN] pTVWallName			TV wall ID
 * @param	[OUT] bResult 				falseL:does not exist, true: exist
 * @return	Return 0 if succeeded, return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_CheckTVWallNameExist(DPSDK_INT32 iSessionID,
															   DPSDK_CHAR* pTVWallName,
															   DPSDK_BOOL* bResult); 

//////////////////////////////////////////////////////////////////////////
/*
 *	PTZ interface
 */

/**
 * @brief	PTZ function operation 
 * @param	[IN]	iSessionID					User session ID					
 * @param	[IN]	pPtzOperateFunctionParam	PTZ function operation parameters
 * @param	[OUT]	pPtzOperateFunctionResult	Operation result 
 * @return	Return 0 if succeeded, return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_PtzOperateFunction(DPSDK_INT32 iSessionID, 
															 DPSDK_PTZOPERATE_FUNCTION_PARAM* pPtzOperateFunctionParam, 
															 DPSDK_PTZOPERATE_RESULT* pPtzOperateFunctionResult);
/**
 * @brief	Operate PTZ camera 
 * @param	[IN]	iSessionID					User session ID
 * @param	[IN]	pPtzOperateCamereParam		PTZ camera operation parameters
 * @param	[OUT]	pPtzOperateResult			Operation result 
 * @return	Return 0 if succeeded, return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_PtzOperateCamera(DPSDK_INT32 iSessionID, 
														   DPSDK_PTZOPERATE_CAMERA_PARAM* pPtzOperateCamereParam, 
														   DPSDK_PTZOPERATE_RESULT* pPtzOperateResult);
/**
 * @brief	PTZ direction control
 * @param	[IN]	iSessionID					User session ID
 * @param	[IN]	pPtzOperateDirectParam		PTZ direction control parameters
 * @param	[OUT]	pPtzOperateResult			Operation result 
 * @return	Return 0 if succeeded, return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_PtzOperateDirect(DPSDK_INT32 iSessionID, 
														   DPSDK_PTZOPERATE_DIRECT_PARAM* pPtzOperateDirectParam, 
													       DPSDK_PTZOPERATE_RESULT* pPtzOperateResult);

/**
 * @brief	Motorzied focus control
 * @param	[IN]	iSessionID					User session ID
 * @param	[IN]	pPtzOperateFocusParam		Motorized  focus control parameters
 * @param	[OUT]	pPtzOperateResult			Operation result 
 * @return	Return 0 if succeeded, return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_PtzOperateFocus(DPSDK_INT32 iSessionID, 
														  DPSDK_PTZOPERATE_FOCUS_PARAM* pPtzOperateFocusParam, 
														  DPSDK_PTZOPERATE_RESULT* pPtzOperateResult);
/**
 * @brief	Control preset  whg tag: do not use now
 * @param	[IN]	iSessionID					User session ID
 * @param	[IN]	pPtzOperatePrePointParam	Preset control parameters 
 * @param	[OUT]	pPtzOperateResult			Operation result 
 * @return	Return 0 if succeeded, return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_PtzOperatePresetPoint(DPSDK_INT32 iSessionID, 
																DPSDK_PTZOPERATE_PRESETPOINT_PARAM* pPtzOperatePrePointParam, 
																DPSDK_PTZOPERATE_RESULT* pPtzOperateResult);

/**
* @brief	Control preset  whg tag: do not use now
* @param	[IN]	iSessionID					User session ID
* @param	[IN]	DPSDK_PtzOperateWatchPoint	watch control parameters
* @param	[OUT]	pPtzOperateResult			Operation result
* @return	Return 0 if succeeded, return error code if failed.
*/
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_PtzOperateWatchPoint(DPSDK_INT32 iSessionID,
															   DPSDK_PTZOPERATE_WATCHPOINT_PARAM* pPtzOperateWatchPointParam,
															   DPSDK_PTZOPERATE_RESULT* pPtzOperateResult);
/**
 * @brief	3D positioning
 * @param	[IN]	iSessionID					User session ID
 * @param	[IN]	pPtzOperateSitPositionParam	3D positioning parameters
 * @param	[OUT]	pPtzOperateResult			Operation result 
 * @return	Return 0 if succeeded, return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_PtzSitPosition(DPSDK_INT32 iSessionID, 
														 DPSDK_PTZOPERATE_SITPOSITION_PARAM* pPtzOperateSitPositionParam, 
														 DPSDK_PTZOPERATE_RESULT* pPtzOperateResult);

/**
 * @brief	3D positioning parameters(For VSL)
 * @param	[IN]	iSessionID					User session ID
 * @param	[IN]	pPtzOperateSitPositionParam	3D positioning parameters
 * @param	[OUT]	pPtzOperateResult			Operation result 
 * @return	Return 0 if succeeded, return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_PtzSitPositionEx(DPSDK_INT32 iSessionID,
														   DPSDK_PTZOPERATE_SITPOSITION_EX_PARAM* pPtzOperateSitPositionParam,
														   DPSDK_PTZOPERATE_RESULT* pPtzOperateResult);

/**
 * @brief	Lock, unlock
 * @param	[IN]	iSessionID					User session ID
 * @param	[IN]	pPtzOperateArrangePtzParam	Lock, unlock parameters
 * @param	[OUT]	pPtzOperateResult			Operation result
 * @return	Return 0 if succeeded, return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_PtzArrangePtz(DPSDK_INT32 iSessionID, 
														DPSDK_PTZOPERATE_ARRANGEPTZ_PARAM* pPtzOperateArrangePtzParam, 
														DPSDK_PTZOPERATE_RESULT* pPtzOperateResult);

/**
 * @brief	Search tour 
 * @param	[IN]	iSessionID					User session ID
 * @param	[IN]	pChannelId					Channel Id
 * @param	[OUT]	pCruiseInfoXml				Tour info xml stream
 * @return	Return 0 if succeeded, return error code if failed.
 * @note		pCruiseInfoXml shall be released by DPSDK_ReleaseDataBuffer
 *
 *			pCruiseInfoXml format as follows 
 *			<CruiseInfos>
 *				<CruiseInfo>
 *					<ChannelId>channelid</ChannelId>
 *					<CruiseId>cruiseid</CruiseId>
 *					<Data>data</Data>
 *				</CruiseInfo>
 *			</CruiseInfos>
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_CruiseGetCruise(DPSDK_INT32 iSessionID, 
														  DPSDK_CHAR* pChannelId, 
														  DPSDK_CHAR** pCruiseInfoXml);


/**
* @brief	get Cruise
* @param	[IN]	iSessionID					User session ID
* @param	[IN]	pChannelId					Channel Id
* @param	[OUT]	pCruiseInfoXml				Tour info xml stream
* @return	Return 0 if succeeded, return error code if failed.
* @note		pCruiseInfoXml shall be released by DPSDK_ReleaseDataBuffer
*
*			pCruiseInfoXml format as follows
*			<CruiseInfos>
*				<CruiseInfo>
*					<CruiseId>cruiseid</CruiseId>
*					<Data>data</Data>
*				</CruiseInfo>
*			</CruiseInfos>
*/
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_GetCruiseList(DPSDK_INT32 iSessionID,
																										DPSDK_CHAR* pChannelId,
																										DPSDK_CHAR** pCruiseInfoXml);

/**
 * @brief	Delete tour 
 * @param	[IN]	iSessionID					User session ID
 * @param	[IN]	pChannelId					Channel Id
 * @param	[IN]	iCruiseId					Tour Id
 * @return	Return 0 if succeeded, return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_CruiseDelCruise(DPSDK_INT32 iSessionID, 
														  DPSDK_CHAR* pChannelId, 
														  DPSDK_INT32 iCruiseId);
/**
 * @brief	Save tour 
 * @param	[IN]	iSessionID					User session ID
 * @param	[IN]	pChannelId					Channel Id
 * @param	[IN]	iCruiseId					Tour Id
 * @param	[IN]	pData						Tour info
 * @return	Return 0 if succeeded, return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_CruiseSaveCruise(DPSDK_INT32 iSessionID,
														   DPSDK_CHAR* pChannelId,
														   DPSDK_INT32 iCruiseId,
														   DPSDK_CHAR* pData);
/**
 * @brief	Start manual record
 * @param	[IN]	iSessionID					User session ID
 * @param	[IN]	pStartRemoteRecordParam		Start manual record parameters
 * @param	[OUT]	pStartRemoteRecordResult	Operation result 
 * @return	Return 0 if succeeded, return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_StartRemoteRecord(DPSDK_INT32 iSessionID, 
															DPSDK_PTZOPERATE_STARTREMOTERECORD_PARAM* pStartRemoteRecordParam, 
															DPSDK_PTZOPERATE_REMOTERECORD_RESULT* pStartRemoteRecordResult);
/**
 * @brief	Stop manual record
 * @param	[IN]	iSessionID					User session ID
 * @param	[IN]	pStopRemoteRecordParam		Stop manual record parameters
 * @param	[OUT]	pStopRemoteRecordResult		Operation result 
 * @return	Return 0 if succeeded, return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_StopRemoteRecord(DPSDK_INT32 iSessionID, 
														   DPSDK_PTZOPERATE_STOPREMOTERECORD_PARAM* pStopRemoteRecordParam, 
														   DPSDK_PTZOPERATE_REMOTERECORD_RESULT* pStopRemoteRecordResult);
/**
 * @brief	Get PTZ position
 * @param	[IN]	iSessionID					User session ID
 * @param	[IN]	pChannelId					Channel Id
 * @param	[OUT]	pPtzPosition				PTZ position
 * @return	Return 0 if succeeded, return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_QueryPtzPostion(DPSDK_INT32 iSessionID, 
														  DPSDK_CHAR* pChannelId, 
														  DPSDK_PTZOPERATE_POSITIONINFO* pPtzPosition);
/**
 * @brief	Set PTZ vision domain 
 * @param	[IN]	iSessionID					User session ID
 * @param	[IN]	pChannelId					Channel Id
 * @param	[IN]	iViewDir					View domain start angle
 * @return	Return 0 if succeeded, return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_SetChannelViewInfo(DPSDK_INT32 iSessionID, 
															 DPSDK_CHAR* pChannelId, 
															 DPSDK_INT32 iViewDir);
/**
 * @brief	Set PTZ vision domain 
 * @param	[IN]	iSessionID					User session ID
 * @param	[IN]	pChannelId					Channel Id
 * @param	[OUT]	pPtzChannelViewInfo			  PTZ view domain info
 * @return	Return 0 if succeeded, return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_GetChannelViewInfo(DPSDK_INT32 iSessionID, 
															 DPSDK_CHAR* pChannelId, 
															 DPSDK_PTZOPERATE_CHANNELVIEWINFO* pPtzChannelViewInfo);
/**
 * @brief	Search preset 
 * @param	[IN]	iSessionID					User session ID
 * @param	[IN]	pChannelId					Channel Id
 * @param	[OUT]	pPresetPointList			   Preset info list 
 * @param	[IN]	uiBufLen					Buffer size 
 * @return	Return 0 if succeeded, return error code if failed..
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_PtzGetPresetPoints(DPSDK_INT32 iSessionID,
															 DPSDK_CHAR* pChannelId,
															 DPSDK_PTZ_PRESETPOINT_LIST* pPresetPointList,
															 DPSDK_UINT32 uiBufLen);

/**
 * @brief	Get motorized focus status 
 * @param	[IN]	iSessionID					User session ID
 * @param	[IN]	pChannelId					Channel Id
 * @param	[OUT]	pFocusStatusInfo			Motorized focus status  status
 * @return	Return 0 if succeeded, return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_PtzGetFocusStatus(DPSDK_INT32 iSessionID, 
															DPSDK_CHAR* pChannelId, 
															DPSDK_FOCUSSTATUS_INFO* pFocusStatusInfo);

/**
 * @brief	Get lens Info 
 * @param	[IN]	iSessionID					User session ID
 * @param	[IN]	pChannelId					Channel Id
 * @param	[OUT]	pLensInfo					Lens Info
 * @return	Return 0 if succeeded, return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_PtzGetLensInfo(DPSDK_INT32 iSessionID, 
														DPSDK_CHAR* pChannelId, 
														DPSDK_FOCUSSLENS_INFO* pLensInfo);


/* @brief	Panoramic  plus PTZ camera operations
 * @param	[IN]	iSessionID					User session ID
 * @param	[IN]	pSmartTrackParam			Panoramic plus PTZ camera  parameters
 * @return	Return 0 if succeeded, return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_SmartTrackOperate(DPSDK_INT32 iSessionID, 
															DPSDK_SMARTTRACK_PARAM* pSmartTrackParam);

/**
 * @brief	Set channel cruise preset
 * @param	[IN] iSessionID			User session ID
 * @param	[IN] pCurisePreset		Cruise preset parameter
 * @return	Return 0 if succeeded, return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_SetChannelCruisePreset(DPSDK_INT32 iSessionID, 
																 DPSDK_PTZ_CHANNL_CURISEPRESET_PARAM* pCurisePreset);

/**
 * @brief	Get channel cruise preset
 * @param	[IN] iSessionID			User session ID
 * @param	[IN] pChannelId			Channel ID
 * @param	[OUT] fDataCallBack
 * @param	[OUT] pUserData
 * @return	Return 0 if succeeded, return error code if failed.
 */
// DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_GetChannelCruisePreset(DPSDK_INT32 iSessionID, 
// 																 const DPSDK_CHAR* pChannelId, 
// 																 DPSDK_PTZ_CHANNL_CURISEPRESET_PARAM* pCurisePreset);
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_GetChannelCruisePreset(DPSDK_INT32 iSessionID, 
 																 const DPSDK_CHAR* pChannelId, 
																 DPSDK_DataCallback fDataCallBack,
																 DPSDK_VOID* pUserData,
																 DPSDK_BASE_PARAM* pBaseInfo = NULL);

//////////////////////////////////////////////////////////////////////////
/*
 *	Virtual talk interface
 */

/**
 * @brief	change call status 
 * @param	[IN] iSessionID			User session ID
 * @param	[IN] iMediaSessionID	Media session ID
 * @param	[IN] iCallStatus		Call status 
 * @return	Return 0 if succeeded, return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_ModifyCallStatus(DPSDK_INT32 iSessionID,
														   DPSDK_INT32 iMediaSessionID,
														   DPSDK_INT32 iCallStatus);

DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_UpdateVtCallParams(DPSDK_INT32 iSessionID, DPSDK_VTCALL_TIME_PARAM* pParam);

/**
 * @brief	intercom call request
 * @param	[IN] iSessionID			User session ID
 * @param	[IN] pStartTalkParam	Call request parameter
 * @param	[OUT] pMediaSessionID	Media session ID
 * @param	[OUT] pStartVtCallRes	Start VtCall Response
 * @return	Return 0 if succeeded, return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_StartVtCall(DPSDK_INT32 iSessionID,
													  DPSDK_START_VTCALL_PARAM* pStartVtCallParam,
													  DPSDK_INT32* pMediaSessionID,
													  DPSDK_START_VTCALL_RES* pStartVtCallRes);
/**
 * @brief	stop intercom call
 * @param	[IN] iSessionID			User session ID
 * @param	[IN] iMediaSessionID	Media session ID
 * @return	Return 0 if succeeded, return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_StopVtCall(DPSDK_INT32 iSessionID,
													 DPSDK_INT32 iMediaSessionID);

/**
 * @brief	intercom release call
 * @param	[IN] iSessionID			User session ID
 * @param	[IN] iMediaSessionID	Media session ID
 * @return	Return 0 if succeeded, return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_CeaseVtCall(DPSDK_INT32 iSessionID,
													  DPSDK_INT32 iMediaSessionID);

/**
 * @brief	require talk right
 * @param	[IN] iSessionID			User session ID
 * @param	[IN] iMediaSessionID	Media session ID
 * @return	Return 0 if succeeded, return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_DemandVtCall(DPSDK_INT32 iSessionID,
													   DPSDK_INT32 iMediaSessionID);

/**
 * @brief	intercom call invitation
 * @param	[IN] iSessionID			User session ID
 * @param	[IN] pInviteCallParam	Request parameter
 * @param	[OUT] pMediaSessionID	Media session ID
 * @return	Return 0 if succeeded, return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_InviteVtCall(DPSDK_INT32 iSessionID,
													   DPSDK_INVITE_VTCALL_PARAM* pInviteVtCallParam,
													   DPSDK_INT32* pMediaSessionID);

/**
 * @brief	intercom call hang up
 * @param	[IN] iSessionID			User session ID
 * @param	[IN] iMediaSessionID	Media session ID
 * @return	Return 0 if succeeded, return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_ByeVtCall(DPSDK_INT32 iSessionID,
													DPSDK_INT32 iMediaSessionID);

/**
 * @brief	intercom change call status 
 * @param	[IN] iSessionID			User session ID
 * @param	[IN] iMediaSessionID	Media session ID
 * @param	[IN] iCallStatus		Call status 
 * @return	Return 0 if succeeded, return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_ModifyVtCallStatus(DPSDK_INT32 iSessionID,
															 DPSDK_INT32 iMediaSessionID,
															 DPSDK_INT32 iCallStatus);

/**
 * @brief	intercom reject call request(after request is received, call before invite, so no need of iMediaSessionID)
 * @param	[IN] iSessionID			User session ID
 * @param	[IN] pParam				Request parameter
 * @return	Return 0 if succeeded, return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_RejectVtCall(DPSDK_INT32 iSessionID,
													   DPSDK_VTCALL_REJECT_PARAM* pParam);

/**
 * @brief	intercom cancel call request(after ring, you can call cancel, no need of  iMediaSessionID)
 * @param	[IN] iSessionID			User session ID
 * @param	[IN] pParam				Request parameter
 * @return	Return 0 if succeeded, return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_CancelVtCall(DPSDK_INT32 iSessionID,
													   DPSDK_VTCALL_CANCEL_PARAM* pParam);

/**
 * @brief	intercom info release
 * @param	[IN] iSessionID			User session ID
 * @param	[IN] pParam				Message parameter
 * @return	Return 0 if succeeded, return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_VtCallPublishInfo(DPSDK_INT32 iSessionID,
															DPSDK_VTCALL_PUBLISH_PARAM* pParam);

/**
 * @brief	intercom talk cancel info release
 * @param	[IN] iSessionID			User session ID
 * @param	[IN] pMsgID				Message ID
 * @return	Return 0 if succeeded, return error code if failed.
 */
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_StopPublishInfo(DPSDK_INT32 iSessionID,
															DPSDK_CHAR* pMsgID);

/*********************************************    GeneralJsonTransport   **************************************************/

/**
* @brief	general transport method
* @param	[IN]iSessionID					User session ID
* @param	[IN]pRequest					request param
* @param	[IN]iRequestSize				request struct size
* @param	[IN]pResponse					response param
* @param	[IN]iResponseSize				response struct size
* @note		Content-Type header default null.append to pRequest->pHeaderList if needed
* @return   Return 0 if succeeded, return error code if failed
*/
DPSDK_EXPORT DPSDK_INT32 DPSDK_CALL DPSDK_GeneralJsonTransport(DPSDK_INT32 iSessionID,
															   DPSDK_GENERALTRANSPORT_REQUEST* pRequest,DPSDK_INT32 iRequestSize, 
															   DPSDK_GENERALTRANSPORT_RESPONSE* pResponse,DPSDK_INT32 iResponseSize);

/*********************************************    GeneralJsonTransport   **************************************************/
#endif // _DPSDK_DPSDK_H_
