Skip to content

Commit a82d886

Browse files
committed
modify:match xengine last version
1 parent 00b02d0 commit a82d886

File tree

4 files changed

+14
-13
lines changed

4 files changed

+14
-13
lines changed

README.en.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ Modify the database configuration in XSQL in the configuration file to your
8383
The default configuration does not enable database support. If the database interface is required, you need to enable the database yourself
8484

8585
#### Windows
86-
need to vcpkg configure third-part env.refer vcpkg install guide.after installed and execution:vcpkg.exe install lua:x86-windows opencv[contrib]:x86-windows libqrencode:x86-windows lua:x64-windows opencv[contrib]:x64-windows libqrencode:x64-windows
86+
need to vcpkg configure third-part env.refer vcpkg install guide.after installed and execution:vcpkg.exe install lua:x86-windows opencv[contrib,freetype]:x86-windows libqrencode:x86-windows lua:x64-windows opencv[contrib,freetype]:x64-windows libqrencode:x64-windows
8787
use vs open and compile,suport windows 7sp1 and above
8888
Just Run it
8989

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ git clone https://gitee.com/xengine/XEngine_IPMacData.git XEngine_Source/XEngine
9595
git clone https://gitee.com/xengine/XEngine_PhoneData.git XEngine_Source/XEngine_DependLibrary/XEngine_PhoneData
9696

9797
#### Windows
98-
需要vcpkg配置第三方环境,具体参考vcpkg安装方式,安装好后执行:vcpkg.exe install lua:x86-windows opencv[contrib]:x86-windows libqrencode:x86-windows lua:x64-windows opencv[contrib]:x64-windows libqrencode:x64-windows
98+
需要vcpkg配置第三方环境,具体参考vcpkg安装方式,安装好后执行:vcpkg.exe install lua:x86-windows opencv[contrib,freetype]:x86-windows libqrencode:x86-windows lua:x64-windows opencv[contrib,freetype]:x64-windows libqrencode:x64-windows
9999
使用VS打开并且编译,支持WINDOWS 7SP1以上系统
100100
直接运行即可
101101

XEngine_Source/XEngine_ServiceApp/XEngine_HttpApp/XEngine_TaskPost/TaskPost_BackService.cpp

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,16 @@ static XHANDLE xhPacket = NULL;
99
static XHANDLE xhAudioFifo = NULL;
1010
static XNETHANDLE xhFilter = 0;
1111

12-
void XCALLBACK HTTPTask_TaskPost_CBVideo(uint8_t* ptszAVBuffer, int nAVLen, AVCODEC_TIMESTAMP* pSt_TimeInfo, XPVOID lParam)
12+
void XCALLBACK HTTPTask_TaskPost_CBVideo(AVCODEC_VIDEO_MSGBUFFER* pSt_MSGBuffer, XPVOID lParam)
1313
{
1414
int nListCount = 0;
1515
AVCODEC_VIDEO_MSGBUFFER** ppSt_MSGBuffer;
16-
VideoCodec_Stream_EnCodec(xhVideo, ptszAVBuffer, nAVLen, &ppSt_MSGBuffer, &nListCount);
16+
pSt_MSGBuffer->st_TimeStamp = {};
17+
VideoCodec_Stream_EnCodec(xhVideo, pSt_MSGBuffer, &ppSt_MSGBuffer, &nListCount);
1718
for (int i = 0; i < nListCount; i++)
1819
{
19-
AVFormat_Packet_StreamWrite(xhPacket, 0, ppSt_MSGBuffer[i]->ptszAVBuffer, ppSt_MSGBuffer[i]->nAVLen, &ppSt_MSGBuffer[i]->st_TimeStamp);
20-
BaseLib_Memory_FreeCStyle((XPPMEM)&ppSt_MSGBuffer[i]->ptszAVBuffer);
20+
AVFormat_Packet_StreamWrite(xhPacket, 0, ppSt_MSGBuffer[i]->st_MSGBuffer.unData.ptszMSGBuffer, ppSt_MSGBuffer[i]->st_MSGBuffer.nMSGLen[0], &ppSt_MSGBuffer[i]->st_TimeStamp);
21+
BaseLib_Memory_MSGFree(&ppSt_MSGBuffer[i]->st_MSGBuffer);
2122
}
2223
BaseLib_Memory_Free((XPPPMEM)&ppSt_MSGBuffer, nListCount);
2324
}
@@ -41,14 +42,14 @@ void XCALLBACK HTTPTask_TaskPost_CBAudio(AVCODEC_AUDIO_MSGBUFFER* pSt_MSGBuffer,
4142
AudioCodec_Stream_EnCodec(xhAudio, &st_MSGBuffer, &ppSt_AudioBuffer, &nAudioCount);
4243
for (int j = 0; j < nAudioCount; j++)
4344
{
44-
AVFormat_Packet_StreamWrite(xhPacket, 1, ppSt_AudioBuffer[j]->ptszMSGBuffer[0], ppSt_AudioBuffer[j]->nMSGLen[0], &ppSt_AudioBuffer[j]->st_TimeStamp);
45+
AVFormat_Packet_StreamWrite(xhPacket, 1, ppSt_AudioBuffer[j]->st_MSGBuffer.unData.ptszMSGArray[0], ppSt_AudioBuffer[j]->st_MSGBuffer.nMSGLen[0], &ppSt_AudioBuffer[j]->st_TimeStamp);
46+
BaseLib_Memory_MSGFree(&ppSt_AudioBuffer[j]->st_MSGBuffer);
4547
}
46-
AudioCodec_Stream_Free(&ppSt_AudioBuffer, nAudioCount);
47-
AudioCodec_Stream_FreeBuffer(&st_MSGBuffer);
48+
BaseLib_Memory_Free((XPPPMEM)&ppSt_AudioBuffer, nAudioCount);
4849
}
50+
BaseLib_Memory_MSGFree(&ppSt_MSGBuffer[i]->st_MSGBuffer);
4951
}
50-
AudioCodec_Stream_Free(&ppSt_MSGBuffer, nListCount);
51-
AudioCodec_Stream_FreeBuffer(pSt_MSGBuffer);
52+
BaseLib_Memory_Free((XPPPMEM)&ppSt_MSGBuffer, nListCount);
5253
}
5354

5455
bool HTTPTask_TaskPost_BackService(LPCXSTR lpszClientAddr, LPCXSTR lpszMsgBuffer, int nMsgLen, int nType)
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#pragma once
2-
void XCALLBACK HTTPTask_TaskPost_CBVideo(uint8_t* ptszAVBuffer, int nAVLen, AVCODEC_TIMESTAMP* pSt_TimeInfo, XPVOID lParam);
3-
void XCALLBACK HTTPTask_TaskPost_CBAudio(AVCODEC_AUDIO_MSGBUFFER* pSt_MSGBuffer, XPVOID lParam);
2+
void XCALLBACK HTTPTask_TaskPost_CBVideo(XENGINE_MSGBUFFER* pSt_MSGBuffer, AVCODEC_TIMESTAMP* pSt_TimeInfo, int nNBSample, int nSampleFmt, XPVOID lParam);
3+
void XCALLBACK HTTPTask_TaskPost_CBAudio(XENGINE_MSGBUFFER* pSt_MSGBuffer, AVCODEC_TIMESTAMP* pSt_TimeInfo, int nNBSample, int nSampleFmt, XPVOID lParam);
44

55
bool HTTPTask_TaskPost_BackService(LPCXSTR lpszClientAddr, LPCXSTR lpszMsgBuffer, int nMsgLen, int nType);

0 commit comments

Comments
 (0)