浏览代码

Z991239-5647 #comment 优化音频设备故障时,坐席端进行音频切换存在无提示问题

80274480 1 年之前
父节点
当前提交
c760085a10

+ 2 - 0
Module/mod_counterconnector/ConnectorFSM.h

@@ -828,9 +828,11 @@ private:
 	int LogFailedWarns(int iFailedCode, const char* strmsg);
 
 public:
+	//话机的物理状态
 	bool m_bHandFree;
 	//坐席控制话筒的当前状态
 	bool m_bAgentHandFree;
+	//是否处于接通坐席状态
 	bool m_bIsAgentControl;
 	//流程拨号,带技能号
 	CSimpleStringA m_strHintCallNum;

+ 7 - 1
Module/mod_counterconnector/mod_counterconnector.cpp

@@ -676,7 +676,7 @@ void CCounterConnectorEntity ::OnReceivePkt(int type, int sub_type, const char *
 			}
 			else
 			{
-				DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("agent want change audio device to pickup,but the device is pickup now");
+				DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("agent want change audio device to pickup,but the device is pickup now");
 			}
 			SendCurAudioDevice();
 			break;
@@ -894,9 +894,15 @@ void CCounterConnectorEntity ::SendCurAudioDevice()
 
 	if ('H' == strValue[0]) {
 		nDevice = 1;
+		if (m_fsm.m_bIsAgentControl){
+			m_fsm.m_bAgentHandFree = false;
+		}
 	}
 	else if('P' == strValue[0]){
 		nDevice = 0;
+		if (m_fsm.m_bIsAgentControl) {
+			m_fsm.m_bAgentHandFree = true;
+		}
 	}
 
 	buf & nDevice;

+ 0 - 3
Module/mod_mediacontroller/mod_mediacontroller.cpp

@@ -1992,9 +1992,6 @@ void MediaServiceSession::Handle_StartSpeakerRender(SpOnewayCallContext<MediaSer
 void MediaServiceSession::Handle_StopSpeakerRender(SpOnewayCallContext<MediaService_StopSpeakerRender_Info>::Pointer ctx)
 {
 	DbgToBeidou(ctx->link, __FUNCTION__)();
-	//if (true == m_pEntity->m_bHasStartSpeakerRender){
-	//	m_pEntity->StopSpeakerAudioRender();
-	//} 
 }
 
 void MediaServiceSession::Handle_ManipulateMediaDevice(SpReqAnsContext<MediaService_ManipulateMediaDevice_Req, MediaService_ManipulateMediaDevice_Ans>::Pointer ctx)

+ 2 - 2
Module/mod_sipphone/audio_session.cpp

@@ -833,13 +833,13 @@ static void __audionslog(void* user_data, const char* fmt, va_list 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);
+		DbgWithLink(LOG_LEVEL_DEBUG, 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);
+		DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("%s", strlog);
 	}
 }
 

+ 11 - 9
Module/mod_sipphone/video_render.cpp

@@ -118,15 +118,17 @@ static int get_local_video_frame(video_frame** frame, int itype, Clibvideoqueue*
 
 int rvc_remote_video_render(rvc_video_render_t* prender, void* videoframe)
 {
-	if (NULL != prender->premote_render) {
-		video_frame* echoframe = NULL;
-		if (0 == translate_image_resolution(&echoframe, prender->render_param.iremote_view_cx, prender->render_param.iremote_view_cy, (const video_frame*)videoframe)) {
-			prender->premote_render->RenderVideoFrame(echoframe, RVC_FLIP_VERTICAL);
-			video_frame_delete(echoframe);
-			echoframe = NULL;
-		}
-		else {
-			prender->premote_render->RenderVideoFrame((video_frame*)videoframe, RVC_FLIP_VERTICAL);
+	if (NULL != prender && NULL != videoframe) {
+		if (NULL != prender->premote_render) {
+			video_frame* echoframe = NULL;
+			if (0 == translate_image_resolution(&echoframe, prender->render_param.iremote_view_cx, prender->render_param.iremote_view_cy, (const video_frame*)videoframe)) {
+				prender->premote_render->RenderVideoFrame(echoframe, RVC_FLIP_VERTICAL);
+				video_frame_delete(echoframe);
+				echoframe = NULL;
+			}
+			else {
+				prender->premote_render->RenderVideoFrame((video_frame*)videoframe, RVC_FLIP_VERTICAL);
+			}
 		}
 	}