Эх сурвалжийг харах

Z991239-5263 #comment 优化WIN和UOS加载人型框流程

80274480 1 жил өмнө
parent
commit
7747a3a0cf

+ 0 - 1
Module/mod_agentip/mod_agentip.cpp

@@ -221,7 +221,6 @@ void CamSwitchChannelClient::OnMessage(ErrorCodeEnum Error, ChannelService_State
 
 void CamSwitchChannelClient::OnMessage( ErrorCodeEnum Error, ChannelService_Packet_Info &Msg, CSmartPointer<IReleasable> pData )
 {
-	LOG_FUNCTION();
 	if (Error == Error_Succeed) {
 		CAgentInterpreterEntity *pEntity = static_cast<CAgentInterpreterEntity*>(m_pEntityBase);
 		pEntity->SwitchCamera(Msg.sub_type);

+ 1 - 1
Module/mod_counterconnector/mod_counterconnector.cpp

@@ -1054,7 +1054,7 @@ void CCounterConnectorSession::Handle_GetPickUpStatus(SpReqAnsContext<ConnectSer
 
 void CCounterConnectorSession::OnClose(ErrorCodeEnum eErrorCode )
 {
-	LOG_FUNCTION();
+
 }
 
 SP_BEGIN_ENTITY_MAP()

+ 1 - 1
Module/mod_evtconverter/mod_evtconverter.cpp

@@ -23,7 +23,7 @@ public:
 	{
 		if (m_nIslog)
 		{
-			LOG_FUNCTION();
+
 		}
 		m_eDeviceType = eStand2sType; 
 		m_nIslog = 1;

+ 0 - 2
Module/mod_initiativetransfer/FlowControlFSM.cpp

@@ -440,7 +440,6 @@ ErrorCodeEnum CFlowControlFSM::SetState(const char *s, const char *sdesc)
 
 ErrorCodeEnum CFlowControlFSM::DisallowControl()
 {
-	LOG_FUNCTION();
 	if (m_pClient) {
 		ChannelService_Send_Info Info;
 		Info.compress = false;
@@ -456,6 +455,5 @@ ErrorCodeEnum CFlowControlFSM::DisallowControl()
 
 void NotifyEnterFlowEvent::OnUnhandled()
 {
-	LOG_FUNCTION();
 	m_pFSM->DisallowControl();
 }

+ 0 - 1
Module/mod_mediacontroller/mod_mediacontroller.cpp

@@ -1884,7 +1884,6 @@ void ChannelMediaControllerClient::OnMessage(ErrorCodeEnum Error, ChannelService
 
 void ChannelMediaControllerClient::OnMessage( ErrorCodeEnum Error, ChannelService_Packet_Info &Msg, CSmartPointer<IReleasable> pData )
 {
-	LOG_FUNCTION();
 	if (Error == Error_Succeed) 
 	{
 		CMediaControllerEntity *pEntity = static_cast<CMediaControllerEntity*>(m_pEntityBase);

+ 2 - 7
Module/mod_screenshot/mod_screenshot.cpp

@@ -150,8 +150,6 @@ public:
 
 	ErrorCodeEnum __OnStart(ErrorCodeEnum preOperationError)
 	{
-		LOG_FUNCTION();
-
 		CSmartPointer<IEntityFunction> pFunc = GetFunction();
 		int i = 0;
 		m_arrListener.Init(1);
@@ -189,8 +187,6 @@ public:
 
 	ErrorCodeEnum __OnClose(ErrorCodeEnum preOperationError)
 	{
-		LOG_FUNCTION();
-
 		CSmartPointer<IEntityFunction> spFunction = GetFunction();
 		for (int i = 0; i < m_arrListener.GetCount(); ++i) 
 		{
@@ -564,10 +560,10 @@ void CScreenShotSession::Handle_StartScreenShot(SpReqAnsContext<ScreenShotServic
 		ctx->Answer(Error_Succeed);
 	}
 }
-// add by ly 20150514
+
 void CScreenShotSession::OnClose( ErrorCodeEnum eErrorCode )
 {
-	LOG_FUNCTION();
+	
 }
 
 void ChannelClient::OnMessage(ErrorCodeEnum Error, ChannelService_State_Info &Msg, CSmartPointer<IReleasable> pData)
@@ -584,7 +580,6 @@ void ChannelClient::OnMessage(ErrorCodeEnum Error, ChannelService_State_Info &Ms
 
 void ChannelClient::OnMessage( ErrorCodeEnum Error, ChannelService_Packet_Info &Msg, CSmartPointer<IReleasable> pData )
 {
-	LOG_FUNCTION();
 	if (Error == Error_Succeed) {
 		CScreenCaptureEntity *pEntity = static_cast<CScreenCaptureEntity*>(m_pEntityBase);
 		int cat = ACM_SRN_CAT(Msg.sub_type);

+ 0 - 3
Module/mod_sipphone/unix/audio_session.cpp

@@ -339,7 +339,6 @@ static int execute_cmd_return_result(const char* cmd, char* result)
 
 static int phonemedia_start(audio_session_t *session)
 {
-	LOG_FUNCTION();
 	audio_session_t *media = session;
 	audio_session_phonemedia_conf_t *conf = &media->phonemedia_conf;
 	apr_status_t status;
@@ -853,7 +852,6 @@ int audio_session_create(const audio_session_conf_t *conf, audio_session_t **p_s
 int audio_session_start_phonemedia(audio_session_t *session, const audio_session_phonemedia_conf_t *conf)
 {
 	int rc;
-	LOG_FUNCTION();
 	if (!session)
 		return Error_NotInit;
 	if (session->pool) { // already started
@@ -874,7 +872,6 @@ int audio_session_change_dev(audio_session_t *session, e_dev_type t)
 }
 int audio_session_stop(audio_session_t *session)
 {
-	LOG_FUNCTION();
 	return phonemedia_stop(session, TRUE);
 }
 void audio_session_destroy(audio_session_t *session)

+ 0 - 3
Module/mod_sipphone/unix/mod_sipphone.cpp

@@ -1622,7 +1622,6 @@ void CSIPEntity::OnContinued()
 
 CServerSessionBase*	CSIPEntity::OnNewSession(const char* /*pszRemoteEntityName*/, const char * /*pszClass*/)
 {
-	LOG_FUNCTION();
 	m_pCurrentSession = new CSIPPhoneSession(this);
 	return m_pCurrentSession;
 }
@@ -1706,8 +1705,6 @@ static int __change_dev(void *arg)
 
 void CSIPEntity::SwitchHandFree()
 {
-	LOG_FUNCTION();
-
 	int rc = 0;
 	ChangeDevCommand *pCmd = new ChangeDevCommand();
 	pCmd->pEntity = this;

+ 0 - 1
Module/mod_sipphone/unix/video_session.cpp

@@ -1746,7 +1746,6 @@ static void stop_ui(video_session_t *session)
 
 int video_session_create(const video_session_conf_t *conf, video_session_t **p_session)
 {
-	LOG_FUNCTION();
 	video_session_t *session = ZALLOC_T(video_session_t);
 	if (session) 
 	{

+ 1 - 1
Module/mod_sipphone/win/mod_sipphone.cpp

@@ -2083,7 +2083,7 @@ CSIPPhoneSession::CSIPPhoneSession(CSIPEntity* pEntity) : m_pEntity(pEntity), m_
 
 void CSIPPhoneSession::OnClose( ErrorCodeEnum eErrorCode )
 {
-	LOG_FUNCTION();
+
 }
 
 void CSIPPhoneSession::Handle_MakeCall( SpReqAnsContext<PhoneService_MakeCall_Req, PhoneService_MakeCall_Ans>::Pointer ctx )

+ 29 - 32
Module/mod_sipphone/win/video_session.cpp

@@ -53,7 +53,10 @@ void* pg_remote_render = NULL;					// remote render
 video_session_t* pg_last_session = NULL;		// last used session
 
 #define WNDCLS_NAME	"sipmedia_video"
-#define MAX_PATH_SIZE 256
+
+#ifndef MAX_PATH
+#define MAX_PATH 260
+#endif
 
 #define DEVICE_STANDARD_TYPE		0
 #define DEVICE_PAD_TYPE				1
@@ -425,12 +428,12 @@ static int on_rx_frame(video_frame *frame, void *user_data)
 
 int GetCurrentRunPath(char* pPath)
 {
-	char* pBuf = new char[MAX_PATH_SIZE];
+	char* pBuf = new char[MAX_PATH];
 	if (pBuf == NULL)
 		return -1;
-	ZeroMemory(pBuf, MAX_PATH_SIZE);
-	GetModuleFileName(NULL, pBuf, MAX_PATH_SIZE);
-	int len = strnlen_s(pBuf, MAX_PATH_SIZE);
+	ZeroMemory(pBuf, MAX_PATH);
+	GetModuleFileName(NULL, pBuf, MAX_PATH);
+	int len = strnlen_s(pBuf, MAX_PATH);
 	if (len <= 0)
 	{
 		delete[]pBuf;
@@ -440,15 +443,15 @@ int GetCurrentRunPath(char* pPath)
 	pch = strstr(pBuf, "bin");
 	if (pch == NULL)
 		return -3;
-	int lenDel = strnlen_s(pch, MAX_PATH_SIZE);
+	int lenDel = strnlen_s(pch, MAX_PATH);
 	if (len <= 0)
 	{
 		delete[]pBuf;
 		return -3;
 	}
-	strncpy_s(pPath, MAX_PATH_SIZE, pBuf, len - lenDel);
+	strncpy_s(pPath, MAX_PATH, pBuf, len - lenDel);
 	delete[]pBuf;   
-	return strnlen_s(pPath, MAX_PATH_SIZE);
+	return strnlen_s(pPath, MAX_PATH);
 }
 
 
@@ -513,7 +516,7 @@ static int on_pull(videoplayer_t *player, void *user_data, video_frame **frame)
 			video_frame_fill_black(tmp_frame_preview);
 			if (session->video_error == NULL)
 			{
-				char strPath[MAX_PATH_SIZE] = {0};
+				char strPath[MAX_PATH] = {0};
 				GetCurrentRunPath(strPath);
 				sprintf(strPath, "%s\\bin\\looklowerscreen.jpg", strPath);
 				if (_access(strPath,0)!=-1)
@@ -701,8 +704,8 @@ static int get_local_video_frame(void* user_data, video_frame** frame)
 			video_frame_fill_black(tmp_frame_preview);
 			if (session->video_error == NULL)
 			{
-				char strPath[MAX_PATH_SIZE] = { 0 };
-				_snprintf(strPath, MAX_PATH_SIZE, "%s", "./bin/looklowerscreen.jpg");
+				char strPath[MAX_PATH] = { 0 };
+				_snprintf(strPath, MAX_PATH, "%s", "./bin/looklowerscreen.jpg");
 				if (-1 != _access(strPath,0))
 				{
 					IplImage* img = cvLoadImage(strPath, 1);
@@ -898,7 +901,6 @@ static unsigned int __stdcall agent_picture_show_thread(void* arg)
 
 static int agent_picture_video_start(picture_record_t* t_record)
 {
-	LOG_FUNCTION();
 	t_record->evt = CreateEventA(NULL, FALSE, FALSE, NULL);
 	t_record->work_thread = (HANDLE)_beginthreadex(NULL, 0, &agent_picture_show_thread, t_record, 0, NULL);
 	//sem_init(&t_record->sem_evt, 0, 0);
@@ -987,9 +989,8 @@ static int record_agent_picture_show_session_destory(video_session_t* session)
 
 static void	show_remote_agnet_picture(video_session_t *t_session)
 {
-	LOG_FUNCTION();
-	char strPath[MAX_PATH_SIZE]={0};
-	char strImgPath[MAX_PATH_SIZE]={0};
+	char strPath[MAX_PATH]={0};
+	char strImgPath[MAX_PATH]={0};
 
 	int irecord_video_frame_width = REC_COMMON_VIDEO_SSM_AGENT_WIDTH;
 	int irecord_video_frame_heigt = REC_COMMON_VIDEO_SSM_AGENT_HEIGHT;
@@ -1465,7 +1466,6 @@ static bool ReMoveVideoWindow(HWND hWnd, RECT rect, RECT otherect)
 
 static int HandleVideoMoveEvent(int iMessageType, HWND hWnd, video_session_t* pSession)
 {
-	LOG_FUNCTION();
 	int iRet = -1;
 	if (NULL == pSession || NULL == hWnd) {
 		return iRet;
@@ -1755,12 +1755,11 @@ static void __video_render_log(void* user_data, const char* fmt, va_list arg)
 //void* videorender_func(void* arg)
 static unsigned int __stdcall videorender_func(void* arg)
 {
-	LOG_FUNCTION();
 	video_session_t* session = (video_session_t*)arg;
-	char str_local_ip[MAX_PATH_SIZE] = { 0 };
-	char str_remote_ip[MAX_PATH_SIZE] = { 0 };
-	translate_ipaddr_from_int(str_local_ip, MAX_PATH_SIZE, session->conf.local_rtp_ip);
-	translate_ipaddr_from_int(str_remote_ip, MAX_PATH_SIZE, session->conf.remote_rtp_ip);
+	char str_local_ip[MAX_PATH] = { 0 };
+	char str_remote_ip[MAX_PATH] = { 0 };
+	translate_ipaddr_from_int(str_local_ip, MAX_PATH, session->conf.local_rtp_ip);
+	translate_ipaddr_from_int(str_remote_ip, MAX_PATH, session->conf.remote_rtp_ip);
 
 	videorender_callback_t t_callback = { 0 };
 	t_callback.debug = &__video_render_log;
@@ -2040,14 +2039,12 @@ int video_session_create(const video_session_conf_t *conf, video_session_t **p_s
 	video_session_t *session = ZALLOC_T(video_session_t);
 	if (session) 
 	{
-		char str_local[MAX_PATH_SIZE] = {0};
-		char str_remote[MAX_PATH_SIZE] = {0};
-		translate_ipaddr_from_int(str_local, MAX_PATH_SIZE, conf->local_rtp_ip);
-		translate_ipaddr_from_int(str_remote, MAX_PATH_SIZE, conf->remote_rtp_ip);
+		char str_local[MAX_PATH] = {0};
+		char str_remote[MAX_PATH] = {0};
+		translate_ipaddr_from_int(str_local, MAX_PATH, conf->local_rtp_ip);
+		translate_ipaddr_from_int(str_remote, MAX_PATH, conf->remote_rtp_ip);
 
 		memcpy(&session->conf, conf, sizeof(video_session_conf_t));
-		//session->bshow_remote = false;
-		//session->ilast_windstae = 0;
 		session->video_shm_q_env = new Clibvideoqueue(REC_COMMON_VIDEO_ENV_SHM_RTP_QUEUE);
 		if (DOUBLERECORD_CALLTYPE != conf->nCallType){
 			session->video_shm_q_remote = new Clibvideoqueue(REC_COMMON_VIDEO_REMOTE_SHM_RTP_QUEUE);
@@ -2060,10 +2057,10 @@ int video_session_create(const video_session_conf_t *conf, video_session_t **p_s
 			}
 		}
 
-		char strPath[MAX_PATH_SIZE]={0};
-		char strImgPath[MAX_PATH_SIZE]={0};
+		char strPath[MAX_PATH]={0};
+		char strImgPath[MAX_PATH]={0};
 		GetCurrentRunPath(strPath);
-		sprintf(strImgPath,"%s\\bin\\error.jpg",strPath);
+		_snprintf(strImgPath, MAX_PATH,"%s\\bin\\error.jpg",strPath);
 		if (_access(strImgPath,0)!=-1)
 		{
 			IplImage*img = cvLoadImage(strImgPath,1);
@@ -2085,8 +2082,8 @@ int video_session_create(const video_session_conf_t *conf, video_session_t **p_s
 			session->video_error = NULL;
 		}
 		//加载人形背景框
-		char strPersonPath[MAX_PATH_SIZE] ;
-		sprintf(strPersonPath,"%s\\bin\\rxk.png",strPath);
+		char strPersonPath[MAX_PATH] = {0};
+		_snprintf(strPersonPath, MAX_PATH,"%s\\bin\\rxk.jpg",strPath);
 		if (_access(strPersonPath,0)!=-1)
 		{
 			if (session->personimage == NULL)

+ 0 - 1
Module/mod_snapshot/mod_snapshot.cpp

@@ -139,7 +139,6 @@ public:
 
 	ErrorCodeEnum __OnClose(ErrorCodeEnum preOperationError)
 	{
-		LOG_FUNCTION();
 		CSmartPointer<IEntityFunction> spFunction = GetFunction();
 		for (int i = 0; i < m_arrListener.GetCount(); ++i) 
 		{