Browse Source

Z991239-1812 #comment other 注释SefeDelete接口调用

陈礼鹏80274480 4 years ago
parent
commit
5597df3398

+ 1 - 1
Module/mod_SalesRecorder/mod_SalesRecorder.cpp

@@ -1377,7 +1377,7 @@ ErrorCodeEnum CSalesRecorderEntity::CheckNetState()
 		}
 
 		pMobileDialClient->GetFunction()->CloseSession();
-		pMobileDialClient->SafeDelete();
+		//pMobileDialClient->SafeDelete();
 		pMobileDialClient = NULL;
 	}
 

+ 4 - 4
Module/mod_counterconnector/ConnectorFSM.cpp

@@ -170,7 +170,7 @@ BOOL ACMCallFSM::ReConnectionAssistchan()
 	if (m_pChannelClient != NULL)
 	{
 		m_pChannelClient->GetFunction()->CloseSession();
-		m_pChannelClient->SafeDelete();
+		//m_pChannelClient->SafeDelete();
 		m_pChannelClient = NULL;
 		Dbg("Close AssistChannel Session ");
 	}
@@ -196,7 +196,7 @@ BOOL ACMCallFSM::ReConnectionAssistchan()
 			{
 				Dbg("BeginState biz channel failed!");
 				m_pChannelClient->GetFunction()->CloseSession();
-				m_pChannelClient->SafeDelete();
+				//m_pChannelClient->SafeDelete();
 				m_pChannelClient = NULL;
 				return FALSE;
 			}
@@ -210,7 +210,7 @@ BOOL ACMCallFSM::ReConnectionSipphone()
 	if (m_pPhoneClient != NULL)
 	{
 		m_pPhoneClient->GetFunction()->CloseSession();
-		m_pPhoneClient->SafeDelete();
+		//m_pPhoneClient->SafeDelete();
 		m_pPhoneClient = NULL;
 		Dbg("Close sip Session ");
 	}
@@ -235,7 +235,7 @@ BOOL ACMCallFSM::ReConnectionSipphone()
 			{
 				Dbg("BeginState sip failed!");
 				m_pPhoneClient->GetFunction()->CloseSession();
-				m_pPhoneClient->SafeDelete();
+				//m_pPhoneClient->SafeDelete();
 				m_pPhoneClient = NULL;
 				return FALSE;
 			}

+ 2 - 2
Module/mod_counterconnector/ConnectorFSM.h

@@ -452,7 +452,7 @@ public:
 			}
 
 			pMSClient->GetFunction()->CloseSession();
-			pMSClient->SafeDelete();
+			//pMSClient->SafeDelete();
 			pMSClient = NULL;
 		}
 		return rc;
@@ -471,7 +471,7 @@ public:
 			rc = Error_Succeed;
 			Dbg("connect liveness detection entity success!");
 			pLDClient->GetFunction()->CloseSession();
-			pLDClient->SafeDelete();
+			//pLDClient->SafeDelete();
 			pLDClient = NULL;
 		}
 		return rc;

+ 8 - 8
Module/mod_counterconnector/mod_counterconnector.cpp

@@ -83,7 +83,7 @@ using namespace CounterConnector;
 			{
 				LOG_TRACE("BeginState biz channel failed!");
 				m_pCounterConnectorChannel->GetFunction()->CloseSession();
-				m_pCounterConnectorChannel->SafeDelete();
+				//m_pCounterConnectorChannel->SafeDelete();
 				m_pCounterConnectorChannel = NULL;
 				return Error;
 			}
@@ -97,7 +97,7 @@ using namespace CounterConnector;
 			{
 				Dbg("Begin BeginRecv ACM_TYPE_DEVICE failed!");
 				m_pCounterConnectorChannel->GetFunction()->CloseSession();
-				m_pCounterConnectorChannel->SafeDelete();
+				//m_pCounterConnectorChannel->SafeDelete();
 				m_pCounterConnectorChannel = NULL;
 				return Error;
 			}
@@ -111,7 +111,7 @@ using namespace CounterConnector;
 			{
 				Dbg("Begin BeginRecv ACM_TYPE_AGENTVIDEOTYPE failed!");
 				m_pCounterConnectorChannel->GetFunction()->CloseSession();
-				m_pCounterConnectorChannel->SafeDelete();
+				//m_pCounterConnectorChannel->SafeDelete();
 				m_pCounterConnectorChannel = NULL;
 				return Error;
 			}
@@ -125,7 +125,7 @@ using namespace CounterConnector;
 			{
 				Dbg("Begin BeginRecv ACM_TYPE_CALLTRANS failed!");
 				m_pCounterConnectorChannel->GetFunction()->CloseSession();
-				m_pCounterConnectorChannel->SafeDelete();
+				//m_pCounterConnectorChannel->SafeDelete();
 				m_pCounterConnectorChannel = NULL;
 				return Error;
 			}
@@ -338,7 +338,7 @@ using namespace CounterConnector;
 			if(m_pCounterConnectorChannel != NULL)
 			{			
 				m_pCounterConnectorChannel->GetFunction()->CloseSession();
-				m_pCounterConnectorChannel->SafeDelete();
+				//m_pCounterConnectorChannel->SafeDelete();
 				m_pCounterConnectorChannel = NULL;
 				Dbg("Close AssistChannel Session ");
 			}
@@ -363,7 +363,7 @@ using namespace CounterConnector;
 					{
 						Dbg("BeginState biz channel failed!");
 						m_pCounterConnectorChannel->GetFunction()->CloseSession();
-						m_pCounterConnectorChannel->SafeDelete();
+						//m_pCounterConnectorChannel->SafeDelete();
 						m_pCounterConnectorChannel = NULL;
 
 					}
@@ -377,7 +377,7 @@ using namespace CounterConnector;
 					{
 						Dbg("Begin BeginRecv ACM_TYPE_DEVICE failed!");
 						m_pCounterConnectorChannel->GetFunction()->CloseSession();
-						m_pCounterConnectorChannel->SafeDelete();
+						//m_pCounterConnectorChannel->SafeDelete();
 						m_pCounterConnectorChannel = NULL;
 					}
 				}
@@ -390,7 +390,7 @@ using namespace CounterConnector;
 					{
 						Dbg("Begin BeginRecv ACM_TYPE_CALLTRANS failed!");
 						m_pCounterConnectorChannel->GetFunction()->CloseSession();
-						m_pCounterConnectorChannel->SafeDelete();
+						//m_pCounterConnectorChannel->SafeDelete();
 						m_pCounterConnectorChannel = NULL;
 					}
 				}

+ 10 - 10
Module/mod_interactivecontrol/mod_interactivecontrol.cpp

@@ -351,7 +351,7 @@ public:
 		Error = m_pChannelClient->BeginRecv(Sub);
 		if (Error != Error_Succeed) {
 			m_pChannelClient->GetFunction()->CloseSession();
-			m_pChannelClient->SafeDelete();
+			//m_pChannelClient->SafeDelete();
 			m_pChannelClient = NULL;
 		}
 
@@ -360,7 +360,7 @@ public:
 		if (Error != Error_Succeed) 
 		{
 			m_pChannelClient->GetFunction()->CloseSession();
-			m_pChannelClient->SafeDelete();
+			//m_pChannelClient->SafeDelete();
 			m_pChannelClient = NULL;
 		}
 
@@ -369,14 +369,14 @@ public:
 		if (Error != Error_Succeed) 
 		{
 			m_pChannelClient->GetFunction()->CloseSession();
-			m_pChannelClient->SafeDelete();
+			//m_pChannelClient->SafeDelete();
 			m_pChannelClient = NULL;
 		}
 		ChannelService_BeginState_Sub Sub1;
 		Error = m_pChannelClient->BeginState(Sub1);
 		if (Error != Error_Succeed) {
 			m_pChannelClient->GetFunction()->CloseSession();
-			m_pChannelClient->SafeDelete();
+			//m_pChannelClient->SafeDelete();
 			m_pChannelClient = NULL;
 		}
 
@@ -554,12 +554,12 @@ public:
 		}
 		pFunc->UnregistSysVarEvent(SYSVAR_CALLTYPE);
 		m_pChannelClient->GetFunction()->CloseSession();
-		m_pChannelClient->SafeDelete();
+		//m_pChannelClient->SafeDelete();
 		m_pChannelClient = NULL;
 
 		// add by ly
 		m_pPlayClient->GetFunction()->CloseSession();
-		m_pPlayClient->SafeDelete();
+		//m_pPlayClient->SafeDelete();
 		m_pPlayClient = NULL;
 
 		int i;
@@ -1187,7 +1187,7 @@ public:
 						if (Error != Error_Succeed) 
 						{
 							m_pChannelClient->GetFunction()->CloseSession();
-							m_pChannelClient->SafeDelete();
+							//m_pChannelClient->SafeDelete();
 							m_pChannelClient = NULL;
 						}
 						Sub.type = ACM_TYPE_FLW;
@@ -1195,7 +1195,7 @@ public:
 						if (Error != Error_Succeed) 
 						{
 							m_pChannelClient->GetFunction()->CloseSession();
-							m_pChannelClient->SafeDelete();
+							//m_pChannelClient->SafeDelete();
 							m_pChannelClient = NULL;
 						}				
 					}
@@ -1207,7 +1207,7 @@ public:
 						if (Error != Error_Succeed) 
 						{
 							m_pChannelClient->GetFunction()->CloseSession();
-							m_pChannelClient->SafeDelete();
+							//m_pChannelClient->SafeDelete();
 							m_pChannelClient = NULL;
 						}
 					}
@@ -1220,7 +1220,7 @@ public:
 				if (m_pPlayClient!=NULL)
 				{
 					m_pPlayClient->GetFunction()->CloseSession();
-					m_pPlayClient->SafeDelete();
+					//m_pPlayClient->SafeDelete();
 					m_pPlayClient = NULL;
 					Dbg("Close AssistChannel Session ");
 				}

+ 7 - 7
Module/mod_mediacontroller/mod_mediacontroller.cpp

@@ -160,7 +160,7 @@ public:
 			{
 				LOG_TRACE("BeginState biz channel failed!");
 				m_pMediaControllerChannel->GetFunction()->CloseSession();
-				m_pMediaControllerChannel->SafeDelete();
+				//m_pMediaControllerChannel->SafeDelete();
 				m_pMediaControllerChannel = NULL;
 				pTransactionContext->SendAnswer(Error);
 				return;
@@ -179,7 +179,7 @@ public:
 			{
 				Dbg("Begin BeginRecv ACM_TYPE_DEVICE failed!");
 				m_pMediaControllerChannel->GetFunction()->CloseSession();
-				m_pMediaControllerChannel->SafeDelete();
+				//m_pMediaControllerChannel->SafeDelete();
 				m_pMediaControllerChannel = NULL;
 				pTransactionContext->SendAnswer(Error);
 				return;
@@ -1337,7 +1337,7 @@ private:
 				if (m_pMediaControllerChannel!=NULL)
 				{
 					m_pMediaControllerChannel->GetFunction()->CloseSession();
-					m_pMediaControllerChannel->SafeDelete();
+					//m_pMediaControllerChannel->SafeDelete();
 					m_pMediaControllerChannel = NULL;
 					Dbg("Close AssistChannel Session ");
 				}
@@ -1362,7 +1362,7 @@ private:
 						if (Error != Error_Succeed) 
 						{
 							m_pMediaControllerChannel->GetFunction()->CloseSession();
-							m_pMediaControllerChannel->SafeDelete();
+							//m_pMediaControllerChannel->SafeDelete();
 							m_pMediaControllerChannel = NULL;
 						}
 					}
@@ -1375,7 +1375,7 @@ private:
 						{
 							LOG_TRACE("BeginState biz channel failed!");
 							m_pMediaControllerChannel->GetFunction()->CloseSession();
-							m_pMediaControllerChannel->SafeDelete();
+							//m_pMediaControllerChannel->SafeDelete();
 							m_pMediaControllerChannel = NULL;
 						}
 					}
@@ -1735,7 +1735,7 @@ private:
 					(LPCSTR)conf.strVideoEnv, (LPCSTR)conf.strVideoOpt, (LPCSTR)strEwsCam);
 			}
 			pCameraConfigManageClient->GetFunction()->CloseSession();
-			pCameraConfigManageClient->SafeDelete();
+			//pCameraConfigManageClient->SafeDelete();
 			pCameraConfigManageClient = NULL;
 		}
 	}
@@ -2083,7 +2083,7 @@ public:
 			}
 
 			pScannerSetClient->GetFunction()->CloseSession();
-			pScannerSetClient->SafeDelete();
+			//pScannerSetClient->SafeDelete();
 			pScannerSetClient = NULL;
 		}
 

+ 6 - 6
Module/mod_sipphone/mod_sipphone.cpp

@@ -296,7 +296,7 @@ public:
 				  if (m_pSipphoneChannel != NULL)
 				  {
 					  m_pSipphoneChannel->GetFunction()->CloseSession();
-					  m_pSipphoneChannel->SafeDelete();
+					  //m_pSipphoneChannel->SafeDelete();
 					  m_pSipphoneChannel = NULL;
 					  Dbg("Close AssistChannel Session ");
 				  }
@@ -320,7 +320,7 @@ public:
 						  {
 							  LOG_TRACE("BeginState biz channel failed!");
 							  m_pSipphoneChannel->GetFunction()->CloseSession();
-							  m_pSipphoneChannel->SafeDelete();
+							  //m_pSipphoneChannel->SafeDelete();
 							  m_pSipphoneChannel = NULL;
 						  }
 					  }
@@ -334,7 +334,7 @@ public:
 						  {
 							  Dbg("Begin BeginRecv ACM_TYPE_DEVICE failed!");
 							  m_pSipphoneChannel->GetFunction()->CloseSession();
-							  m_pSipphoneChannel->SafeDelete();
+							  //m_pSipphoneChannel->SafeDelete();
 							  m_pSipphoneChannel = NULL;
 						  }
 					  }
@@ -716,7 +716,7 @@ public:
 			{
 				LOG_TRACE("BeginState biz channel failed!");
 				m_pSipphoneChannel->GetFunction()->CloseSession();
-				m_pSipphoneChannel->SafeDelete();
+				//m_pSipphoneChannel->SafeDelete();
 				m_pSipphoneChannel = NULL;
 				return Error;
 			}
@@ -730,7 +730,7 @@ public:
 			{
 				Dbg("Begin BeginRecv ACM_TYPE_DEVICE failed!");
 				m_pSipphoneChannel->GetFunction()->CloseSession();
-				m_pSipphoneChannel->SafeDelete();
+				//m_pSipphoneChannel->SafeDelete();
 				m_pSipphoneChannel = NULL;
 				return Error;
 			}
@@ -744,7 +744,7 @@ public:
 			{
 				Dbg("Begin BeginRecv ACM_TYPE_VIDEOFREQ failed!");
 				m_pSipphoneChannel->GetFunction()->CloseSession();
-				m_pSipphoneChannel->SafeDelete();
+				//m_pSipphoneChannel->SafeDelete();
 				m_pSipphoneChannel = NULL;
 				return Error;
 			}

+ 16 - 4
Other/libmediaplayer/player.cpp

@@ -215,15 +215,18 @@ int CMediaPlayer::Initialize_Player_Stat(rvc_media_player_param_t* pMedia_Player
 		return iRet;
 	}
 
+	m_hostapi->Debug("%s:%d", __FUNCTION__, __LINE__);
 	if (NULL != m_player_stat) {
 		player_deinit(m_player_stat);
 	}
 
+	m_hostapi->Debug("%s:%d", __FUNCTION__, __LINE__);
 	m_player_stat = (player_stat_t*)av_mallocz(sizeof(player_stat_t));
 	if (NULL == m_player_stat) {
 		m_hostapi->Debug("player_stat_t struct malloc failed!");
 		return iRet;
 	}
+	m_hostapi->Debug("%s:%d", __FUNCTION__, __LINE__);
 
 	m_player_stat->rvc_hostapi = m_hostapi;
 	m_player_stat->prvc_cb = pMedia_Player->cb;
@@ -233,12 +236,12 @@ int CMediaPlayer::Initialize_Player_Stat(rvc_media_player_param_t* pMedia_Player
 		m_player_stat->piconpath = av_strdup(m_piconpath);
 	}
 	m_player_stat->uVolume = m_uvolume;
-
+	m_hostapi->Debug("%s:%d", __FUNCTION__, __LINE__);
 	m_player_stat->uFilesCount = pMedia_Player->uFilesCount;
 	for (size_t i = 0; i < pMedia_Player->uFilesCount; i++){
 		memcpy(m_player_stat->strPlayLists[i], pMedia_Player->strPlayLists[i], strlen(pMedia_Player->strPlayLists[i]));
 	}
-
+	m_hostapi->Debug("%s:%d", __FUNCTION__, __LINE__);
 	if (0 == pMedia_Player->uFilesCount || NULL == m_player_stat->rvc_hostapi || NULL == m_player_stat->prvc_cb || NULL == m_player_stat->piconpath) {
 		player_deinit(m_player_stat);
 		m_player_stat = NULL;
@@ -247,7 +250,7 @@ int CMediaPlayer::Initialize_Player_Stat(rvc_media_player_param_t* pMedia_Player
 	else{
 		iRet = 0;
 	}
-
+	m_hostapi->Debug("%s:%d", __FUNCTION__, __LINE__);
 	return iRet;
 }
 
@@ -258,7 +261,7 @@ int CMediaPlayer::Init(rvc_media_player_param_t* pMedia_Player)
 	if (0 != Initialize_Player_Stat(pMedia_Player)){
 		return iRet;
 	}
-
+	m_hostapi->Debug("initialize player stat success.");
 	/* start video display */
 	if (frame_queue_init(&m_player_stat->video_frm_queue, &m_player_stat->video_pkt_queue, VIDEO_PICTURE_QUEUE_SIZE, 1) < 0 ||
 		frame_queue_init(&m_player_stat->audio_frm_queue, &m_player_stat->audio_pkt_queue, SAMPLE_QUEUE_SIZE, 1) < 0)
@@ -268,6 +271,10 @@ int CMediaPlayer::Init(rvc_media_player_param_t* pMedia_Player)
 		m_player_stat = NULL;
 		return iRet;
 	}
+	else
+	{
+		m_hostapi->Debug("frame queue init success!");
+	}
 
 	/* init packet queue */
 	if (packet_queue_init(&m_player_stat->video_pkt_queue, m_hostapi) < 0 ||
@@ -278,6 +285,10 @@ int CMediaPlayer::Init(rvc_media_player_param_t* pMedia_Player)
 		m_player_stat = NULL;
 		return iRet;
 	}
+	else
+	{
+		m_hostapi->Debug("packet queue init success!");
+	}
 
 	/* put end pkt into packet queue */
 	AVPacket flush_pkt = {0};
@@ -304,6 +315,7 @@ int CMediaPlayer::Init(rvc_media_player_param_t* pMedia_Player)
 		m_hostapi->Debug("(Did you set the DISPLAY variable?)");
 	}
 	else {
+		m_hostapi->Debug("initialize SDL success.");
 		iRet = 0;
 	}
 

+ 2 - 2
Other/libvideoframework/videortp.c

@@ -310,7 +310,7 @@ static __inline void receiver_notify_peer_fast_update_now(videortp_t *vrtp)
 {
 	DWORD dwNow = GetTickCount();
 
-	rtpDbg(vrtp,"%I64d receiver_notify_peer_fast_update_now!", TimeInMilliseconds());
+	//rtpDbg(vrtp,"%I64d receiver_notify_peer_fast_update_now!", TimeInMilliseconds());
 	rtp_session_send_rtcp_h261_fir(vrtp->rtp_sess);
 	vrtp->last_peer_update_tick = dwNow;
 }
@@ -1264,7 +1264,7 @@ void* recv_proc(void* arg)
 			    //1s没有解码到视频数据,请求I帧
 				int64_t now_ms = TimeInMilliseconds();
 				if (now_ms - vrtp->prev_dec_ms >= 1000){
-					rtpDbg(vrtp,"recv_proc now:%I64d > prev_dec_ms:%I64d 1s.", TimeInMilliseconds(), vrtp->prev_dec_ms);
+					//rtpDbg(vrtp,"recv_proc now:%I64d > prev_dec_ms:%I64d 1s.", TimeInMilliseconds(), vrtp->prev_dec_ms);
 					receiver_notify_peer_fast_update_now(vrtp);
 					vrtp->prev_dec_ms = now_ms;
 				}