浏览代码

Z991239-6031 #comment 优化录像库添加水印信息函数

80274480 10 月之前
父节点
当前提交
bef1359545

+ 2 - 2
Other/libvideorecord/libvideorecord.cpp

@@ -74,7 +74,7 @@ bool Clibvideorecord::SetRightVideoWaterMark(const char* strWaterMark)
 		return bRet;
 	}
 
-	size_t ulen = strlen(strWaterMark);
+	uint32_t ulen = (uint32_t)strlen(strWaterMark);
 	return m_pImpl->setRightWaterMark(strWaterMark, ulen);
 }
 #else
@@ -86,7 +86,7 @@ bool Clibvideorecord::SetRightVideoWaterMark(const wchar_t* strWaterMark)
 		return bRet;
 	}
 
-	size_t ulen = wcslen(strWaterMark);
+	uint32_t ulen = (uint32_t)wcslen(strWaterMark);
 
 	bRet = m_pImpl->setRightWaterMark(strWaterMark, ulen * sizeof(wchar_t));
 

+ 3 - 3
Other/libvideorecord/libvideorecord_impl.cpp

@@ -584,6 +584,7 @@ bool libvideorecord_impl::EndRecord()
 bool libvideorecord_impl::Rvc_Timeout(int ms)
 {
 	bool bTimeout = true;
+
 #ifdef _WIN32
 	DWORD dwRet = WaitForSingleObject(m_hEventWait, ms);
 	if (WAIT_TIMEOUT == dwRet) {
@@ -1706,9 +1707,9 @@ bool libvideorecord_impl::ReceiveRecordAudioData(unsigned char* pData, unsigned
 }
 
 #ifdef _WIN32
-bool libvideorecord_impl::setRightWaterMark(const char* strWaterMark, size_t ulen)
+bool libvideorecord_impl::setRightWaterMark(const char* strWaterMark, uint32_t ulen)
 #else
-bool libvideorecord_impl::setRightWaterMark(const wchar_t* strWaterMark, size_t ulen)
+bool libvideorecord_impl::setRightWaterMark(const wchar_t* strWaterMark, uint32_t ulen)
 #endif
 {
 	bool bRet = false;
@@ -1919,7 +1920,6 @@ void libvideorecord_impl::MediaSynchronous()
 }
 
 
-
 int libvideorecord_impl::WriteVideoFrame() 
 {
 	int iret = 0;

+ 2 - 2
Other/libvideorecord/libvideorecord_impl.h

@@ -58,9 +58,9 @@ public:
 	bool ContinueRecord();			//继续录像
 	void ChangeFilename(const char* newfilename);
 #ifdef _WIN32
-	bool setRightWaterMark(const char* strWaterMark, size_t ulen);
+	bool setRightWaterMark(const char* strWaterMark, uint32_t ulen);
 #else
-	bool setRightWaterMark(const wchar_t* strWaterMark, size_t ulen);
+	bool setRightWaterMark(const wchar_t* strWaterMark, uint32_t ulen);
 #endif
 
 	bool EndRecord();