Explorar o código

Z991239-5559 #comment 优化双录流程

80274480 hai 1 ano
pai
achega
ce6998248c

+ 1 - 1
Module/mod_localmediaplay/mod_localmediaplay.cpp

@@ -819,7 +819,7 @@ void CLocalMediaPlayEntity::MediaPlayFinished(int iMediaType)
 		VideoPlayRet ret;
 		ret.VideoNames = m_lastPlayVideo.c_str();
 		ret.ret = true;
-		DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("stop play video notice %s success.", ret.VideoNames.GetData());
+		DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("stop play video notice %s success.", ret.VideoNames.GetData());
 		SpSendBroadcast(GetFunction(), eMsg_VideoPlayRet, eMsgSig_VideoPlayRet, ret);
 	}
 }

+ 1 - 1
Other/unix/libaudioqueue/libaudioqueue.h

@@ -21,7 +21,7 @@
 
 using namespace std ;
 
-#define MAX_AUDIOQUEUE_LENS     50					//音频队列最大节点数量
+#define MAX_AUDIOQUEUE_LENS     45					//音频队列最大节点数量
 #define MAX_AUDIOQNODE_SIZE     16000				//音频队列单个节点默认最大长度
 
 typedef struct audio_frame 

+ 39 - 77
Other/unix/libvideorecord/libvideorecord_impl.cpp

@@ -127,11 +127,11 @@ static bool FindMatchedFile(const char* sFindPath, const char* sFindFileName, st
 
 static bool ReNameFile(const char* file, const char* newfilename)
 {
-#ifdef _WIN32
+#ifdef RVC_OS_WIN
 	if (!_access(file, 0))
 #else
 	if (!access(file, F_OK))
-#endif //_WIN32
+#endif //RVC_OS_WIN
 	{
 		if (!rename(file, newfilename)){
 			return true;
@@ -1262,28 +1262,20 @@ int libvideorecord_impl::GetDoubleCameraVideoFrameData(videoq_frame* Video, int
 }
 
 
-bool libvideorecord_impl::IsRecordingCamError(int iRecordingCam, eRvcRecordType eRecordType)
+bool libvideorecord_impl::IsRecordingCamError(int iRecordingCam)
 {
 	bool bRet = false;
-	if (eStand2Agent == eRecordType) {
-		if (0 == iRecordingCam) {
-			if ('E' == m_pHostApi->GetCameraState() || 'B' == m_pHostApi->GetCameraState()) {
-				bRet = true;
-			}
-		}
-		else {
-			if ('O' == m_pHostApi->GetCameraState() || 'B' == m_pHostApi->GetCameraState() || 'E' == m_pHostApi->GetCameraState()) {
-				bRet = true;
-			}
+	if (0 == iRecordingCam) {
+		if ('E' == m_pHostApi->GetCameraState() || 'B' == m_pHostApi->GetCameraState()) {
+			bRet = true;
 		}
 	}
 	else {
-		if ('B' == m_pHostApi->GetCameraState()) {
+		if ('O' == m_pHostApi->GetCameraState() || 'B' == m_pHostApi->GetCameraState() || 'E' == m_pHostApi->GetCameraState()) {
 			bRet = true;
 		}
 	}
 
-
 	return bRet;
 }
 
@@ -1885,23 +1877,6 @@ int libvideorecord_impl::WriteVideoFrame()
 				return -1;
 			}
 		}
-		else {
-			if (IsRecordingCamError(nInitActiveCam, eSingleSide)) {
-				LogFailedEvent(eVideoGetFailed, "recording camera error!");
-				return -1;
-			}
-			else {
-				struct timespec ts;
-				clock_gettime(CLOCK_REALTIME, &ts);
-				long unsec = ts.tv_nsec + (1000 * 1000 * 2);
-				ts.tv_sec += (unsec / 1000000000);
-				ts.tv_nsec = (unsec % 1000000000);
-				if (0 != sem_timedwait(&m_semt, &ts) && (ETIMEDOUT == errno)) {
-
-				}
-				return -2;
-			}
-		}
 	}
 
 	return iret;
@@ -2032,32 +2007,6 @@ bool libvideorecord_impl::GetSingleSideAudioFrame()
 }
 
 
-bool libvideorecord_impl::AddMuteAudioFrame(bool bLocal, int iAudioFrameSize)
-{
-	bool bRet = false;
-
-	if (0 == iAudioFrameSize) {
-		return bRet;
-	}
-
-	if (bLocal) {
-		memset(m_pRecordAudioBuffer + m_iAudioBufferLen, 0, iAudioFrameSize);
-		m_iAudioBufferLen += iAudioFrameSize;
-		m_iAudioFromQueNum++;
-		m_pHostApi->Debug(RECORD_LOG_INFO, "m_iAudioFromQueNum is %d(Mute AudioFrame).", m_iAudioFromQueNum);
-		bRet = true;
-	}
-	else {
-		memset(m_pRemoteAudioBuffer + m_iRemoteAudioBufLen, 0, iAudioFrameSize);
-		m_iRemoteAudioBufLen += iAudioFrameSize;
-		m_iRemoteAudioNum++;
-		m_pHostApi->Debug(RECORD_LOG_INFO, "m_iRemoteAudioNum is %d(Mute Audio Frame).", m_iRemoteAudioNum);
-		bRet = true;
-	}
-
-	return bRet;
-}
-
 bool libvideorecord_impl::GetRecordAudioFrame()
 {
 	bool bRet = false;
@@ -2070,32 +2019,45 @@ bool libvideorecord_impl::GetRecordAudioFrame()
 		int nAudioLens = m_audioqueue->GetAudioLens();
 		int nRemoteAudioLens = m_remote_audioqueue->GetAudioLens();
 		m_pHostApi->Debug(RECORD_LOG_DEBUG,"current local audio length is %d, and remote audio length is %d.", nAudioLens, nRemoteAudioLens);
-		//1. 取本地音频
-		if (m_iAudioBufferLen < m_iAudioPerSecBufLen) {
-			if (nAudioLens > 0) {//取到本地音频
+		if ((nAudioLens > 0) && (nRemoteAudioLens <= 0)) {
+			if (m_iAudioBufferLen < m_iAudioPerSecBufLen) {	//取出音频
 				bRet = GetLocalAudioFrame(nAudioLens);
 			}
-			else {//本地音频队列为空,用静音填充
-				bRet = AddMuteAudioFrame(true, m_iAudioPerSecBufLen/50);
-			}
 		}
-
-		//2. 取远端音频
-		if (m_iRemoteAudioBufLen < m_iAudioPerSecBufLen) {  
-			if (nRemoteAudioLens > 0) {
+		else if ((nAudioLens > 0) && (nRemoteAudioLens > 0)) {
+			if (m_iRemoteAudioBufLen < m_iAudioPerSecBufLen) {  //收到的远端音频不够1秒
 				bRet = GetRemoteAudioFrame(nRemoteAudioLens);	//取远端音频
 			}
-			else{
-				bRet = AddMuteAudioFrame(false, m_iAudioPerSecBufLen / 50);
+
+			if (m_iAudioBufferLen < m_iAudioPerSecBufLen) {
+				bRet = GetLocalAudioFrame(nAudioLens);	//本地音频
+			}
+			//混音
+			if ((m_iRemoteAudioBufLen == m_iAudioPerSecBufLen) && (m_iAudioBufferLen == m_iAudioPerSecBufLen)) {
+				//可视远程双录场景,本地和坐席端分别录制到左右声道
+				uint32_t uOutlen = BindPCMAudioData(m_iRecordAudioBufSize, m_pRecordAudioBuffer, m_iAudioBufferLen, m_pRemoteAudioBuffer, m_iRemoteAudioBufLen, m_audioframe->bitspersample / 8, eLocalLeft);
+				m_pHostApi->Debug(RECORD_LOG_DEBUG, "double channel buffer length is %d, local buffer len is %d, remote buffer len is %d.", m_iRecordAudioBufSize, m_iAudioBufferLen, m_iRemoteAudioBufLen);
+				m_iAudioBufferLen = uOutlen;
 			}
 		}
+		else if ((nAudioLens <= 0) && (nRemoteAudioLens > 0)) {  //本地端无数据不混音,双录语音播报场景
+			if (m_iAudioBufferLen < m_iAudioPerSecBufLen) {		 //取出音频
+				m_audioframe->data = m_pRecordAudioBuffer + m_iAudioBufferLen;
+				bool bGetAudio = false;
+				if (nRemoteAudioLens <= MAX_AUDIOQUEUE_LENS && nRemoteAudioLens > 1) {
+					bGetAudio = m_remote_audioqueue->GetAudioAndDel(m_audioframe);
+				}
+				else {
+					bGetAudio = m_remote_audioqueue->GetAudio(m_audioframe);
+				}
 
-		//3. 可视远程双录场景,本地和坐席端分别录制到左右声道
-		if ((m_iRemoteAudioBufLen == m_iAudioPerSecBufLen) && (m_iAudioBufferLen == m_iAudioPerSecBufLen)) {
-			
-			uint32_t uOutlen = BindPCMAudioData(m_iRecordAudioBufSize, m_pRecordAudioBuffer, m_iAudioBufferLen, m_pRemoteAudioBuffer, m_iRemoteAudioBufLen, m_audioframe->bitspersample / 8, eLocalLeft);
-			m_pHostApi->Debug(RECORD_LOG_DEBUG, "double channel buffer length is %d, local buffer len is %d, remote buffer len is %d.", m_iRecordAudioBufSize, m_iAudioBufferLen, m_iRemoteAudioBufLen);
-			m_iAudioBufferLen = uOutlen;
+				if (bGetAudio) {
+					m_pHostApi->Debug(RECORD_LOG_DEBUG,"remote audio series number is %d, channels is %d, samplespersec is %d.", m_audioframe->iseriesnumber, m_audioframe->nchannels, m_audioframe->samplespersec);
+					m_iAudioBufferLen += m_audioframe->framesize;
+					m_iAudioFromQueNum++;
+					m_pHostApi->Debug(RECORD_LOG_DEBUG,"m_iAudioFromQueNum is %d.", m_iAudioFromQueNum);
+				}
+			}
 		}
 	}
 	m_pHostApi->Debug(RECORD_LOG_DEBUG, "current m_iAudioBufferLen = %d, m_iAudioPerSecBufLen = %d.", m_iAudioBufferLen, m_iAudioPerSecBufLen);
@@ -2115,7 +2077,7 @@ int libvideorecord_impl::WriteAudioFrame()
 
 		m_iAudioBufferLen = 0;
 		m_iRemoteAudioBufLen = 0;
-		memset((void*)m_pRecordAudioBuffer, 0, m_iRecordAudioBufSize);
+		memset(m_pRecordAudioBuffer, 0, m_iRecordAudioBufSize);
 		if (NULL != m_pRemoteAudioBuffer) {
 			memset(m_pRemoteAudioBuffer, 0, m_iAudioPerSecBufLen);
 		}

+ 2 - 2
Other/unix/libvideorecord/libvideorecord_impl.h

@@ -1,5 +1,6 @@
 #pragma once
 #include "FFmpegWriter.h"
+//#include "WmvWriter.h"
 #include "libvideorecord.h"
 
 #include "libaudioqueue.h"
@@ -63,7 +64,7 @@ private:
 	int GetVideoFrameSize(int& nWidth, int& nHeight, Clibvideoqueue* queue);
 	//从指定队列读取video
 	bool GetVideoFrame(video_frame* Video, int flags, Clibvideoqueue* queue);
-	bool IsRecordingCamError(int iRecordingCam, eRvcRecordType eRecordType = eStand2Agent);
+	bool IsRecordingCamError(int iRecordingCam);
 	bool InitCvxText();
 	void GetVideoFullName();
 	bool AddCvxText(unsigned char** pData, int iDataSize, int iWidth, int iHeight);
@@ -107,7 +108,6 @@ private:
 	bool ReSetRecordParams();
 	bool InitVideoRecordParams();
 	int HandleLeftAudioData();
-	bool AddMuteAudioFrame(bool bLocal, int iAudioFrameSize);
 
 
 private:

+ 1 - 1
Other/win/libaudioqueue/libaudioqueue.h

@@ -15,7 +15,7 @@
 
 using namespace std ;
 
-#define MAX_AUDIOQUEUE_LENS     50					//音频队列最大节点数量
+#define MAX_AUDIOQUEUE_LENS     45					//音频队列最大节点数量
 #define MAX_AUDIOQNODE_SIZE     16000				//音频队列单个节点默认最大长度
 
 typedef struct audio_frame 

+ 86 - 65
Other/win/libvideorecord/libvideorecord_impl.cpp

@@ -2,13 +2,18 @@
 #include "libvideorecord_impl.h"
 #include "videoutil.h"
 #include "io.h"
+//#include <windowsx.h>
 #include <stdint.h>
 #include <stdio.h>
 #include <process.h>
 #include <string.h>
 #include <timeapi.h>
+//#include <windows.h>	//包含头文件 windows.h
+//#include <MMSystem.h>
 #pragma comment(lib, "winmm.lib")
-
+//#include <DbgHelp.h>
+//#pragma comment(lib, "dbghelp.lib")
+//#pragma comment(lib, "WMVCORE.lib")
 #ifndef RECORD_SAFE_DELETE
 #define RECORD_SAFE_DELETE(p) \
 			do{ \
@@ -29,20 +34,15 @@
 
 static bool ReNameFile(const char* file, const char* newfilename)
 {
-#ifdef _WIN32
-	if (!_access(file, 0))
-#else
-	if (!access(file, F_OK))
-#endif //_WIN32
-	{
-		if (!rename(file, newfilename)){
+	if (!_access(file, 0)) {
+		if (!rename(file, newfilename)) {
 			return true;
 		}
-		else{
+		else {
 			return false;
 		}
 	}
-	else{
+	else {
 		return false;
 	}
 }
@@ -62,7 +62,7 @@ static uint32_t BindPCMAudioData(uint32_t uBufferLen, char* pLocalAudios, uint32
 		memset(pLocalAudios, 0, uBufferLen);
 	}
 
-	for (uint32_t i = 0; i < uLocalAudioLen / uBitDeepth; i++) {
+	for (int i = 0; i < uLocalAudioLen / uBitDeepth; i++) {
 		if (eLocalLeft == eType) {
 			memcpy((uint32_t*)pLocalAudios + i, ((uint16_t*)(pBuffer)) + i, uBitDeepth);
 			uint16_t* pindex = (uint16_t*)((uint32_t*)pLocalAudios + i) + 1;
@@ -353,6 +353,41 @@ static void DeleteDumpFiles()
 }
 
 
+//static void videorecorddump_exception(PEXCEPTION_POINTERS ExceptionInfo, libvideorecord_impl* pVideoRecord)
+//{
+//	if (NULL != pVideoRecord) {
+//		pVideoRecord->EndRecord();
+//		if (NULL != pVideoRecord->m_pHostApi) {
+//			pVideoRecord->m_pHostApi->Debug(RECORD_LOG_ERROR, "VideoRecord Thread Exception.");
+//			pVideoRecord->m_pHostApi->OnRecordEntityExcption();
+//		}
+//	}
+//
+//	DeleteDumpFiles();
+//
+//	char tmp[MAX_PATH] = { 0 };
+//	HANDLE hDumpFile;
+//	sprintf_s(tmp, MAX_PATH, ".\\videorecord_%d.dmp", GetCurrentProcessId());
+//	hDumpFile = CreateFileA(tmp, GENERIC_READ | GENERIC_WRITE,
+//		0, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
+//	if ((hDumpFile != NULL) && (hDumpFile != INVALID_HANDLE_VALUE))
+//	{
+//		MINIDUMP_EXCEPTION_INFORMATION mdei;
+//		MINIDUMP_TYPE mdt;
+//
+//		mdei.ThreadId = GetCurrentThreadId();
+//		mdei.ExceptionPointers = ExceptionInfo;
+//		mdei.ClientPointers = false;
+//
+//		mdt = MiniDumpWithFullMemory;
+//
+//		MiniDumpWriteDump(GetCurrentProcess(), GetCurrentProcessId(),
+//			hDumpFile, mdt, (ExceptionInfo != 0) ? &mdei : 0, 0, 0);
+//
+//		CloseHandle(hDumpFile);
+//	}
+//}
+
 
 static void __recordlog(void* user_data, const char* fmt, va_list arg)
 {
@@ -369,11 +404,16 @@ static void __recordlog(void* user_data, const char* fmt, va_list arg)
 //视频录制线程
 static unsigned int __stdcall VideoRecordThread(LPVOID n)
 {
-	int iRet = -1;
-
 	libvideorecord_impl* Record = (libvideorecord_impl*)n;
+	int iRet = -1;
 
+	//__try 
+	//{
 	iRet = Record->VideoRecord();
+	//}
+	//__except (videorecorddump_exception(GetExceptionInformation(), Record), EXCEPTION_EXECUTE_HANDLER) {
+
+	//}
 
 	return iRet;
 }
@@ -1019,7 +1059,7 @@ int libvideorecord_impl::GetStand2SVideoFrameData(videoq_frame* Video, int flags
 		delete tmp_frm;
 	}
 	else{
-		m_pHostApi->Debug(RECORD_LOG_ERROR, "nActiveCam value is not valid, and it's value is %d.", nActiveCam);
+		m_pHostApi->Debug(RECORD_LOG_DEBUG, "nActiveCam value is not valid, and it's value is %d.", nActiveCam);
 		return -4;
 	}
 
@@ -1802,7 +1842,6 @@ bool libvideorecord_impl::GetLocalAudioFrame(int iAudioLens)
 			bRet = true;
 		}
 		else {
-			m_pHostApi->Debug(RECORD_LOG_ERROR, "not support audio sample rate, and audio samplespersec=%d,framesize=%d,channels=%d,format=%d,bitspersample=%d,series number=%d.", m_audioframe->samplespersec, m_audioframe->framesize, m_audioframe->nchannels, m_audioframe->format, m_audioframe->bitspersample, m_audioframe->iseriesnumber);
 			LogFailedEvent(eSampNotSupport, "not support audio sample rate.");
 		}
 	}
@@ -1838,32 +1877,6 @@ bool libvideorecord_impl::GetSingleSideAudioFrame()
 }
 
 
-bool libvideorecord_impl::AddMuteAudioFrame(bool bLocal, int iAudioFrameSize)
-{
-	bool bRet = false;
-
-	if (0 == iAudioFrameSize) {
-		return bRet;
-	}
-
-	if (bLocal) {
-		memset(m_pRecordAudioBuffer + m_iAudioBufferLen, 0, iAudioFrameSize);
-		m_iAudioBufferLen += iAudioFrameSize;
-		m_iAudioFromQueNum++;
-		m_pHostApi->Debug(RECORD_LOG_INFO, "m_iAudioFromQueNum is %d(Mute AudioFrame).", m_iAudioFromQueNum);
-		bRet = true;
-	}
-	else {
-		memset(m_pRemoteAudioBuffer + m_iRemoteAudioBufLen, 0, iAudioFrameSize);
-		m_iRemoteAudioBufLen += iAudioFrameSize;
-		m_iRemoteAudioNum++;
-		m_pHostApi->Debug(RECORD_LOG_INFO, "m_iRemoteAudioNum is %d(Mute Audio Frame).", m_iRemoteAudioNum);
-		bRet = true;
-	}
-
-	return bRet;
-}
-
 bool libvideorecord_impl::GetRecordAudioFrame()
 {
 	bool bRet = false;
@@ -1876,32 +1889,44 @@ bool libvideorecord_impl::GetRecordAudioFrame()
 		int nAudioLens = m_audioqueue->GetAudioLens();
 		int nRemoteAudioLens = m_remote_audioqueue->GetAudioLens();
 		m_pHostApi->Debug(RECORD_LOG_DEBUG,"current local audio length is %d, and remote audio length is %d.", nAudioLens, nRemoteAudioLens);
-		//1. 取本地音频
-		if (m_iAudioBufferLen < m_iAudioPerSecBufLen) {
-			if (nAudioLens > 0) {//取到本地音频
+		if ((nAudioLens > 0) && (nRemoteAudioLens <= 0)) {
+			if (m_iAudioBufferLen < m_iAudioPerSecBufLen) {	//取出音频
 				bRet = GetLocalAudioFrame(nAudioLens);
 			}
-			else {//本地音频队列为空,用静音填充
-				bRet = AddMuteAudioFrame(true, m_iAudioPerSecBufLen/50);
-			}
 		}
-
-		//2. 取远端音频
-		if (m_iRemoteAudioBufLen < m_iAudioPerSecBufLen) {  
-			if (nRemoteAudioLens > 0) {
+		else if ((nAudioLens > 0) && (nRemoteAudioLens > 0)) {
+			if (m_iRemoteAudioBufLen < m_iAudioPerSecBufLen) {  //收到的远端音频不够1秒
 				bRet = GetRemoteAudioFrame(nRemoteAudioLens);	//取远端音频
 			}
-			else{
-				bRet = AddMuteAudioFrame(false, m_iAudioPerSecBufLen / 50);
+
+			if (m_iAudioBufferLen < m_iAudioPerSecBufLen) {
+				bRet = GetLocalAudioFrame(nAudioLens);	//本地音频
+			}
+			if ((m_iRemoteAudioBufLen == m_iAudioPerSecBufLen) && (m_iAudioBufferLen == m_iAudioPerSecBufLen)) {
+				//可视远程双录场景,本地和坐席端分别录制到左右声道
+				uint32_t uOutlen = BindPCMAudioData(m_iRecordAudioBufSize, m_pRecordAudioBuffer, m_iAudioBufferLen, m_pRemoteAudioBuffer, m_iRemoteAudioBufLen, m_audioframe->bitspersample / 8, eLocalLeft);
+				m_pHostApi->Debug(RECORD_LOG_DEBUG, "double channel buffer length is %d, local buffer len is %d, remote buffer len is %d.", m_iRecordAudioBufSize, m_iAudioBufferLen, m_iRemoteAudioBufLen);
+				m_iAudioBufferLen = uOutlen;
 			}
 		}
+		else if ((nAudioLens <= 0) && (nRemoteAudioLens > 0)) {  //本地端无数据不混音,双录语音播报场景
+			if (m_iAudioBufferLen < m_iAudioPerSecBufLen) {		 //取出音频
+				m_audioframe->data = m_pRecordAudioBuffer + m_iAudioBufferLen;
+				bool bGetAudio = false;
+				if (nRemoteAudioLens <= MAX_AUDIOQUEUE_LENS && nRemoteAudioLens > 1) {
+					bGetAudio = m_remote_audioqueue->GetAudioAndDel(m_audioframe);
+				}
+				else {
+					bGetAudio = m_remote_audioqueue->GetAudio(m_audioframe);
+				}
 
-		//3. 可视远程双录场景,本地和坐席端分别录制到左右声道
-		if ((m_iRemoteAudioBufLen == m_iAudioPerSecBufLen) && (m_iAudioBufferLen == m_iAudioPerSecBufLen)) {
-			
-			uint32_t uOutlen = BindPCMAudioData(m_iRecordAudioBufSize, m_pRecordAudioBuffer, m_iAudioBufferLen, m_pRemoteAudioBuffer, m_iRemoteAudioBufLen, m_audioframe->bitspersample / 8, eLocalLeft);
-			m_pHostApi->Debug(RECORD_LOG_DEBUG, "double channel buffer length is %d, local buffer len is %d, remote buffer len is %d.", m_iRecordAudioBufSize, m_iAudioBufferLen, m_iRemoteAudioBufLen);
-			m_iAudioBufferLen = uOutlen;
+				if (bGetAudio) {
+					m_pHostApi->Debug(RECORD_LOG_DEBUG,"remote audio series number is %d, channels is %d, samplespersec is %d.", m_audioframe->iseriesnumber, m_audioframe->nchannels, m_audioframe->samplespersec);
+					m_iAudioBufferLen += m_audioframe->framesize;
+					m_iAudioFromQueNum++;
+					m_pHostApi->Debug(RECORD_LOG_DEBUG,"m_iAudioFromQueNum is %d.", m_iAudioFromQueNum);
+				}
+			}
 		}
 	}
 	m_pHostApi->Debug(RECORD_LOG_DEBUG, "current m_iAudioBufferLen = %d, m_iAudioPerSecBufLen = %d.", m_iAudioBufferLen, m_iAudioPerSecBufLen);
@@ -1943,17 +1968,13 @@ bool libvideorecord_impl::InitVideoRecordParams()
 
 	//获取视频帧大小
 	if (!GetRecordVideoFrameSize()) {
-		if (false == m_bStopRecord) {
-			LogFailedEvent(eVideoGetFailed, "Get Video Frame Failed Max Times.", true);
-		}
+		LogFailedEvent(eVideoGetFailed, "Get Video Frame Failed Max Times.", true);
 		return bRet;
 	}
 
 	//获取音频帧大小
 	if (!GetRecordAudioFrameSize()) {
-		if (false == m_bStopRecord) {
-			LogFailedEvent(eLocalAudioGetFailed, "Get Audio Frame Failed Max Times.", true);
-		}
+		LogFailedEvent(eLocalAudioGetFailed, "Get Audio Frame Failed Max Times.", true);
 		return bRet;
 	}
 

+ 0 - 1
Other/win/libvideorecord/libvideorecord_impl.h

@@ -106,7 +106,6 @@ private:
 	bool ReSetRecordParams();
 	bool InitVideoRecordParams();
 	int HandleLeftAudioData();
-	bool AddMuteAudioFrame(bool bLocal, int iAudioFrameSize);
 
 
 private: