浏览代码

Z991239-6004 #comment 连线相关功能日志精简优化

80274480 7 月之前
父节点
当前提交
1b3544cad7

+ 3 - 37
Module/mod_interactivecontrol/mod_interactivecontrol.cpp

@@ -111,25 +111,6 @@ void CITCtrlEntity::OnStarted()
 	else {
 		GetFunction()->SetTimer(1, this, 3370);
 	}
-
-	if (Error_Succeed == ConnectToLocalPlayer(false)) {
-		m_bConnectPlayer = true;
-	}
-	else {
-		DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("ConnectToLocalPlayer Failed!");
-	}
-
-	if (Error_Succeed != ConnectToSalesRecord(false)) {
-		DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("ConnectToSalesRecord Failed!");
-	}
-
-	if (Error_Succeed != ConnectToSipPhone(false)) {
-		DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("ConnectToSipPhone Failed!");
-	}
-
-	if (Error_Succeed != ConnectCounterConnector(false)) {
-		DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("Connect To CounterConnector Failed!");
-	}
 }
 
 
@@ -1030,7 +1011,6 @@ void CITCtrlEntity::OnLog(const CAutoArray<CUUID> &SubIDs, const CUUID nLogID,co
 				{
 					m_pMediaCtlClient->SafeDelete();
 					m_pMediaCtlClient = NULL;
-					DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("m_pMediaCtlClient connect fail!");
 				}
 			}
 		}
@@ -1049,7 +1029,6 @@ void CITCtrlEntity::OnLog(const CAutoArray<CUUID> &SubIDs, const CUUID nLogID,co
 				if (Error != Error_Succeed) 
 				{
 					m_pPlayClient = NULL;
-					DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("m_pPlayClient connect fail!");
 				}
 			}
 		}
@@ -1068,7 +1047,6 @@ void CITCtrlEntity::OnLog(const CAutoArray<CUUID> &SubIDs, const CUUID nLogID,co
 				if (Error != Error_Succeed)
 				{
 					m_pSalesRecordClient = NULL;
-					DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("m_pSalesRecordClient connect fail!");
 				}
 			}
 		}
@@ -1091,7 +1069,6 @@ void CITCtrlEntity::OnLog(const CAutoArray<CUUID> &SubIDs, const CUUID nLogID,co
 				{
 					m_pSipPhoneClient->SafeDelete();
 					m_pSipPhoneClient = NULL;
-					DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("m_pSipPhoneClient connect fail!");
 				}
 			}
 		}
@@ -1121,7 +1098,7 @@ ErrorCodeEnum CITCtrlEntity::SaveVideo(CSimpleStringA strVideoName)
 	req.VideoName = CSimpleStringA2W(strVideoName);
 	ErrorCodeEnum rc = (*m_pSalesRecordClient)(EntityResource::getLink().upgradeLink())->SaveVideo(req, ans, 5000);
 	if(Error_Succeed == rc){
-		DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_USER).setLogCode("QLR040230BZ70301")("save video success.");
+		DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_USER).setLogCode("QLR040230BZ70301")("save video success.");
 	}
 	else{
 		LogWarn(Severity_Middle, Error_Debug, LOG_EVT_SAVE_RECORD_TIMEOUT, CSimpleStringA::Format("Save video failed for 0x%08x", rc).GetData());
@@ -1146,7 +1123,7 @@ ErrorCodeEnum CITCtrlEntity::DeleteVideo(CSimpleStringA strVideoName)
 	req.VideoName = CSimpleStringA2W(strVideoName);
 	ErrorCodeEnum rc = (*m_pSalesRecordClient)(EntityResource::getLink().upgradeLink())->DeleteVideo(req, ans, 5000);
 	if (Error_Succeed == rc) {
-		DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_USER).setLogCode("QLR040230BZ70401")("delete video success.");
+		DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_USER).setLogCode("QLR040230BZ70401")("delete video success.");
 	}
 	else {
 		LogWarn(Severity_Middle, Error_Debug, LOG_EVT_DELETE_RECORD_TIMEOUT, CSimpleStringA::Format("Delete video failed for 0x%08x", rc).GetData());
@@ -1421,11 +1398,6 @@ ErrorCodeEnum CITCtrlEntity::ConnectCounterConnector(bool blogevt)
 			}
 			return Error_InvalidState;
 		}
-		else {
-			if (blogevt) {
-				DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("Connect to CounterConnector Succeed!");
-			}
-		}
 	}
 
 	return Error_Succeed;
@@ -1763,11 +1735,6 @@ ErrorCodeEnum CITCtrlEntity::ConnectToRecord(bool blogevt)
 			}
 			return Error_InvalidState;
 		}
-		else {
-			if (blogevt) {
-				DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("Connect to record Client Succeed!");
-			}
-		}
 	}
 
 	return Error_Succeed;
@@ -2522,9 +2489,8 @@ void UIServiceSession::Handle_StopTransactionRecord(SpReqAnsContext<UIService_St
 {
 	DbgToBeidou(ctx->link, __FUNCTION__)();
 	if (m_pEntity->GetRecordMode()) {
-		LogEvent(Severity_Middle, LOG_EVT_END_HANDLE_BUSINESS, "end handle business.");
-
 		if (m_pEntity->m_bRecording) {
+			LogEvent(Severity_Middle, LOG_EVT_END_HANDLE_BUSINESS, "end handle business.");
 			m_pEntity->StopTransactionRecord(ctx->Req.StrVideoName);
 			m_pEntity->m_bRecording = false;
 		}

+ 0 - 1
Module/mod_interactivecontrol/mod_interactivecontrol.h

@@ -348,7 +348,6 @@ private:
 	CUUID m_uidLocalMediaListenser;
 	CUUID m_uidMediaControllerListenser;
 	bool m_bConnectAssist;
-	bool m_bConnectPlayer;
 	int m_iRecordMode;
 	int m_iRemoteRecordType;
 

+ 5 - 5
Module/mod_sipphone/audio_session.cpp

@@ -780,7 +780,7 @@ int audio_session_start_phonemedia(audio_session_t *session, const audio_session
 {
 	int rc;
 	if (!session) {
-		DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_USER).setLogCode("QLR0402301A5").setResultCode("RTA3119")("音频通道参数未初始化");
+		DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_USER).setLogCode("QLR0402301A5").setResultCode("RTA3119")("音频通道参数未初始化");
 		return Error_NotInit;
 	}
 		
@@ -847,10 +847,10 @@ int audio_lib_init()
 		if (rc == 0) {
 			int i;
 			CSimpleStringA strJsonIn("");
-			DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("audio input devices(%d):", icnt);
+			//DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("audio input devices(%d):", icnt);
 			for (i = 0; i < icnt; ++i) {
 				CSimpleStringA str = audio_get_dev_name(true, i);
-				DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("%d = %s", i, str.GetData());
+				//DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("%d = %s", i, str.GetData());
 				strJsonIn += CSimpleStringA::Format("\"%d\":\"%s\",", i, str.GetData());
 			}
 
@@ -861,10 +861,10 @@ int audio_lib_init()
 			LogWarn(Severity_Low, Error_Debug, LOG_EVT_SIPPHONE_GET_AUDIO_IN_INFOS, strJsonInData.GetData());
 
 			CSimpleStringA strJsonOut("");
-			DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("audio output devices(%d):", ocnt);
+			//DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("audio output devices(%d):", ocnt);
 			for (i = 0; i < ocnt; ++i) {
 				CSimpleStringA str = audio_get_dev_name(false, i);
-				DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("%d = %s", i, str.GetData());
+				//DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("%d = %s", i, str.GetData());
 				strJsonOut += CSimpleStringA::Format("\"%d\":\"%s\",", i, str.GetData());
 			}
 			if (strJsonOut.GetLength() > 0) {

+ 4 - 14
Module/mod_sipphone/endpoint.cpp

@@ -425,16 +425,13 @@ static void endpoint_media_update_audio(endpoint_call_t *call, media_desc_t *aud
 			DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_USER).setLogCode("QLR0402301A7")("释放音频通道成功");
 			call->audio = NULL;
 		}
-		else{
-			DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("call->audio is null.");
-		}
+
 		if (call->video) { // close video also 
 			video_session_stop(call->video);
 			video_session_destroy(call->video);
 			call->video = NULL;
 		}
 		else{
-			DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("call->video is null.");
 		#ifdef RVC_OS_WIN
 			if (DOUBLERECORD_CALLTYPE == call->nCallType){
 				double_record_broadcast_video_session_stop();
@@ -1118,8 +1115,6 @@ void* __event_thread(void* arg)
 
 #endif // RVC_OS_WIN
 
-	DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("enter event_thread.");
-
 	ep->root = su_root_create(ep);
 
 	ep->nua = nua_create(ep->root,
@@ -1148,7 +1143,7 @@ void* __event_thread(void* arg)
 #ifdef RVC_OS_WIN
 	CoUninitialize();
 #else
-	DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("leave event_thread.");
+
 #endif // RVC_OS_WIN
 	return 0;
 }
@@ -1209,11 +1204,8 @@ static int __endpoint_start(endpoint_t *ep)
 	}
 	return ep->event_thread ? 0 : -1;
 #else
-	//pthread_attr_t attr;
-	//pthread_attr_init(&attr);
-	//pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
+
 	int err = pthread_create(&ep->ievent_threadid, NULL, __event_thread, ep);
-	//pthread_attr_destroy(&attr);
 	if (0 == err) {
 		while (!ep->root) {
 			struct timespec ts; 
@@ -1328,9 +1320,7 @@ void endpoint_change_audio_dev(endpoint_t *ep, int dev_type)
 			ep->curr_audio_dev_type = dev_type;
 			if (ep->active_call) {
 				endpoint_media_change_audio_dev(ep->active_call, (e_dev_type)dev_type);
-			} else {
-				DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("active call is null!");
-			}
+			} 
 		}
 	}
 }

+ 23 - 32
Module/mod_sipphone/mod_sipphone.cpp

@@ -413,7 +413,7 @@ void CSIPEntity::OnLog(const CAutoArray<CUUID> &SubIDs, const CUUID nLogID,const
 
 	case LOG_EVT_UI_STARTREMOTERECORD:
 		{
-			DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("recv LOG_EVT_UI_STARTREMOTERECORD event.");
+			//DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("recv LOG_EVT_UI_STARTREMOTERECORD event.");
 		}
 		break;
 
@@ -555,7 +555,7 @@ void CSIPEntity::OnSysVarEvent(const char *pszKey, const char *pszValue,const ch
 	}
 	else if (_stricmp(pszKey, "UIState") == 0)
 	{
-		DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("UIState %s -> %s.", pszOldValue, pszValue);
+		//DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("UIState %s -> %s.", pszOldValue, pszValue);
 		if (pszOldValue[0] == 'X' && pszValue[0] == 'M')
 		{
 			if (false == m_bFirstLaunched) {
@@ -583,7 +583,6 @@ void CSIPEntity::OnPreStart(CAutoArray<CSimpleStringA> strArgs,CSmartPointer<ITr
 	ErrorCodeEnum Error = __OnStart(Error_Succeed);
 	pTransactionContext->SendAnswer(Error);
 	long lcosttime = SP::Module::Comm::RVCGetTickCount() - lstarttime;
-	DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM).setAPI("Sipphone::Starting").setCostTime(lcosttime)("Sipphone::Starting");
 	LogWarn(Severity_Low, Error_Debug, EVENT_MOD_SIP_ENTITY_STARTING_COST, CSimpleStringA::Format("sipphone entity starting cost time is %dms.", lcosttime));
 }
 
@@ -616,7 +615,9 @@ void CSIPEntity::OnStarted()
 		CSmartPointer<IEntityFunction> Func = GetFunction();
 		CSimpleStringA strValue("");
 		Func->GetSysVar(SYSVAR_SOUNDCARDSTATE, strValue);
-		DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("Sound Card State %s.", strValue.GetData());
+		if ('N' != strValue[0]) {
+			DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("Sound Card State %s.", strValue.GetData());
+		}
 	}
 
 	LogEvent(Severity_Middle, LOG_EVT_MOD_SIPPHONE_STARTED_SUCCESS, "sipphone entity started successfully.");
@@ -831,7 +832,7 @@ ErrorCodeEnum CSIPEntity::SaveRestartRunConfig(unsigned int utime)
 		Error = spConfig->WriteConfigValueInt("AutoResart", "time", utime);
 	}
 	else{
-		DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("AutoResart is fail , open sipphone.ini fail!");
+		DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("auto resart failed, open sipphone.ini fail!");
 	}
 
 	return Error;
@@ -912,7 +913,6 @@ ErrorCodeEnum CSIPEntity::__OnStart(ErrorCodeEnum preOperationError)
 	}
 	else {
 		//有配置为空的,进关门页
-		DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("audio config is invalid.");
 		SetSoundCardSysVar(SOUNDCARD_CONFIG_EMPTY);
 		GetFunction()->SetSysVar("AuthErrMsg", "音频配置缺失,请使用硬件配置修改");
 		DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_USER).setLogCode("QLR0402301A3").setResultCode("RTA3101")("音频配置缺失,请使用硬件配置修改");
@@ -1100,7 +1100,6 @@ ErrorCodeEnum CSIPEntity::__OnStart(ErrorCodeEnum preOperationError)
 		CSimpleStringA strValue("");
 		Func->RegistSysVarEvent("UIState", this);
 		Func->GetSysVar("UIState", strValue);
-		DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("UIState %s.", strValue.GetData());
 	}
 
 	{
@@ -1312,23 +1311,23 @@ ErrorCodeEnum CSIPEntity::RvcGetAudioDeviceInfo()
 
 	if (NULL != m_pAudioMgr || !m_bAudioMgrInited) {
 		int icountmic = m_pAudioMgr->audio_get_device_count(true);
-		DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("core audio input device(%d):", icountmic);
+		//DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("core audio input device(%d):", icountmic);
 		int i = 0;
 		for (; i < icountmic; i++) {
 			char strname[MAX_PATH] = { 0 };
 			m_pAudioMgr->audio_get_device_name(strname, MAX_PATH, true, i);
-			DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("%d = %s", i, strname);
+			//DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("%d = %s", i, strname);
 		}
 		if (icountmic < RVC_AUDIO_IN_DEVICE_COUNT) {
 			LogWarn(Severity_Middle, Error_AudioIN, ERROR_MOD_SIP_AUDIO_IN_COUNT, CSimpleString::Format("audio in device count is %d.", icountmic).GetData());
 		}
 
 		int icountspeaker = m_pAudioMgr->audio_get_device_count(false);
-		DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("core audio output device(%d):", icountspeaker);
+		//DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("core audio output device(%d):", icountspeaker);
 		for (i = 0; i < icountspeaker; i++) {
 			char strname[MAX_PATH] = { 0 };
 			m_pAudioMgr->audio_get_device_name(strname, MAX_PATH, false, i);
-			DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("%d = %s", i, strname);
+			//DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("%d = %s", i, strname);
 		}
 		if (icountspeaker < RVC_AUDIO_IN_DEVICE_COUNT) {
 			LogWarn(Severity_Middle, Error_AudioOut, ERROR_MOD_SIP_AUDIO_OUT_COUNT, CSimpleString::Format("audio out device count is %d.", icountspeaker).GetData());
@@ -1340,13 +1339,13 @@ ErrorCodeEnum CSIPEntity::RvcGetAudioDeviceInfo()
 	ErrorCodeEnum Error = Error_Param;
 	if (NULL != m_pAudioMgr) {
 		int icountmic = m_pAudioMgr->audio_get_device_count(true);
-		DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("audio input devices(%d):", icountmic);
+		//DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("audio input devices(%d):", icountmic);
 		int i = 0;
 		CSimpleStringA strJsonIn("");
 		for (; i < icountmic; i++) {
 			char strname[MAX_PATH] = { 0 };
 			m_pAudioMgr->audio_get_device_name(strname, MAX_PATH, true, i);
-			DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("%d = %s", i, strname);
+			//DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("%d = %s", i, strname);
 			strJsonIn += CSimpleStringA::Format("\"%d\":\"%s\",", i, strname);
 		}
 		if (strJsonIn.GetLength() > 0) {
@@ -1359,11 +1358,11 @@ ErrorCodeEnum CSIPEntity::RvcGetAudioDeviceInfo()
 
 		CSimpleStringA strJsonOut("");
 		int icountspeaker = m_pAudioMgr->audio_get_device_count(false);
-		DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("audio output devices(%d):", icountspeaker);
+		//DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("audio output devices(%d):", icountspeaker);
 		for (i = 0; i < icountspeaker; i++) {
 			char strname[MAX_PATH] = { 0 };
 			m_pAudioMgr->audio_get_device_name(strname, MAX_PATH, false, i);
-			DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("%d = %s", i, strname);
+			//DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("%d = %s", i, strname);
 			strJsonOut += CSimpleStringA::Format("\"%d\":\"%s\",", i, strname);
 		}
 		if (strJsonOut.GetLength() > 0) {
@@ -1500,9 +1499,6 @@ void CSIPEntity::HandleCheckAudioDevice(const char* pszValue)
 	CSmartPointer<IEntityFunction> Func = GetFunction();
 	CSimpleStringA strValue("");
 	Func->GetSysVar(SYSVAR_SOUNDCARDSTATE, strValue);
-	DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("Sound Card State is %s.", strValue.GetData());
-	DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("callstate is %s.", pszValue);
-	DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("Pickup Phone State = %s. ",m_iPickupPhoneState ? "off" : "on");
 
 	if ('N' != strValue[0]) {
 		if (pszValue[0] == 'H' && m_iPickupPhoneState == ePickupMicrophoneState_On) {
@@ -2000,8 +1996,6 @@ void CSIPEntity::SwitchHandFree()
 	CSmartPointer<IEntityFunction> Func = GetFunction();
 	CSimpleStringA strValue("");
 	Func->GetSysVar(SYSVAR_SOUNDCARDSTATE, strValue);
-	DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("Sound Card State is %s.", strValue.GetData());
-	DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("m_bMessageBox %s.", m_bMessageBox ? "true" : "false");
 	if ('B' == strValue[0] || 'H' == strValue[0]) {
 		HandleSendBroadcastMsg(true);
 		return;
@@ -2023,8 +2017,6 @@ void CSIPEntity::SwitchPickup()
 	CSmartPointer<IEntityFunction> Func = GetFunction();
 	CSimpleStringA strValue("");
 	Func->GetSysVar(SYSVAR_SOUNDCARDSTATE, strValue);
-	DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("Sound Card State is %s.", strValue.GetData());
-	DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("m_bMessageBox %s.", m_bMessageBox ? "true" : "false");
 	if ('B' == strValue[0] || 'P' == strValue[0]) {
 		HandleSendBroadcastMsg(false);
 		return;
@@ -2477,7 +2469,6 @@ int CSIPEntity::StartCameraRender(int icamid, int ivideoview_x, int ivideoview_y
 	m_stVideoParam.bShowPersonArea = 0;
 
 	if (Error_Succeed == rvc_start_video_render(m_render, false, &t_render_callback)) {
-		DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("start video render success.");
 		m_bIsCameraRender = true;
 	}
 
@@ -2491,12 +2482,11 @@ int CSIPEntity::StopCameraRender()
 	int iRet = -1;
 
 	if (NULL == m_render) {
-		DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("stop video render for render is null.");
 		return iRet;
 	}
 
-	if (Error_Succeed == rvc_stop_video_render(m_render)) {
-		DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("stop video render success.");
+	if (Error_Succeed != rvc_stop_video_render(m_render)) {
+		DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("stop video render failed.");
 	}
 	if (NULL!= m_render->plocal_render) {
 		DestroyVideoRenderObj(m_render->plocal_render);
@@ -2579,8 +2569,9 @@ void CSIPPhoneSession::Handle_MakeCall( SpReqAnsContext<PhoneService_MakeCall_Re
 		CSmartPointer<IEntityFunction> Func = m_pEntity->GetFunction();
 		CSimpleStringA strValue("");
 		Func->GetSysVar(SYSVAR_SOUNDCARDSTATE, strValue);
-		DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("Sound Card State %s.", strValue.GetData());
+		
 		if ('N' != strValue[0]) {
+			DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("Sound Card State %s.", strValue.GetData());
 			if ('H' == strValue[0]) {
 				m_pEntity->m_iPickupPhoneState = ePickupMicrophoneState_On;
 			}
@@ -2968,7 +2959,7 @@ void CSIPPhoneSession::on_call_state(int state, const char *state_desc, const ch
 		m_spCallbackContext->SendMessage(Info);
 	}
 
-	if (state == TERMINATED) 
+	if (state == e_call_state::TERMINATED)
 	{
 		if (NULL != m_pCall){
 			endpoint_call_destroy(m_pCall);
@@ -3209,8 +3200,8 @@ int CSIPPhoneSession::start_video_render(rvc_video_render_params_t* render_param
 	memcpy(&m_pEntity->m_render->cb, &t_window_type_callback, sizeof(rvc_video_render_window_type_callback_t));
 	m_pEntity->m_stVideoParam.bShowPersonArea = 0;
 
-	if (Error_Succeed == rvc_start_video_render(m_pEntity->m_render, bremote, &t_render_callback)) {
-		DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("start video render success.");
+	if (Error_Succeed != rvc_start_video_render(m_pEntity->m_render, bremote, &t_render_callback)) {
+		DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("start video render failed!");
 	}
 
 	return 0;
@@ -3218,8 +3209,8 @@ int CSIPPhoneSession::start_video_render(rvc_video_render_params_t* render_param
 
 int CSIPPhoneSession::stop_video_render()
 {
-	if (Error_Succeed == rvc_stop_video_render(m_pEntity->m_render)) {
-		DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("stop video render success.");
+	if (Error_Succeed != rvc_stop_video_render(m_pEntity->m_render)) {
+		DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("stop video render failed.");
 	}
 	DestroyVideoRenderObj(m_pEntity->m_render->plocal_render);
 	DestroyVideoRenderObj(m_pEntity->m_render->premote_render);

+ 2 - 5
Other/libaudiomgr/linux/libaudiomgr_linux.cpp

@@ -1197,7 +1197,7 @@ void* pulse_read_audio(void* data)
 	r = pa_stream_connect_record(recordstream, dev, &bufattr, (pa_stream_flags_t)pastream_flag);
 	if (r < 0)
 	{
-		audio_mgr->audiolog("AUDIO: (pulse audio) skip latency adjustment");
+		//audio_mgr->audiolog("AUDIO: (pulse audio) skip latency adjustment");
 		/*
 		 * Old pulse audio servers don't like the ADJUST_LATENCY flag,
 		 * so retry without that
@@ -1226,7 +1226,7 @@ void* pulse_read_audio(void* data)
 		pa_mainloop_iterate(pa_ml, 1, NULL);
 	}
 	pa_stream_set_read_callback(recordstream, NULL, NULL);
-	audio_mgr->audiolog("AUDIO: (pulse audio) stream terminated(%i)", audio_ctx->stream_flag);
+	//audio_mgr->audiolog("AUDIO: (pulse audio) stream terminated(%i)", audio_ctx->stream_flag);
 
 	pa_stream_disconnect(recordstream);
 	pa_stream_unref(recordstream);
@@ -1328,9 +1328,6 @@ int AudioMgrImpl::start_audio_capture()
 		m_audio_context->stream_flag = AUDIO_STRM_OFF;
 		return (-1);
 	}
-	else {
-		audiolog("AUDIO: (pulse audio) read thread creation success, and thread id is %u.", m_readthread);
-	}
 
 	return 0;
 }

+ 7 - 14
Other/libaudions/libaudions.cpp

@@ -17,11 +17,11 @@
 AudioNsImpl::AudioNsImpl(audions_callback_t* pCallback)
 {
 	memcpy(&m_nscallback, pCallback, sizeof(audions_callback_t));
-	NsLog("AudioNsImpl construction.");
 	
 	m_NsHandle = NULL;
-	if (0 == WebRtcNs_Create(&m_NsHandle)){
-		NsLog("AudioNsImpl success.");
+	if (0 != WebRtcNs_Create(&m_NsHandle)){
+		NsLog("AudioNsImpl failed!");
+		return;
 	}
 	m_audio_sample_rate = 16000;
 	m_audio_capture_peroid = 20;
@@ -30,12 +30,8 @@ AudioNsImpl::AudioNsImpl(audions_callback_t* pCallback)
 
 AudioNsImpl::~AudioNsImpl()
 {
-	NsLog("AudioNsImpl Deconstruction.");
 	if (NULL != m_NsHandle){
-		int iRet = WebRtcNs_Free(m_NsHandle);
-		if (0 == iRet){
-			NsLog("WebRtcNs Free success.");
-		}
+		WebRtcNs_Free(m_NsHandle);
 	}
 }
 
@@ -48,17 +44,14 @@ int AudioNsImpl::SetNsParams(uint32_t uSampleRate, uint32_t uAudioCapturePeroid,
 
 	if (0 == WebRtcNs_Init(m_NsHandle, uSampleRate)){
 		iRet = WebRtcNs_set_policy(m_NsHandle, iMode);
-		if (0 == iRet){
-			NsLog("WebRtcNs init and set policy success.");
-		}
-		else{
+		if (0 != iRet){
 			NsLog("WebRtcNs set policy failed.");
 		}
 	}
 	else{
 		NsLog("WebRtcNs Init failed.");
 	}
-	NsLog("audio sample rate is %d, audio frame time is %dms, noise suppression policy is %d.",m_audio_sample_rate, m_audio_capture_peroid, m_ns_policy);
+	//NsLog("audio sample rate is %d, audio frame time is %dms, noise suppression policy is %d.",m_audio_sample_rate, m_audio_capture_peroid, m_ns_policy);
 
 	return iRet;
 }
@@ -233,6 +226,6 @@ void AudioNsImpl::NsLog(const char* fmt, ...)
 
 void AudioNsImpl::ReleaseObj()
 {
-	NsLog("AudioNsImpl ReleaseObj.");
+	//NsLog("AudioNsImpl ReleaseObj.");
 	delete this;
 }

+ 2 - 2
Other/libaudions/webrtc_ns/src/noise_suppression.c

@@ -22,10 +22,10 @@ int WebRtcNs_Create(NsHandle** NS_inst) {
   if (*NS_inst != NULL) {
     (*(NSinst_t**)NS_inst)->initFlag = 0;
     return 0;
-  } else {
+  } 
+  else {
     return -1;
   }
-
 }
 
 int WebRtcNs_Free(NsHandle* NS_inst) {

+ 0 - 2
Other/unix/libaudioframework/audiobridge.c

@@ -154,9 +154,7 @@ apr_status_t audiobridge_create(apr_pool_t *pool, audioengine_t *engine, audiobr
 	bridge->leg_stream[0] = NULL;
 	bridge->leg_stream[1] = NULL;
 	bridge->rec_stream = NULL;
-	audio_log_v(AUDIO_LOG_LEVEL_INFO, "%s : %d", __FUNCTION__, __LINE__);
 	audiodriver_init(engine, &g_driver_vtbl, &bridge->base);
-	audio_log_v(AUDIO_LOG_LEVEL_INFO, "%s : %d", __FUNCTION__, __LINE__);
 
 	*p_bridge = bridge;
 

+ 50 - 75
Other/unix/libaudioframework/audiomicspkpulse.c

@@ -109,22 +109,22 @@ static void pa_state_cb(pa_context* c, void* data)
 	{
 		// These are just here for reference
 	case PA_CONTEXT_UNCONNECTED:
-		audio_log_v(AUDIO_LOG_LEVEL_INFO, "unconnected");
+		//audio_log_v(AUDIO_LOG_LEVEL_INFO, "unconnected");
 		break;
 	case PA_CONTEXT_CONNECTING:
 	case PA_CONTEXT_AUTHORIZING:
 	case PA_CONTEXT_SETTING_NAME:
 	default:
-		audio_log_v(AUDIO_LOG_LEVEL_INFO, "no state");
+		//audio_log_v(AUDIO_LOG_LEVEL_INFO, "no state");
 		break;
 	case PA_CONTEXT_FAILED:
 	case PA_CONTEXT_TERMINATED:
 		*pa_ready = 2;
-		audio_log_v(AUDIO_LOG_LEVEL_INFO, "failed");
+		//audio_log_v(AUDIO_LOG_LEVEL_INFO, "failed");
 		break;
 	case PA_CONTEXT_READY:
 		*pa_ready = 1;
-		audio_log_v(AUDIO_LOG_LEVEL_INFO, "ready");
+		//audio_log_v(AUDIO_LOG_LEVEL_INFO, "ready");
 		break;
 	}
 }
@@ -370,7 +370,7 @@ apr_status_t audio_context_create(apr_pool_t* pool, audio_context_t** audio_ctx)
 	audio_context_t* actx = (audio_context_t*)apr_pcalloc(pool, sizeof(audio_context_t));
 
 	if (NULL == actx) {
-		audio_log_v(AUDIO_LOG_LEVEL_INFO, "%s:%d couldn't apr_pcalloc audio context.", __FUNCTION__, __LINE__);
+		audio_log_v(AUDIO_LOG_LEVEL_INFO, "couldn't apr_pcalloc audio context.");
 		return APR_EGENERAL;
 	}
 
@@ -381,10 +381,7 @@ apr_status_t audio_context_create(apr_pool_t* pool, audio_context_t** audio_ctx)
 	actx->uaudio_inlen = 0;
 
 	if (audio_init_pulseaudio(actx)) {
-		audio_log_v(AUDIO_LOG_LEVEL_ERROR, "%s:%d audio init pulse audio failed.", __FUNCTION__, __LINE__);
-	}
-	else{
-		audio_log_v(AUDIO_LOG_LEVEL_INFO, "%s:%d audio init pulse audio success.", __FUNCTION__, __LINE__);
+		audio_log_v(AUDIO_LOG_LEVEL_ERROR, "audio init pulse audio failed.");
 	}
 
 	*audio_ctx = actx;
@@ -497,14 +494,14 @@ static void  stream_write_request_cb(pa_stream* s, size_t length, void* data)
 				audio_ctx->uaudio_len = ileft;
 			}
 			else {
-				audio_log_v(AUDIO_LOG_LEVEL_INFO, "%s:%d pa_stream_begin_write nbytes(%d) > max buffer length.", __FUNCTION__, __LINE__, nbytes);
+				audio_log_v(AUDIO_LOG_LEVEL_INFO, "pa_stream_begin_write nbytes(%d) > max buffer length.", nbytes);
 				memcpy(audiodata, audio_ctx->paudio_buffer, audio_ctx->uaudio_len);
 				nbytes = audio_ctx->uaudio_len;
 				audio_ctx->uaudio_len = 0;
 			}
 
 			if (PA_OK != pa_stream_write(s, audiodata, nbytes, NULL, 0, PA_SEEK_RELATIVE)) {
-				audio_log_v(AUDIO_LOG_LEVEL_INFO, "%s:%d pa_stream_write failed.", __FUNCTION__, __LINE__);
+				audio_log_v(AUDIO_LOG_LEVEL_INFO, "pa_stream_write failed.");
 				break;
 			}
 			//else {
@@ -512,7 +509,7 @@ static void  stream_write_request_cb(pa_stream* s, size_t length, void* data)
 			//}
 		}
 		else {
-			audio_log_v(AUDIO_LOG_LEVEL_INFO, "%s:%d pa_stream_begin_write failed for %s.", __FUNCTION__, __LINE__, pa_strerror(pa_context_errno(audio_ctx)));
+			audio_log_v(AUDIO_LOG_LEVEL_INFO, "pa_stream_begin_write failed for %s.", pa_strerror(pa_context_errno(audio_ctx)));
 		}
 	}
 }
@@ -689,11 +686,11 @@ void* pulse_read_audio(void* data)
 
 	dev = audio_ctx->list_input_devices[audio_ctx->device].name;
 	
-	audio_log_v(AUDIO_LOG_LEVEL_INFO,"pulse audio connecting to device %s (channels %d rate %d)",dev, ss.channels, ss.rate);
+	//audio_log_v(AUDIO_LOG_LEVEL_INFO,"pulse audio connecting to device %s (channels %d rate %d)",dev, ss.channels, ss.rate);
 
 	r = pa_stream_connect_record(recordstream, dev, &bufattr, (pa_stream_flags_t)pastream_flag);
 	if (r < 0){
-		audio_log_v(AUDIO_LOG_LEVEL_INFO, "AUDIO: (pulse audio) skip latency adjustment");
+		//audio_log_v(AUDIO_LOG_LEVEL_INFO, "AUDIO: (pulse audio) skip latency adjustment");
 		/*
 		 * Old pulse audio servers don't like the ADJUST_LATENCY flag,
 		 * so retry without that
@@ -721,7 +718,7 @@ void* pulse_read_audio(void* data)
 
 	usleep(10000);
 	pa_stream_set_read_callback(recordstream, NULL, NULL);
-	audio_log_v(AUDIO_LOG_LEVEL_INFO, "AUDIO: pulse audio stream terminated(%i)", audio_ctx->stream_flag);
+	//audio_log_v(AUDIO_LOG_LEVEL_INFO, "AUDIO: pulse audio stream terminated(%i)", audio_ctx->stream_flag);
 
 	pa_stream_disconnect(recordstream);
 	pa_stream_unref(recordstream);
@@ -744,9 +741,6 @@ int audio_start_pulseaudio(audio_context_t* audio_ctx)
 		audio_ctx->stream_flag = AUDIO_STRM_OFF;
 		return (-1);
 	}
-	else {
-		audio_log_v(AUDIO_LOG_LEVEL_INFO, "AUDIO: (pulse audio) read thread create success, and thread id is %u.", audio_ctx->readthreadid);
-	}
 
 	return 0;
 }
@@ -818,7 +812,7 @@ void* pulse_write_audio(void* data)
 		audio_log_v(AUDIO_LOG_LEVEL_INFO, "play audio pa_stream_new failed (chan:%d rate:%d) for %d.", ss.channels, ss.rate, pa_context_errno(play_pa_ctx));
 	}
 
-	audio_log_v(AUDIO_LOG_LEVEL_INFO, "play audio stream state is %d.", pa_stream_get_state(playstream));
+	//audio_log_v(AUDIO_LOG_LEVEL_INFO, "play audio stream state is %d.", pa_stream_get_state(playstream));
 	/* define the callbacks */
 	pa_stream_set_write_callback(playstream, stream_write_request_cb, (void*)audio_ctx);
 
@@ -844,20 +838,19 @@ void* pulse_write_audio(void* data)
 
 	dev = audio_ctx->list_output_devices[audio_ctx->play_device].name;
 
-	audio_log_v(AUDIO_LOG_LEVEL_INFO, "play audio connecting to device %s (channels %d rate %d buf frag size %d buf length %d)", dev, ss.channels, ss.rate, bufattr.fragsize, bufattr.tlength);
+	//audio_log_v(AUDIO_LOG_LEVEL_INFO, "play audio connecting to device %s (channels %d rate %d buf frag size %d buf length %d)", dev, ss.channels, ss.rate, bufattr.fragsize, bufattr.tlength);
 
 	// Connect the stream to a sink
 	r = pa_stream_connect_playback(playstream, dev, &bufattr, (pa_stream_flags_t)pastream_flag, NULL, NULL);
-	if (PA_OK != r)
-	{
+	if (PA_OK != r){
 		audio_log_v(AUDIO_LOG_LEVEL_INFO, "play stream connected failed for %d.", pa_context_errno(play_pa_ctx));
 		finish(play_pa_ctx, pa_ml);
 		return ((void*)-1);
 	}
 	else {
-		audio_log_v(AUDIO_LOG_LEVEL_INFO, "play stream connected.");
+		//audio_log_v(AUDIO_LOG_LEVEL_INFO, "play stream connected.");
 		const pa_sample_spec* spec = pa_stream_get_sample_spec(playstream);
-		audio_log_v(AUDIO_LOG_LEVEL_INFO, "play stream spec->format = %d, spec->channels = %d, spec->rate = %d.", spec->format, spec->channels, spec->rate);
+		//audio_log_v(AUDIO_LOG_LEVEL_INFO, "play stream spec->format = %d, spec->channels = %d, spec->rate = %d.", spec->format, spec->channels, spec->rate);
 	}
 
 	get_play_latency(playstream);
@@ -874,7 +867,7 @@ void* pulse_write_audio(void* data)
 
 	usleep(10000);
 	pa_stream_set_write_callback(playstream, NULL, NULL);
-	audio_log_v(AUDIO_LOG_LEVEL_INFO, "AUDIO: play audio stream terminated(%i)", audio_ctx->play_stream_flag);
+	//audio_log_v(AUDIO_LOG_LEVEL_INFO, "AUDIO: play audio stream terminated(%i)", audio_ctx->play_stream_flag);
 
 	pa_stream_disconnect(playstream);
 	pa_stream_unref(playstream);
@@ -897,9 +890,6 @@ int audio_start_audioplay(audio_context_t* audio_ctx)
 		audio_ctx->play_stream_flag = AUDIO_STRM_OFF;
 		return -1;
 	}
-	else {
-		audio_log_v(AUDIO_LOG_LEVEL_INFO, "AUDIO: (pulse audio) write thread create success, and thread id is %u.", audio_ctx->writethreadid);
-	}
 
 	return 0;
 }
@@ -910,11 +900,11 @@ int audio_stop_playaudio(audio_context_t* audio_ctx)
 	/*assertions*/
 	assert(audio_ctx != NULL);
 	if (AUDIO_STRM_ON == audio_ctx->play_stream_flag){
-		audio_log_v(AUDIO_LOG_LEVEL_INFO, "%s:%d set play_stream_flag to off.", __FUNCTION__, __LINE__);
+		//audio_log_v(AUDIO_LOG_LEVEL_INFO, "%s:%d set play_stream_flag to off.", __FUNCTION__, __LINE__);
 		audio_ctx->play_stream_flag = AUDIO_STRM_OFF;
 		if (0 != audio_ctx->writethreadid) {
 			if (0 == pthread_join(audio_ctx->writethreadid, NULL)) {
-				audio_log_v(AUDIO_LOG_LEVEL_INFO, "%s:%d pulse audio write thread %u joined success.", __FUNCTION__, __LINE__, audio_ctx->writethreadid);
+				//audio_log_v(AUDIO_LOG_LEVEL_INFO, "%s:%d pulse audio write thread %u joined success.", __FUNCTION__, __LINE__, audio_ctx->writethreadid);
 				audio_ctx->writethreadid = 0;
 			}
 			else {
@@ -922,9 +912,6 @@ int audio_stop_playaudio(audio_context_t* audio_ctx)
 			}
 		}
 	}
-	else {
-		audio_log_v(AUDIO_LOG_LEVEL_INFO, "%s:%d audio play stream flag is alreay off.", __FUNCTION__, __LINE__);
-	}
 
 	return 0;
 }
@@ -937,7 +924,7 @@ int audio_stop_pulseaudio(audio_context_t* audio_ctx)
 		audio_ctx->stream_flag = AUDIO_STRM_OFF;
 		if (0 != audio_ctx->readthreadid){
 			if (0 == pthread_join(audio_ctx->readthreadid, NULL)) {
-				audio_log_v(AUDIO_LOG_LEVEL_INFO, "%s:%d pulse audio read thread %u joined success.", __FUNCTION__, __LINE__, audio_ctx->readthreadid);
+				//audio_log_v(AUDIO_LOG_LEVEL_INFO, "%s:%d pulse audio read thread %u joined success.", __FUNCTION__, __LINE__, audio_ctx->readthreadid);
 				audio_ctx->readthreadid = 0;
 			}
 			else {
@@ -945,9 +932,6 @@ int audio_stop_pulseaudio(audio_context_t* audio_ctx)
 			}
 		}
 	}
-	else {
-		audio_log_v(AUDIO_LOG_LEVEL_INFO, "%s:%d audio read stream flag is alreay off.", __FUNCTION__, __LINE__);
-	}
 
 	return 0;
 }
@@ -1081,7 +1065,7 @@ static int initialize_speaker(audiomicspkpulse_t* micspk)
 	audio_set_playformat(micspk->audio_ctx, PA_SAMPLE_S16LE);
 
 	if (0 == audio_start_audioplay(micspk->audio_ctx)) {
-		audio_log_v(AUDIO_LOG_LEVEL_INFO, "audio speaker create success, audio output device start play audio success!");
+		//audio_log_v(AUDIO_LOG_LEVEL_INFO, "audio speaker create success, audio output device start play audio success!");
 		iret = 0;
 	}
 	else {
@@ -1092,7 +1076,6 @@ static int initialize_speaker(audiomicspkpulse_t* micspk)
 }
 
 
-
 static int initialize_micro(audiomicspkpulse_t* micspk)
 {
 	int iret = -1;
@@ -1110,7 +1093,7 @@ static int initialize_micro(audiomicspkpulse_t* micspk)
 	audio_set_capformat(micspk->audio_ctx, PA_SAMPLE_S16LE);
 
 	if (0 == audio_start_pulseaudio(micspk->audio_ctx)) {
-		audio_log_v(AUDIO_LOG_LEVEL_INFO, "audio micro create success, audio input device start pulse audio success!");
+		//audio_log_v(AUDIO_LOG_LEVEL_INFO, "audio micro create success, audio input device start pulse audio success!");
 		iret = 0;
 	}
 	else {
@@ -1132,8 +1115,6 @@ static void uninitialize_speaker(audiomicspkpulse_t* micspk)
 		delay_buf_destroy((delay_buf*)micspk->ply_dbuf);
 		micspk->ply_dbuf = NULL;
 	}
-
-	audio_log_v(AUDIO_LOG_LEVEL_INFO, "uninitialize_speaker success!");
 }
 
 
@@ -1149,7 +1130,6 @@ static void uninitialize_micro(audiomicspkpulse_t* micspk)
 		delay_buf_destroy((delay_buf*)micspk->rec_dbuf);
 		micspk->rec_dbuf = NULL;
 	}
-	audio_log_v(AUDIO_LOG_LEVEL_INFO, "uninitialize_micro success!");
 }
 
 
@@ -1164,8 +1144,8 @@ void* APR_THREAD_FUNC* audiowork_proc(apr_thread_t* threadhandle, void* param)
 	// play   <---> play
 	// record and play <---> record and play
 	//
-	audio_log_v(AUDIO_LOG_LEVEL_INFO, "%s:%d micspk addr is 0x%08x, current sem addr is 0x%08x.started flag is %s.", __FUNCTION__, __LINE__, param, micspk->audio_device_started_sem, micspk->baudio_device_started_flag ? "true" : "false");
-	audio_log_v(AUDIO_LOG_LEVEL_INFO, "%s:%d micspk->opt = %d.", __FUNCTION__, __LINE__, micspk->opt);
+	//audio_log_v(AUDIO_LOG_LEVEL_INFO, "%s:%d micspk addr is 0x%08x, current sem addr is 0x%08x.started flag is %s.", __FUNCTION__, __LINE__, param, micspk->audio_device_started_sem, micspk->baudio_device_started_flag ? "true" : "false");
+	//audio_log_v(AUDIO_LOG_LEVEL_INFO, "%s:%d micspk->opt = %d.", __FUNCTION__, __LINE__, micspk->opt);
 
 	if (micspk->opt & AMS_OPT_RECPLAY) {
 		rc = initialize_speaker(micspk);
@@ -1173,10 +1153,9 @@ void* APR_THREAD_FUNC* audiowork_proc(apr_thread_t* threadhandle, void* param)
 			micspk->on_audio_device_event(true, -1, false, micspk->dev_type, "recplay mode initialize speaker louder param failed, goto error.", micspk);
 			goto on_error;
 		}
-		else {
-			
-			micspk->on_audio_device_event(true, 0, false, micspk->dev_type, "recplay mode initialize speaker louder param success!", micspk);
-		}
+		//else {
+		//	micspk->on_audio_device_event(true, 0, false, micspk->dev_type, "recplay mode initialize speaker louder param success!", micspk);
+		//}
 
 		usleep(100 * 1000); // play before record
 		rc = initialize_micro(micspk);
@@ -1184,9 +1163,9 @@ void* APR_THREAD_FUNC* audiowork_proc(apr_thread_t* threadhandle, void* param)
 			micspk->on_audio_device_event(true, -1, true, micspk->dev_type, "recplay mode initialize micro capture param failed, goto error.", micspk);
 			goto on_error;
 		}
-		else {
-			micspk->on_audio_device_event(true, 0, true, micspk->dev_type, "recplay mode initialize micro capture param success!", micspk);
-		}
+		//else {
+		//	micspk->on_audio_device_event(true, 0, true, micspk->dev_type, "recplay mode initialize micro capture param success!", micspk);
+		//}
 	}
 	else if (micspk->opt & AMS_OPT_PLAY) {
 		rc = initialize_speaker(micspk);
@@ -1194,9 +1173,9 @@ void* APR_THREAD_FUNC* audiowork_proc(apr_thread_t* threadhandle, void* param)
 			micspk->on_audio_device_event(true, -1, false, micspk->dev_type, "play mode initialize speaker louder param failed, goto error!", micspk);
 			goto on_error;
 		}
-		else {
-			micspk->on_audio_device_event(true, 0, false, micspk->dev_type, "play mode initialize speaker louder param success!", micspk);
-		}
+		//else {
+		//	micspk->on_audio_device_event(true, 0, false, micspk->dev_type, "play mode initialize speaker louder param success!", micspk);
+		//}
 	}
 	else if (micspk->opt & AMS_OPT_RECORD)
 	{
@@ -1205,33 +1184,33 @@ void* APR_THREAD_FUNC* audiowork_proc(apr_thread_t* threadhandle, void* param)
 			micspk->on_audio_device_event(true, -1, true, micspk->dev_type, "record mode initialize micro capture param failed, goto error!", micspk);
 			goto on_error;
 		}
-		else {
-			micspk->on_audio_device_event(true, 0, true, micspk->dev_type, "record mode initialize micro capture param success!", micspk);
-		}
+		//else {
+		//	micspk->on_audio_device_event(true, 0, true, micspk->dev_type, "record mode initialize micro capture param success!", micspk);
+		//}
 	}
 
 	micspk->baudio_device_started_flag = true;
-	audio_log_v(AUDIO_LOG_LEVEL_INFO, "%s:%d micspk addr is 0x%08x, current sem addr is 0x%08x.", __FUNCTION__, __LINE__, micspk, micspk->audio_device_started_sem);
+	//audio_log_v(AUDIO_LOG_LEVEL_INFO, "%s:%d micspk addr is 0x%08x, current sem addr is 0x%08x.", __FUNCTION__, __LINE__, micspk, micspk->audio_device_started_sem);
 
 	sem_wait(micspk->audio_device_started_sem);
-	audio_log_v(AUDIO_LOG_LEVEL_INFO, "%s:%d after post audio_device_started_sem.", __FUNCTION__, __LINE__);
+	//audio_log_v(AUDIO_LOG_LEVEL_INFO, "%s:%d after post audio_device_started_sem.", __FUNCTION__, __LINE__);
 
 on_error:
 	if (micspk->opt & AMS_OPT_RECPLAY) {
 		uninitialize_micro(micspk);
-		micspk->on_audio_device_event(false, 0, true, micspk->dev_type, "recplay mode uninitialize micro!", micspk);
+		//micspk->on_audio_device_event(false, 0, true, micspk->dev_type, "recplay mode uninitialize micro!", micspk);
 		uninitialize_speaker(micspk);
-		micspk->on_audio_device_event(false, 0, false, micspk->dev_type, "recplay mode uninitialize speaker!", micspk);
+		//micspk->on_audio_device_event(false, 0, false, micspk->dev_type, "recplay mode uninitialize speaker!", micspk);
 	}
 	else if (micspk->opt & AMS_OPT_PLAY) {
 		uninitialize_speaker(micspk);
-		micspk->on_audio_device_event(false, 0, false, micspk->dev_type, "play mode uninitialize speaker!", micspk);
+		//micspk->on_audio_device_event(false, 0, false, micspk->dev_type, "play mode uninitialize speaker!", micspk);
 	}
 	else if (micspk->opt & AMS_OPT_RECORD){
 		uninitialize_micro(micspk);
-		micspk->on_audio_device_event(false, 0, true, micspk->dev_type, "record mode uninitialize micro!", micspk);
+		//micspk->on_audio_device_event(false, 0, true, micspk->dev_type, "record mode uninitialize micro!", micspk);
 	}
-	audio_log_v(AUDIO_LOG_LEVEL_INFO, "audiowork_proc exit.");
+	//audio_log_v(AUDIO_LOG_LEVEL_INFO, "audiowork_proc exit.");
 
 	return 0;
 }
@@ -1265,12 +1244,9 @@ apr_status_t audiomicspkpulse_create(apr_pool_t* pool,
 	micspk->dev_type = idev_type;
 
 	if (-1 == micspk->rec_dev_id || -1 == micspk->ply_dev_id) {
-		audio_log_v(AUDIO_LOG_LEVEL_INFO, "%s:%d, get device id failed!", __FUNCTION__, __LINE__);
+		audio_log_v(AUDIO_LOG_LEVEL_INFO, "get device id failed!");
 		return APR_EGENERAL;
 	}
-	else {
-		audio_log_v(AUDIO_LOG_LEVEL_INFO, "%s:%d, rec_dev_id is %d, ply_dev_id is %d.", __FUNCTION__, __LINE__, micspk->rec_dev_id, micspk->ply_dev_id);
-	}
 
 	play_frame_samples = FRAME_TIME * clock / 1000;
 	capture_frame_samples = FRAME_TIME * CAPTURE_AUDIO_CLOCK / 1000;
@@ -1297,12 +1273,12 @@ apr_status_t audiomicspkpulse_create(apr_pool_t* pool,
 
 	micspk->baudio_device_started_flag = false;
 	sem_init(micspk->audio_device_started_sem, 0, 0);
-	audio_log_v(AUDIO_LOG_LEVEL_INFO, "%s:%d micspk addr is 0x%08x, current sem addr is 0x%08x.", __FUNCTION__, __LINE__, micspk, micspk->audio_device_started_sem);
+	//audio_log_v(AUDIO_LOG_LEVEL_INFO, "%s:%d micspk addr is 0x%08x, current sem addr is 0x%08x.", __FUNCTION__, __LINE__, micspk, micspk->audio_device_started_sem);
 
 	apr_status_t err = apr_thread_create(&micspk->audio_work_thread, NULL, &audiowork_proc, micspk, pool);
 	if (APR_SUCCESS == err) {
 		bool baudio_work_thread_exit = false;
-		audio_log_v(AUDIO_LOG_LEVEL_INFO, "%s:%d audio_work_thread id is %u.", __FUNCTION__, __LINE__, micspk->audio_work_thread);
+		//audio_log_v(AUDIO_LOG_LEVEL_INFO, "%s:%d audio_work_thread id is %u.", __FUNCTION__, __LINE__, micspk->audio_work_thread);
 
 		do {
 			struct timespec ts;
@@ -1316,20 +1292,20 @@ apr_status_t audiomicspkpulse_create(apr_pool_t* pool,
 			if (-1 == sem_timedwait(micspk->audio_device_started_sem, &ts)) {
 				if (ETIMEDOUT == errno) {
 					if (micspk->baudio_device_started_flag) {
-						audio_log_v(AUDIO_LOG_LEVEL_INFO, "%s:%d audio device is already started.", __FUNCTION__, __LINE__);
+						//audio_log_v(AUDIO_LOG_LEVEL_INFO, "%s:%d audio device is already started.", __FUNCTION__, __LINE__);
 						break;
 					}
 				}
 			}
 			else {
-				audio_log_v(AUDIO_LOG_LEVEL_INFO, "%s:%d audio device work thread has exit.", __FUNCTION__, __LINE__);
+				//audio_log_v(AUDIO_LOG_LEVEL_INFO, "%s:%d audio device work thread has exit.", __FUNCTION__, __LINE__);
 				baudio_work_thread_exit = true;
 			}
 		} while (!baudio_work_thread_exit);
 
 		if (baudio_work_thread_exit) {
 			audiomicspkpulse_destroy(micspk);
-			audio_log_v(AUDIO_LOG_LEVEL_INFO, "audio work thread has exit, audiomicspk_destroy success!");
+			//audio_log_v(AUDIO_LOG_LEVEL_INFO, "audio work thread has exit, audiomicspk_destroy success!");
 			return APR_EGENERAL;
 		}
 	}
@@ -1356,7 +1332,6 @@ void audiomicspkpulse_destroy(audiomicspkpulse_t* micspk)
 		audio_close_pulseaudio(micspk->audio_ctx);
 	}
 
-	audio_log_v(AUDIO_LOG_LEVEL_INFO, "%s:%d sem post audio_device_started_sem.", __FUNCTION__, __LINE__);
 	sem_post(micspk->audio_device_started_sem);
 
 	if (NULL != micspk->audio_work_thread){