Browse Source

Z991239-6192 #comment: 优化交易录像保存流程

80274480 5 months ago
parent
commit
72725421d1

+ 1 - 1
Module/mod_SalesRecorder/mod_SalesRecorder.cpp

@@ -1667,7 +1667,7 @@ int CSalesRecorderEntity::HandleEncryptVideoRecord(const char* videofilename)
 	}
 	else {
 		if (rvcMoveFile(strOutFile, videofilename)) {
-			DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("rename %s to %s Success!", strOutFile, videofilename);
+			DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("rename %s to %s success!", strOutFile, videofilename);
 			iRet = 0;
 		}
 		else {

+ 2 - 8
Module/mod_recorder/mod_recorder.cpp

@@ -118,13 +118,11 @@ static bool rvcMoveFile(const char* strSrcFile, const char* strDstFile)
 	if (NULL == strSrcFile || NULL == strDstFile) {
 		return bRet;
 	}
-#ifdef RVC_OS_WIN
-	bRet = MoveFile(strSrcFile, strDstFile);
-#else
+
 	if (0 == rename(strSrcFile, strDstFile)) {
 		bRet = true;
 	}
-#endif // RVC_OS_WIN
+
 	return bRet;
 }
 
@@ -136,13 +134,9 @@ static bool RvcDeleteFile(const char* strSrcFile)
 		return bRet;
 	}
 
-#ifdef RVC_OS_WIN
-	bRet = DeleteFile(strSrcFile);
-#else
 	if (0 == remove(strSrcFile)) {
 		bRet = true;
 	}
-#endif // RVC_OS_WIN
 	
 	return bRet;
 }

+ 7 - 3
Other/libvideorecord/libvideorecord_impl.cpp

@@ -803,7 +803,7 @@ bool libvideorecord_impl::GetRecordVideoFrameSize()
 {
 	bool bRet = false;
 
-	m_pHostApi->Debug(RECORD_LOG_DEBUG, "Get Video FrameSize,record type is %s.", record_type_table[m_eRecordType]);
+	m_pHostApi->Debug(RECORD_LOG_DEBUG, "get video framesize, and record type is %s.", record_type_table[m_eRecordType]);
 	for (int i = 0; i < RECORD_FAILED_MAX_TIMES; i++) {
 		m_iVideoFrameSize = GetDestTypeVideoFrameSize(m_iWidth, m_iHeight, m_eRecordType);
 		if (m_iVideoFrameSize <= 0) {
@@ -818,7 +818,9 @@ bool libvideorecord_impl::GetRecordVideoFrameSize()
 			}
 		}
 		else {
-			m_pHostApi->Debug(RECORD_LOG_INFO, "get video framesize success, and failed times is %d.", i);
+			if (i > 0) {
+				m_pHostApi->Debug(RECORD_LOG_INFO, "get video framesize success, and failed times is %d.", i);
+			}
 			bRet = true;
 			break;
 		}
@@ -850,7 +852,9 @@ bool libvideorecord_impl::GetRecordAudioFrameSize()
 			}
 		}
 		else {
-			m_pHostApi->Debug(RECORD_LOG_INFO, "get audio frame size success, and failed time is %d.", i);
+			if (i > 0) {
+				m_pHostApi->Debug(RECORD_LOG_INFO, "get audio framesize success, and failed times is %d.", i);
+			}
 			bRet = true;
 			break;
 		}