瀏覽代碼

Z991239-3624 #comment 优化录像库日志

80274480 3 年之前
父節點
當前提交
83ab5a170a

+ 9 - 12
Module/mod_SalesRecorder/mod_SalesRecorder.cpp

@@ -420,7 +420,7 @@ ErrorCodeEnum CSalesRecorderEntity::__OnStart( ErrorCodeEnum preOperationError )
 #ifdef RVC_OS_WIN
 		m_pPlayer = new Clibwmpplayer(this);
 #else
-		m_pPlayer = new Clibmediaplayer(this);
+		//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);
@@ -443,7 +443,7 @@ ErrorCodeEnum CSalesRecorderEntity::__OnStart( ErrorCodeEnum preOperationError )
 #ifdef RVC_OS_WIN
 		m_pPlayer = new Clibwmpplayer(this);
 #else
-		m_pPlayer = new Clibmediaplayer(this);
+		//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);
@@ -540,8 +540,7 @@ ErrorCodeEnum CSalesRecorderEntity::__OnClose( ErrorCodeEnum preOperationError )
 	if (preOperationError != Error_Succeed)
 		return preOperationError;
 
-	// edit by ly @2018/01/10
-	delete m_pPlayer; m_pPlayer = NULL;
+	//delete m_pPlayer; m_pPlayer = NULL;
 	CSmartPointer<IEntityFunction> spFunction = GetFunction();
 	for (int i = 0; i < m_arrListener.GetCount(); ++i) 
 	{
@@ -605,7 +604,6 @@ void CSalesRecorderEntity::OnRecordFailed(const char* pszMessage, bool bRecordDe
 
 void CSalesRecorderEntity::OnRecordEntityExcption()
 {
-	Dbg("现场销售双录出现异常,请稍候重录,系统正在恢复中,预计60秒!");
 	LogEvent(Severity_High,LOG_EVT_SALESRECORD_ENTITY_EXCEPTION,"现场销售双录出现异常,请稍候重录,系统正在恢复中,预计60秒!");
 	LogWarn(Severity_Low, Error_Debug, LOG_EVT_RECORD_ENTITY_EXCEPTION, "sales record entity exception!");
 }
@@ -613,7 +611,6 @@ void CSalesRecorderEntity::OnRecordEntityExcption()
 
 void CSalesRecorderEntity::OnRecordFinished()
 {
-	Dbg("现场销售录像已完成");
 	LogEvent(Severity_High, LOG_EVT_SALESRECORD_FINISHED, "现场销售双录已完成.");
 	LogWarn(Severity_Low, Error_Debug, LOG_EVT_RECORD_FINISHED, "现场销售双录已完成.");
 }
@@ -889,8 +886,8 @@ ErrorCodeEnum CSalesRecorderEntity::ShowVideo( const char *wmvfilename )
 			Dbg("bRet = %d while find %s", bRet, wmvfilename);
 			if(bRet){
 				Dbg("succeed to get record count while play video!");
-				Dbg("m_pPlayer = %p while play!", m_pPlayer);
-				m_pPlayer->PlayVideo((LPCSTR)strPath, wmvfilename, uVideoCount);
+				//Dbg("m_pPlayer = %p while play!", m_pPlayer);
+				//m_pPlayer->PlayVideo((LPCSTR)strPath, wmvfilename, uVideoCount);
 				Dbg("succeed to play video!");
 			}
 			else{
@@ -923,8 +920,8 @@ ErrorCodeEnum CSalesRecorderEntity::PlaySalesRecordVideo( const char *wmvfilenam
 			Dbg("bRet = %d while find %s", bRet, wmvfilename);
 			if(bRet){
 				Dbg("succeed to get record count while play sales record video!");
-				Dbg("m_pPlayer = %p while play!", m_pPlayer);
-				m_pPlayer->PlaySalesRecordVideo(iWndX, iWndY, iWndWidth, iWndHeight,(LPCSTR)strPath, wmvfilename, uVideoCount);
+				//Dbg("m_pPlayer = %p while play!", m_pPlayer);
+				//m_pPlayer->PlaySalesRecordVideo(iWndX, iWndY, iWndWidth, iWndHeight,(LPCSTR)strPath, wmvfilename, uVideoCount);
 				Dbg("succeed to play sales record video!");
 			}
 			else{
@@ -1377,8 +1374,8 @@ ErrorCodeEnum CSalesRecorderEntity::HandleStopShowVideo()
 	ErrorCodeEnum ErrorCode = Error_Succeed;
 	if(m_bIsShowVideo)
 	{
-		Dbg("m_pPlayer = %p while play!", m_pPlayer);
-		m_pPlayer->Close();
+		//Dbg("m_pPlayer = %p while play!", m_pPlayer);
+		//m_pPlayer->Close();
 		m_bIsShowVideo = FALSE;
 		Dbg("succeed to stop show video!");
 	}

+ 2 - 2
Module/mod_SalesRecorder/mod_SalesRecorder.h

@@ -70,7 +70,7 @@ using namespace SalesRecorder;
 #endif // RVC_OS_WIN
 	{
 	public:
-		CSalesRecorderEntity(): m_pRecorder(NULL), m_bStarted(FALSE), m_pPlayer(NULL),  m_bIsShowVideo(FALSE) { ZeroMemory(m_SalesVideoName, MAX_PATH); }
+		CSalesRecorderEntity(): m_pRecorder(NULL), m_bStarted(FALSE), /*m_pPlayer(NULL),*/  m_bIsShowVideo(FALSE) { ZeroMemory(m_SalesVideoName, MAX_PATH); }
 		virtual ~CSalesRecorderEntity() { /*empty implementation*/ }
 
 		virtual const char *GetEntityName() const { return "SalesRecorder"; }
@@ -193,7 +193,7 @@ using namespace SalesRecorder;
 #ifdef RVC_OS_WIN
 		Clibwmpplayer* m_pPlayer;
 #else
-		Clibmediaplayer* m_pPlayer;
+		//Clibmediaplayer* m_pPlayer;
 #endif // RVC_OS_WIN
 		BOOL m_bIsShowVideo;
 		CAutoArray<CUUID> m_arrListener;

+ 3 - 3
Other/libwmvrecord/libwmvrecord.cpp

@@ -1246,7 +1246,7 @@ BOOL libwmvrecord_impl::IsRecordingCamError(int iRecordingCam)
 		}
 	}
 	else {
-		if ('O' == m_pHostApi->GetCameraState() || 'B' == m_pHostApi->GetCameraState()) {
+		if ('O' == m_pHostApi->GetCameraState() || 'B' == m_pHostApi->GetCameraState()|| 'E' == m_pHostApi->GetCameraState()) {
 			bRet = TRUE;
 		}
 	}
@@ -1769,7 +1769,7 @@ int libwmvrecord_impl::VideoRecord()
 							}
 							nAudioFromQueNum++;
 							if ((0 == nAudioFromQueNum % 100) && (0 != audioframe->iseriesnumber)) {
-								m_pHostApi->Debug("not single side record,and current local audio queue len is %d audio series number is: %d.", nAudioLens, audioframe->iseriesnumber);
+								//m_pHostApi->Debug("not single side record,and current local audio queue len is %d audio series number is: %d.", nAudioLens, audioframe->iseriesnumber);
 							}
 						}
 						else {
@@ -1816,7 +1816,7 @@ int libwmvrecord_impl::VideoRecord()
 					}
 				}
 				else {
-					m_pHostApi->Debug("get audio length from m_remoteaudioqueue and m_audioqueue failed.");
+					//m_pHostApi->Debug("get audio length from m_remoteaudioqueue and m_audioqueue failed.");
 				}
 			}