Browse Source

Merge branch 'st3' into uat

gifur 2 years ago
parent
commit
80572387b8

+ 52 - 75
Module/mod_SalesRecorder/mod_SalesRecorder.cpp

@@ -266,7 +266,7 @@ static BOOL FindMatchedFile(LPCSTR sFindPath, LPCSTR sFindFileName, ULONGLONG& u
 #endif
 
 
-CSimpleStringA DecryptString(LPCTSTR lpszEncrpyted)
+static CSimpleStringA DecryptString(LPCTSTR lpszEncrpyted)
 {
 	if (NULL == lpszEncrpyted) {
 		return CSimpleStringA("");
@@ -304,14 +304,14 @@ void SalesRecordServiceSession::Handle_CheckVideoDiskStatus( SpReqAnsContext<Sal
 
 void SalesRecordServiceSession::Handle_PlayVideo(SpReqAnsContext<SalesRecorderSerVice_PlayVideo_Req, SalesRecorderSerVice_PlayVideo_Ans>::Pointer ctx)
 {
-	DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("PlayVideo name is %s.", (LPCTSTR)CSimpleStringW2A(ctx->Req.VideoName));
+	DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("PlayVideo.");
 	ErrorCodeEnum ErrorCode = m_pEntity->HandleDisplayVideo();
 	ctx->Answer(ErrorCode);
 }
 
 void SalesRecordServiceSession::Handle_SaveVideo(SpReqAnsContext<SalesRecorderSerVice_SaveVideo_Req, SalesRecorderSerVice_SaveVideo_Ans>::Pointer ctx)
 {
-	DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("Save Video name is %s.", (LPCTSTR)CSimpleStringW2A(ctx->Req.VideoName));
+	DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("Save Video.");
 	ErrorCodeEnum ErrorCode = m_pEntity->HandleSaveVideo();
 	ctx->Answer(ErrorCode);
 }
@@ -332,14 +332,14 @@ void SalesRecordServiceSession::Handle_SetAudioTransFlag(SpReqAnsContext<SalesRe
 
 void SalesRecordServiceSession::Handle_StopShowVideo(SpReqAnsContext<SalesRecorderSerVice_StopShowVideo_Req, SalesRecorderSerVice_StopShowVideo_Ans>::Pointer ctx)
 {
-	DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("Stop Show Video name is %s.", (LPCTSTR)CSimpleStringW2A(ctx->Req.VideoName));
+	DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("Stop Show Video.");
 	ErrorCodeEnum ErrorCode = m_pEntity->HandleStopShowVideo();
 	ctx->Answer(ErrorCode);
 }
 
 void SalesRecordServiceSession::Handle_PlaySalesRecord(SpReqAnsContext<SalesRecorderSerVice_PlaySalesRecord_Req, SalesRecorderSerVice_PlaySalesRecord_Ans>::Pointer ctx)
 {
-	DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("Stop Show Video name is %s.", (LPCTSTR)CSimpleStringW2A(ctx->Req.VideoName));
+	DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("Stop Show Video.");
 	ErrorCodeEnum ErrorCode = m_pEntity->HandlePlaySalesRecordVideo(ctx->Req.WndX, ctx->Req.WndY, ctx->Req.WndWidth, ctx->Req.WndHeight);
 	ctx->Answer(ErrorCode);
 }
@@ -375,12 +375,6 @@ ErrorCodeEnum CSalesRecorderEntity::__OnStart( ErrorCodeEnum preOperationError )
 	m_bIsAudioNsOn = false;
 	m_iAudioNsPolicy = 2;
 
-#ifdef RVC_OS_WIN
-	if (SetPriorityClass(GetCurrentProcess(), REALTIME_PRIORITY_CLASS)){
-		DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("Set Process(%d) RealTime Priority Success.",GetCurrentProcessId());
-	}
-#endif
-
 	m_eDeviceType = RvcGetDeviceType();
 
 	int iAudioQuality = 3;
@@ -389,8 +383,7 @@ ErrorCodeEnum CSalesRecorderEntity::__OnStart( ErrorCodeEnum preOperationError )
 	m_max_disk_percent = MAX_DISK_PERCENT; // add by ly 2018/02/24
 	CSmartPointer<IConfigInfo> spConfig;
 	CSmartPointer<IEntityFunction> spFunction = GetFunction();
-	if (spFunction->OpenConfig(Config_CenterSetting, spConfig) == Error_Succeed) 
-	{
+	if (spFunction->OpenConfig(Config_CenterSetting, spConfig) == Error_Succeed) {
 		spConfig->ReadConfigValueInt("SalesRecorder","MaxDiskPercent",m_max_disk_percent);
 		spConfig->ReadConfigValueInt("SalesRecorder","AudioSampleRate",m_audio_samplerate);
 		spConfig->ReadConfigValueInt("SalesRecorder","AudioBitRate",m_audio_out_bitrate);
@@ -400,8 +393,8 @@ ErrorCodeEnum CSalesRecorderEntity::__OnStart( ErrorCodeEnum preOperationError )
 		spConfig->ReadConfigValueInt("SalesRecorder","IsAudioNsOn",iIsAudioNsOn);
 		spConfig->ReadConfigValueInt("SalesRecorder","AudioQuality",iAudioQuality);
 	}
-	if (m_max_disk_percent <= 0 || m_max_disk_percent >= 100) 
-	{
+
+	if (m_max_disk_percent <= 0 || m_max_disk_percent >= 100) {
 		m_max_disk_percent = MAX_DISK_PERCENT;
 	}
 
@@ -411,72 +404,35 @@ ErrorCodeEnum CSalesRecorderEntity::__OnStart( ErrorCodeEnum preOperationError )
 		m_bIsAudioNsOn = true;
 	}
 	
-	if (m_bWholeSection != 0 && m_bWholeSection != 1)
-	{
+	if (m_bWholeSection != 0 && m_bWholeSection != 1){
 		m_bWholeSection = FALSE;
 	}
 
-	if (m_bApplyHighQuality != 0 && m_bApplyHighQuality != 1)
-	{
+	if (m_bApplyHighQuality != 0 && m_bApplyHighQuality != 1){
 		m_bApplyHighQuality = FALSE;
 	}
 	DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("[dbg] m_bApplyHighQuality:%d",m_bApplyHighQuality);
 
 	m_bEwsRecord = FALSE;
 
-	if (preOperationError != Error_Succeed)
+	if (preOperationError != Error_Succeed) {
 		return preOperationError;
+	}
 
 	ErrorCodeEnum Error = Error_Succeed;
 	m_iActiveCamera = CAMERA_TYPE_ENV;
 	m_iCameraState = 'N';
 	
 	int i = 0;
-	if (ePadtype == m_eDeviceType||eMobilePadType == m_eDeviceType||eDesk2SType == m_eDeviceType||eDesk1SType == m_eDeviceType||eDesk2SIntegratedType == m_eDeviceType)
-	{
-		// add by ly(edit by ly 2018/03/12)
-#ifdef RVC_OS_WIN
-		m_pPlayer = new Clibwmpplayer(this);
-#else
-		//m_pPlayer = new Clibmediaplayer(this);
-#endif // RVC_OS_WIN
-		m_arrListener.Init(9);
-		GetFunction()->SubscribeLog(m_arrListener[i++], this, Log_Event, Severity_Middle, Error_IgnoreAll, LOG_EVT_UI_STARTRECORD, NULL, false);
-		GetFunction()->SubscribeLog(m_arrListener[i++], this, Log_Event, Severity_Middle, Error_IgnoreAll, LOG_EVT_UI_STARTAFTERPREVIEWRECORD, NULL, false);
-		//GetFunction()->SubscribeLog(m_arrListener[i++], this, Log_Event, Severity_Middle, Error_IgnoreAll, LOG_EVT_UI_STOPRECORD, NULL, false);
-		//GetFunction()->SubscribeLog(m_arrListener[i++], this, Log_Event, Severity_Middle, Error_IgnoreAll, LOG_EVT_UI_SHOWVIDEO, NULL, false);
-		//GetFunction()->SubscribeLog(m_arrListener[i++], this, Log_Event, Severity_Middle, Error_IgnoreAll, LOG_EVT_UI_SAVEVIDEO, NULL, false);
-		GetFunction()->SubscribeLog(m_arrListener[i++], this, Log_Event, Severity_Middle, Error_IgnoreAll, LOG_EVT_UI_DELETEVIDEO, NULL, false);
-		GetFunction()->SubscribeLog(m_arrListener[i++], this, Log_Event, Severity_None, Error_IgnoreAll, LOG_EVT_UI_RETURNMENU, NULL, false);
-		GetFunction()->SubscribeLog(m_arrListener[i++], this, Log_Event, Severity_None, Error_IgnoreAll, EVENT_UKEY_PULLOUT, NULL, false);
-		GetFunction()->SubscribeLog(m_arrListener[i++], this, Log_Event, Severity_None, Error_IgnoreAll, LOG_EVT_UI_VIDEOAPPENDWATERMARK, NULL, false);
-		//GetFunction()->SubscribeLog(m_arrListener[i++], this, Log_Event, Severity_Middle, Error_IgnoreAll, LOG_EVT_UI_STARTREMOTERECORD, NULL, false);
-		//GetFunction()->SubscribeLog(m_arrListener[i++], this, Log_Event, Severity_Middle, Error_IgnoreAll, LOG_EVT_UI_STOPREMOTERECORD, NULL, false);
-		GetFunction()->SubscribeLog(m_arrListener[i++], this, Log_Event, Severity_High, Error_IgnoreAll, LOG_EVT_SALESRECORD_ENTITY_EXCEPTION, NULL, false);
-		GetFunction()->SubscribeLog(m_arrListener[i++], this, Log_Event, Severity_High, Error_IgnoreAll, LOG_EVT_AUDIOSTREAM_TRANSMISSION_FAILED, NULL, false);
-	}
-	else
-	{
-		// add by ly @2018/01/10
-#ifdef RVC_OS_WIN
-		m_pPlayer = new Clibwmpplayer(this);
-#else
-		//m_pPlayer = new Clibmediaplayer(this);
-#endif // RVC_OS_WIN
-		m_arrListener.Init(8);
-		GetFunction()->SubscribeLog(m_arrListener[i++], this, Log_Event, Severity_Middle, Error_IgnoreAll, LOG_EVT_UI_STARTRECORD, NULL, false);
-		GetFunction()->SubscribeLog(m_arrListener[i++], this, Log_Event, Severity_Middle, Error_IgnoreAll, LOG_EVT_UI_STARTAFTERPREVIEWRECORD, NULL, false);
-		//GetFunction()->SubscribeLog(m_arrListener[i++], this, Log_Event, Severity_Middle, Error_IgnoreAll, LOG_EVT_UI_STOPRECORD, NULL, false);
-		//GetFunction()->SubscribeLog(m_arrListener[i++], this, Log_Event, Severity_Middle, Error_IgnoreAll, LOG_EVT_UI_SHOWVIDEO, NULL, false);
-		//GetFunction()->SubscribeLog(m_arrListener[i++], this, Log_Event, Severity_Middle, Error_IgnoreAll, LOG_EVT_UI_SAVEVIDEO, NULL, false);
-		GetFunction()->SubscribeLog(m_arrListener[i++], this, Log_Event, Severity_Middle, Error_IgnoreAll, LOG_EVT_UI_DELETEVIDEO, NULL, false);
-		GetFunction()->SubscribeLog(m_arrListener[i++], this, Log_Event, Severity_None, Error_IgnoreAll, LOG_EVT_UI_RETURNMENU, NULL, false);
-		GetFunction()->SubscribeLog(m_arrListener[i++], this, Log_Event, Severity_None, Error_IgnoreAll, LOG_EVT_UI_VIDEOAPPENDWATERMARK, NULL, false);
-		//GetFunction()->SubscribeLog(m_arrListener[i++], this, Log_Event, Severity_Middle, Error_IgnoreAll, LOG_EVT_UI_STARTREMOTERECORD, NULL, false);
-		//GetFunction()->SubscribeLog(m_arrListener[i++], this, Log_Event, Severity_Middle, Error_IgnoreAll, LOG_EVT_UI_STOPREMOTERECORD, NULL, false);
-		GetFunction()->SubscribeLog(m_arrListener[i++], this, Log_Event, Severity_High, Error_IgnoreAll, LOG_EVT_SALESRECORD_ENTITY_EXCEPTION, NULL, false);
-		GetFunction()->SubscribeLog(m_arrListener[i++], this, Log_Event, Severity_High, Error_IgnoreAll, LOG_EVT_AUDIOSTREAM_TRANSMISSION_FAILED, NULL, false);
-	}
+
+	m_arrListener.Init(7);
+	GetFunction()->SubscribeLog(m_arrListener[i++], this, Log_Event, Severity_Middle, Error_IgnoreAll, LOG_EVT_UI_STARTRECORD, NULL, false);
+	GetFunction()->SubscribeLog(m_arrListener[i++], this, Log_Event, Severity_Middle, Error_IgnoreAll, LOG_EVT_UI_STARTAFTERPREVIEWRECORD, NULL, false);
+	GetFunction()->SubscribeLog(m_arrListener[i++], this, Log_Event, Severity_Middle, Error_IgnoreAll, LOG_EVT_UI_DELETEVIDEO, NULL, false);
+	GetFunction()->SubscribeLog(m_arrListener[i++], this, Log_Event, Severity_None, Error_IgnoreAll, LOG_EVT_UI_RETURNMENU, NULL, false);
+	GetFunction()->SubscribeLog(m_arrListener[i++], this, Log_Event, Severity_None, Error_IgnoreAll, LOG_EVT_UI_VIDEOAPPENDWATERMARK, NULL, false);
+	GetFunction()->SubscribeLog(m_arrListener[i++], this, Log_Event, Severity_High, Error_IgnoreAll, LOG_EVT_SALESRECORD_ENTITY_EXCEPTION, NULL, false);
+	GetFunction()->SubscribeLog(m_arrListener[i++], this, Log_Event, Severity_High, Error_IgnoreAll, LOG_EVT_AUDIOSTREAM_TRANSMISSION_FAILED, NULL, false);
 
 	GetFunction()->RegistSysVarEvent(SYSVAR_ACTIVETRACKINGCAMERA,this);
 	GetFunction()->RegistSysVarEvent(SYSVAR_CAMERASTATE,this);
@@ -492,22 +448,18 @@ ErrorCodeEnum CSalesRecorderEntity::__OnStart( ErrorCodeEnum preOperationError )
 
 	GetFunction()->RegistSysVarEvent(SYSVAR_CALLTYPE, this);
 	GetFunction()->GetSysVar(SYSVAR_CALLTYPE, strValue);
-	if (strValue[0] == CALLTYPE_NORMAL) 
-	{
+	if (strValue[0] == CALLTYPE_NORMAL) {
 		m_nSysCallType = 0;
 	} 
-	else if (strValue[0] == CALLTYPE_MOBILE) 
-	{
+	else if (strValue[0] == CALLTYPE_MOBILE) {
 		m_nSysCallType = 1;
 	} 
-	else 
-	{
+	else {
 		assert(0);
 	}
 
 	Error = GetFunction()->RegistSysVarEvent("SessionID", this);
-	if (Error != Error_Succeed) 
-	{
+	if (Error != Error_Succeed) {
 		LOG_TRACE("register sysvar %s failed!", "SessionID");
 	}
 
@@ -516,13 +468,16 @@ ErrorCodeEnum CSalesRecorderEntity::__OnStart( ErrorCodeEnum preOperationError )
 	if (Error != Error_Succeed) {
 		LOG_TRACE("get global record temp path failed!");
 	}
+
 	if (m_TempDir.GetLength() > 0 && m_TempDir[m_TempDir.GetLength()-1] != SPLIT_SLASH) {
 		m_TempDir += SPLIT_SLASH_STR;
 	}
+
 	Error = GetFunction()->GetPath("UploadVideo", m_RecordSaveDir);
 	if (Error != Error_Succeed) {
 		LOG_TRACE("get global record save path failed!");
 	}
+
 	if (m_RecordSaveDir.GetLength() > 0 && m_RecordSaveDir[m_RecordSaveDir.GetLength()-1] != SPLIT_SLASH) {
 		m_RecordSaveDir += SPLIT_SLASH_STR;
 	}
@@ -628,7 +583,18 @@ void CSalesRecorderEntity::Debug(record_loglevel elevel, const char* fmt, ...)
 	if (RECORD_LOG_DEBUG <= elevel) {
 		va_list arg;
 		va_start(arg, fmt);
-		vDbg(fmt, arg);
+		int n = _vscprintf(fmt, arg);
+		if (n >= MAX_PATH) {
+			char* buf = (char*)malloc((size_t)(n + 1));
+			vsnprintf(buf, n + 1, fmt, arg);
+			DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("%s", buf);
+			free(buf);
+		}
+		else {
+			char strlog[MAX_PATH] = { 0 };
+			vsnprintf(strlog, MAX_PATH, fmt, arg);
+			DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("%s", strlog);
+		}
 		va_end(arg);
 	}
 }
@@ -636,7 +602,18 @@ void CSalesRecorderEntity::Debug(record_loglevel elevel, const char* fmt, ...)
 void CSalesRecorderEntity::vDebug(record_loglevel elevel, const char* str, va_list list)
 {
 	if (RECORD_LOG_DEBUG <= elevel) {
-		vDbg(str, list);
+		int n = _vscprintf(str, list);
+		if (n >= MAX_PATH) {
+			char* buf = (char*)malloc((size_t)(n + 1));
+			vsnprintf(buf, n + 1, str, list);
+			DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("%s", buf);
+			free(buf);
+		}
+		else {
+			char strlog[MAX_PATH] = { 0 };
+			vsnprintf(strlog, MAX_PATH, str, list);
+			DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("%s", strlog);
+		}
 	}
 }
 

+ 3 - 6
Module/mod_counterconnector/mod_counterconnector.cpp

@@ -882,8 +882,7 @@ void ChannelCounterConnectorClient::OnMessage(ErrorCodeEnum Error, ChannelServic
 void ChannelCounterConnectorClient::OnMessage( ErrorCodeEnum Error, ChannelService_Packet_Info &Msg, CSmartPointer<IReleasable> pData )
 {
 	LOG_FUNCTION();
-	if (Error == Error_Succeed) 
-	{
+	if (Error == Error_Succeed) {
 		CCounterConnectorEntity *pEntity = static_cast<CCounterConnectorEntity*>(m_pEntityBase);
 		pEntity->OnReceivePkt(Msg.type, Msg.sub_type, (const char*)Msg.data.m_pData, Msg.data.m_iLength);
 	}
@@ -910,8 +909,7 @@ void CCounterConnectorSession::Handle_StartCallExternal(SpReqAnsContext<ConnectS
 	ErrorCodeEnum rc = Error_Succeed;
 	RVCCallingParam* callparam = (RVCCallingParam*)ctx->Req.CommandParam.m_pData;
 
-	if (callparam)
-	{
+	if (callparam){
 		m_pEntity->m_fsm.m_CallingParam.connect_ip = callparam->strConnectIp ; 
 		m_pEntity->m_fsm.m_CallingParam.connect_port = callparam->nSipPort;
 		m_pEntity->m_fsm.m_CallingParam.nCallType	= (CallingTypeEnum)callparam->nCallType;
@@ -943,8 +941,7 @@ void CCounterConnectorSession::Handle_StopCall(SpReqAnsContext<ConnectService_St
 		DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("Handle_StopCall strConnectIp=%s, strConnectSession=%s,event_port=%d", m_pEntity->m_fsm.m_SessionParam.connect_ip.GetData(),
 			m_pEntity->m_fsm.m_SessionParam.connect_session.GetData(), m_pEntity->m_fsm.m_SessionParam.event_port);
 	}
-	else
-	{
+	else{
 		DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("Get SessionParam Failed!\n");
 	}
 	DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("holder hangup call!");

+ 12 - 0
Module/mod_mediacontroller/mod_mediacontroller.cpp

@@ -1164,6 +1164,12 @@ ErrorCodeEnum CMediaControllerEntity::AutoGetVideoDeviceName(capture_config_t* c
 }
 
 
+static CSimpleStringA generateCameraInfosJson(CSimpleStringA strEnv, CSimpleStringA strOpt, int iEnv, int iOpt, int iMtu)
+{
+	return CSimpleStringA::Format("[{\"EnvCamera\":\"%s\",\"OptCamera\":\"%s\",\"EnvRotate\":\"%d\",\"OptRotate\":\"%d\",\"mtu\":\"%d\"}]",
+		strEnv.GetData(), strOpt.GetData(), iEnv, iOpt, iMtu);
+}
+
 ErrorCodeEnum CMediaControllerEntity::LoadConfig(capture_config_t *conf)
 {
 	CSmartPointer<IEntityFunction> spFunction = GetFunction();
@@ -1172,6 +1178,7 @@ ErrorCodeEnum CMediaControllerEntity::LoadConfig(capture_config_t *conf)
 	strEwsCam = "$";
 	ErrorCodeEnum Error = spFunction->OpenConfig(Config_Root, spConfig);
 	if (Error == Error_Succeed) {
+		int imtu = 0;
 		table.AddEntryString("Audio", "handfree_in_dev", conf->strAudioIn, "$");
 		table.AddEntryString("Audio", "handfree_out_dev", conf->strAudioOut, "$");
 		table.AddEntryString("Video", "EnvCamera", conf->strVideoEnv, "$");
@@ -1181,9 +1188,14 @@ ErrorCodeEnum CMediaControllerEntity::LoadConfig(capture_config_t *conf)
 		table.AddEntryInt("Video", "OptRotate", conf->video_opt_rotate, 0);
 		table.AddEntryInt("Video", "EnvFps", conf->video_env_fps, 0);
 		table.AddEntryInt("Video", "OptFps", conf->video_opt_fps, 0);
+		table.AddEntryInt("Video", "mtu", imtu, 0);
 		Error = table.Load(spConfig);
 		if (Error == Error_Succeed)
 		{
+			LogWarn(Severity_Low, Error_Debug, ERROR_MOD_MEDIACONTROLLER_ENV_CAMERA_INFO, conf->strVideoEnv.GetData());
+			LogWarn(Severity_Low, Error_Debug, ERROR_MOD_MEDIACONTROLLER_OPT_CAMERA_INFO, conf->strVideoOpt.GetData());
+			LogWarn(Severity_Low, Error_Debug, LOG_EVT_MEDIACONTROLLER_CAMERA_INFOS, generateCameraInfosJson(conf->strVideoEnv, conf->strVideoOpt, conf->video_env_rotate, conf->video_opt_rotate, imtu).GetData());
+
 			char strInfo[MAX_PATH * 2] = { 0 };
 			Error = AutoGetVideoDeviceName(conf);
 			snprintf(strInfo, MAX_PATH * 2, "env = %s,opt = %s", conf->strVideoEnv.GetData(), conf->strVideoOpt.GetData());

+ 8 - 10
Module/mod_sipphone/Event.h

@@ -51,16 +51,14 @@
 #define ERROR_MOD_SIP_HANDFREE_REDUCEVOLUMNFAIL			0x30180171  //免提恢复音量失败,级别2
 
 
-#define EVENT_MOD_SIP_LOCAL_WINDOW_CREATE_FAILED		0x30190501	//创建本地视频框失败
-#define EVENT_MOD_SIP_REMOTE_WINDOW_CREATE_FAILED		0x30190502  //创建远端视频框失败
-#define EVENT_MOD_SIP_LOCAL_WINDOW_CREATE_SUCCESS		0x30190503	//创建本地视频框成功
-#define EVENT_MOD_SIP_REMOTE_WINDOW_CREATE_SUCCESS		0x30190504  //创建远端视频框成功
-#define EVENT_MOD_SIP_LOCAL_WINDOW_DESTROY_SUCCESS		0x30190505	//销毁本地视频框成功
-#define EVENT_MOD_SIP_REMOTE_WINDOW_DESTROY_SUCCESS		0x30190506  //销毁远端视频框成功
-
-#define EVENT_MOD_SIP_COM_START_INIT					0x30190511	//COM开始初始化
-#define EVENT_MOD_SIP_COM_FINISH_INIT					0x30190512  //COM完成初始化
-#define EVENT_MOD_SIP_GET_CAMERA_INFO_FINISHED			0x30190513  //完成摄像头信息获取
+#define EVENT_MOD_SIP_LOCAL_WINDOW_CREATE_FAILED		0x30190501	//创建本地图像渲染框失败
+#define EVENT_MOD_SIP_REMOTE_WINDOW_CREATE_FAILED		0x30190502  //创建远端图像渲染框失败
+#define EVENT_MOD_SIP_LOCAL_WINDOW_CREATE_SUCCESS		0x30190503	 //创建本地视频框成功
+#define EVENT_MOD_SIP_REMOTE_WINDOW_CREATE_SUCCESS		0x30190504   //创建远端视频框成功
+#define EVENT_MOD_SIP_LOCAL_WINDOW_DESTROY_SUCCESS		0x30190505	 //销毁本地视频框成功
+#define EVENT_MOD_SIP_REMOTE_WINDOW_DESTROY_SUCCESS		0x30190506   //销毁远端视频框成功
+
+#define EVENT_MOD_SIP_GET_CAMERA_INFO_FINISHED			0x30190513   //完成摄像头信息获取
 
 #define EVENT_MOD_SIP_AUDIO_DEVICE_INFO					0x30190521
 #define EVENT_MOD_SIP_AUDIO_VOLUME_INFO					0x30190522

+ 22 - 2
Module/mod_sipphone/mod_sipphone.cpp

@@ -1868,8 +1868,19 @@ void CSIPEntity::InitFreshTimeConfig()
 	LogWarn(Severity_Low, Error_Debug, EVENT_MOD_SIP_OVERWRITE_FRESHVALUE,
 			CSimpleStringA::Format("overwrite video freshtime from centersetting cache, left fresh time is %d, right fresh time is %d.", ileftvideo, irightvideo));
     m_ilocalvideo_freshtime = ileftvideo;
-	m_iremotevideo_freshtime = irightvideo;
-	
+	m_iremotevideo_freshtime = irightvideo;	
+}
+
+static CSimpleStringA generateAudioInfoJson(const char* handfreeIn, const char* handfreeOut, const char* pickupIn, const char* pickupOut)
+{
+	return CSimpleStringA::Format("[{\"handfree_in_dev\":\"%s\",\"handfree_out_dev\":\"%s\",\"pickup_in_dev\":\"%s\",\"pickup_out_dev\":\"%s\"}]",
+		handfreeIn, handfreeOut, pickupIn, pickupOut);
+}
+
+static CSimpleStringA generateVolumeJson(int ihandfreeIn, int ihandfreeOut, int ipickupIn, int ipickupOut)
+{
+	return CSimpleStringA::Format("[{\"handfree_in_volume\":\"%d\",\"handfree_out_volume\":\"%d\",\"pickup_in_volume\":\"%d\",\"pickup_out_volume\":\"%d\"}]",
+		ihandfreeIn, ihandfreeOut, ipickupIn, ipickupOut);
 }
 
 ErrorCodeEnum CSIPEntity::LoadConfig(endpoint_conf_t *conf)
@@ -1905,7 +1916,16 @@ ErrorCodeEnum CSIPEntity::LoadConfig(endpoint_conf_t *conf)
 		table.AddEntryInt("video", "mtu", conf->mtu, 0);
 		Error = table.Load(spRootConfig);
 		if (Error == Error_Succeed) {
+			snprintf(conf->audio_handfree_in_dev, MAX_PATH, "%s", strHandFreeIn.GetData());
+			snprintf(conf->audio_handfree_out_dev, MAX_PATH, "%s", strHandFreeOut.GetData());
+			snprintf(conf->audio_pickup_in_dev, MAX_PATH, "%s", strPickupIn.GetData());
+			snprintf(conf->audio_pickup_out_dev, MAX_PATH, "%s", strPickupOut.GetData());
+
 			int id;
+			
+			LogWarn(Severity_Low, Error_Debug, EVENT_MOD_SIP_AUDIO_DEVICE_INFO, generateAudioInfoJson(conf->audio_handfree_in_dev, conf->audio_handfree_out_dev, conf->audio_pickup_in_dev, conf->audio_pickup_out_dev).GetData());
+			LogWarn(Severity_Low, Error_Debug, EVENT_MOD_SIP_AUDIO_VOLUME_INFO, generateVolumeJson(m_kept_volume_in[DEV_HANDFREE], m_kept_volume_out[DEV_HANDFREE], m_kept_volume_in[DEV_PICKUP], m_kept_volume_out[DEV_PICKUP]));
+
 #ifdef RVC_OS_WIN
 			id = capture_get_audio_device_id(true, strHandFreeIn);
 #else