减少捕获音视频时申请内存次数

减少音频视频捕获过程中频繁申请内存。
This commit is contained in:
yuanyuanxiang
2019-01-22 20:44:23 +08:00
parent 4283a31e66
commit bd7b9ed492
11 changed files with 63 additions and 36 deletions

View File

@@ -815,11 +815,6 @@ VOID CMy2015RemoteDlg::Activate(int nPort,int nMaxConnection)
{
m_iocpServer = new IOCPServer; //<2F><>̬<EFBFBD><CCAC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ǵ<EFBFBD><C7B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
if (m_iocpServer==NULL)
{
return;
}
if (m_iocpServer->StartServer(NotifyProc, OfflineProc, nPort)==FALSE)
{
OutputDebugStringA("======> StartServer Failed \n");

View File

@@ -33,8 +33,7 @@ CAudio::CAudio()
m_ulBufferLength = 1000;
int i = 0;
for (i = 0; i < 2; ++i)
for (int i = 0; i < 2; ++i)
{
m_InAudioData[i] = new BYTE[m_ulBufferLength];
m_InAudioHeader[i] = new WAVEHDR;

View File

@@ -12,7 +12,8 @@ CCpuUsage::CCpuUsage()
CCpuUsage::~CCpuUsage()
{
PdhCloseQuery(m_hQuery); //<2F>رռ<D8B1><D5BC><EFBFBD><EFBFBD><EFBFBD>
delete m_pCounterStruct;
if (m_pCounterStruct)
delete m_pCounterStruct;
}