Skip to content

Commit e972fbc

Browse files
committed
fixed:rtp unprotocol failure
modify:rtp protocol support
1 parent 2e635c5 commit e972fbc

File tree

8 files changed

+243
-17
lines changed

8 files changed

+243
-17
lines changed

XEngine_Source/XEngine_ModuleHelp/ModuleHelp_SRtp/ModuleHelp_SRTPCore.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ bool CModuleHelp_SRTPCore::ModuleHelp_SRTPCore_RTPINProtect(XCHAR* ptszMSGBuffer
141141
ModuleHelp_IsErrorOccur = false;
142142

143143
#if 1 == _XENGINE_STREAMMEDIA_BUILDSWITCH_RTC
144-
144+
145145
int nRet = srtp_protect(st_SRTPCore.pSt_SRTPSendCtx, ptszMSGBuffer, pInt_MSGLen);
146146
if (srtp_err_status_ok != nRet)
147147
{
@@ -177,7 +177,7 @@ bool CModuleHelp_SRTPCore::ModuleHelp_SRTPCore_RTPUNProtect(XCHAR* ptszMSGBuffer
177177

178178
#if 1 == _XENGINE_STREAMMEDIA_BUILDSWITCH_RTC
179179

180-
int nRet = srtp_unprotect(st_SRTPCore.pSt_SRTPSendCtx, ptszMSGBuffer, pInt_MSGLen);
180+
int nRet = srtp_unprotect(st_SRTPCore.pSt_SRTPRecvCtx, ptszMSGBuffer, pInt_MSGLen);
181181
if (srtp_err_status_ok != nRet)
182182
{
183183
ModuleHelp_IsErrorOccur = true;
@@ -212,7 +212,7 @@ bool CModuleHelp_SRTPCore::ModuleHelp_SRTPCore_RTCPINProtect(XCHAR* ptszMSGBuffe
212212

213213
#if 1 == _XENGINE_STREAMMEDIA_BUILDSWITCH_RTC
214214

215-
int nRet = srtp_protect_rtcp(st_SRTPCore.pSt_SRTPRecvCtx, ptszMSGBuffer, pInt_MSGLen);
215+
int nRet = srtp_protect_rtcp(st_SRTPCore.pSt_SRTPSendCtx, ptszMSGBuffer, pInt_MSGLen);
216216
if (srtp_err_status_ok != nRet)
217217
{
218218
ModuleHelp_IsErrorOccur = true;

XEngine_Source/XEngine_ModuleSession/ModuleSession_Define.h

Lines changed: 49 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -918,4 +918,52 @@ extern "C" bool ModuleSession_PushStream_RTCAddrSet(LPCXSTR lpszClientUser, LPCX
918918
意思:是否成功
919919
备注:
920920
*********************************************************************/
921-
extern "C" bool ModuleSession_PushStream_RTCAddrGet(LPCXSTR lpszClientAddr, XCHAR* ptszClientUser);
921+
extern "C" bool ModuleSession_PushStream_RTCAddrGet(LPCXSTR lpszClientAddr, XCHAR* ptszClientUser);
922+
/********************************************************************
923+
函数名称:ModuleSession_PushStream_RTCIndexSet
924+
函数功能:设置RTP包媒体索引
925+
参数.一:lpszClientUser
926+
In/Out:In
927+
类型:常量字符指针
928+
可空:N
929+
意思:输入要操作的客户端
930+
参数.二:nVideoIndex
931+
In/Out:In
932+
类型:整数型
933+
可空:N
934+
意思:输入RTP的包视频索引
935+
参数.三:nAudioIndex
936+
In/Out:In
937+
类型:整数型
938+
可空:N
939+
意思:输入RTP的包音频索引
940+
返回值
941+
类型:逻辑型
942+
意思:是否成功
943+
备注:
944+
*********************************************************************/
945+
extern "C" bool ModuleSession_PushStream_RTCIndexSet(LPCXSTR lpszClientUser, int nVideoIndex, int nAudioIndex);
946+
/********************************************************************
947+
函数名称:ModuleSession_PushStream_RTCIndexGet
948+
函数功能:获取RTP包媒体索引
949+
参数.一:lpszClientAddr
950+
In/Out:In
951+
类型:常量字符指针
952+
可空:N
953+
意思:输入要操作的客户端
954+
参数.二:pInt_VideoIndex
955+
In/Out:Out
956+
类型:整数型指针
957+
可空:N
958+
意思:输出RTP的包视频索引
959+
参数.三:pInt_AudioIndex
960+
In/Out:Out
961+
类型:整数型指针
962+
可空:N
963+
意思:输出RTP的包音频索引
964+
返回值
965+
类型:逻辑型
966+
意思:是否成功
967+
备注:
968+
*********************************************************************/
969+
extern "C" bool ModuleSession_PushStream_RTCIndexGet(LPCXSTR lpszClientAddr, int* pInt_VideoIndex, int* pInt_AudioIndex);

XEngine_Source/XEngine_ModuleSession/ModuleSession_PushStream/ModuleSession_PushStream.cpp

Lines changed: 125 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -961,18 +961,27 @@ bool CModuleSession_PushStream::ModuleSession_PushStream_RTCAddrGet(LPCXSTR lpsz
961961
Session_dwErrorCode = ERROR_STREAMMEDIA_MODULE_SESSION_PARAMENT;
962962
return false;
963963
}
964+
bool bFound = false;
964965
//是否存在
965966
st_Locker.lock_shared();
966-
unordered_map<xstring, PUSHSTREAM_PACKET*>::iterator stl_MapIterator = stl_MapPushStream.find(lpszClientAddr);
967-
if (stl_MapIterator == stl_MapPushStream.end())
967+
unordered_map<xstring, PUSHSTREAM_PACKET*>::iterator stl_MapIterator = stl_MapPushStream.begin();
968+
for (; stl_MapIterator != stl_MapPushStream.end(); stl_MapIterator++)
969+
{
970+
if (0 == _tcsxnicmp(lpszClientAddr, stl_MapIterator->second->st_RTCInfo.tszClientAddr, _tcsxlen(lpszClientAddr)))
971+
{
972+
bFound = true;
973+
_tcsxcpy(ptszClientUser, stl_MapIterator->first.c_str());
974+
break;
975+
}
976+
}
977+
st_Locker.unlock_shared();
978+
if (!bFound)
968979
{
969980
Session_IsErrorOccur = true;
970981
Session_dwErrorCode = ERROR_STREAMMEDIA_MODULE_SESSION_NOTFOUND;
971-
st_Locker.unlock_shared();
972982
return false;
973983
}
974-
_tcsxcpy(ptszClientUser, stl_MapIterator->second->st_RTCInfo.tszClientAddr);
975-
st_Locker.unlock_shared();
984+
976985
return true;
977986
}
978987
/********************************************************************
@@ -1006,7 +1015,7 @@ bool CModuleSession_PushStream::ModuleSession_PushStream_RTCConnSet(LPCXSTR lpsz
10061015
bool bFound = false;
10071016
//是否存在
10081017
st_Locker.lock_shared();
1009-
unordered_map<xstring, PUSHSTREAM_PACKET*>::iterator stl_MapIterator = stl_MapPushStream.find(lpszClientAddr);
1018+
unordered_map<xstring, PUSHSTREAM_PACKET*>::iterator stl_MapIterator = stl_MapPushStream.begin();
10101019
for (; stl_MapIterator != stl_MapPushStream.end(); stl_MapIterator++)
10111020
{
10121021
if (0 == _tcsxnicmp(lpszClientAddr, stl_MapIterator->second->st_RTCInfo.tszClientAddr, _tcsxlen(lpszClientAddr)))
@@ -1074,4 +1083,114 @@ bool CModuleSession_PushStream::ModuleSession_PushStream_RTCConnGet(LPCXSTR lpsz
10741083
*pbConnect = stl_MapIterator->second->st_RTCInfo.bConnect;
10751084
st_Locker.unlock_shared();
10761085
return true;
1086+
}
1087+
/********************************************************************
1088+
函数名称:ModuleSession_PushStream_RTCIndexSet
1089+
函数功能:设置RTP包媒体索引
1090+
参数.一:lpszClientUser
1091+
In/Out:In
1092+
类型:常量字符指针
1093+
可空:N
1094+
意思:输入要操作的客户端
1095+
参数.二:nVideoIndex
1096+
In/Out:In
1097+
类型:整数型
1098+
可空:N
1099+
意思:输入RTP的包视频索引
1100+
参数.三:nAudioIndex
1101+
In/Out:In
1102+
类型:整数型
1103+
可空:N
1104+
意思:输入RTP的包音频索引
1105+
返回值
1106+
类型:逻辑型
1107+
意思:是否成功
1108+
备注:
1109+
*********************************************************************/
1110+
bool CModuleSession_PushStream::ModuleSession_PushStream_RTCIndexSet(LPCXSTR lpszClientUser, int nVideoIndex, int nAudioIndex)
1111+
{
1112+
Session_IsErrorOccur = false;
1113+
if (NULL == lpszClientUser)
1114+
{
1115+
Session_IsErrorOccur = true;
1116+
Session_dwErrorCode = ERROR_STREAMMEDIA_MODULE_SESSION_PARAMENT;
1117+
return false;
1118+
}
1119+
bool bFound = false;
1120+
//是否存在
1121+
st_Locker.lock_shared();
1122+
unordered_map<xstring, PUSHSTREAM_PACKET*>::iterator stl_MapIterator = stl_MapPushStream.find(lpszClientUser);
1123+
if (stl_MapIterator == stl_MapPushStream.end())
1124+
{
1125+
Session_IsErrorOccur = true;
1126+
Session_dwErrorCode = ERROR_STREAMMEDIA_MODULE_SESSION_NOTFOUND;
1127+
st_Locker.unlock_shared();
1128+
return false;
1129+
}
1130+
stl_MapIterator->second->st_RTCInfo.nIndexVideo = nVideoIndex;
1131+
stl_MapIterator->second->st_RTCInfo.nIndexAudio = nAudioIndex;
1132+
st_Locker.unlock_shared();
1133+
return true;
1134+
}
1135+
/********************************************************************
1136+
函数名称:ModuleSession_PushStream_RTCIndexGet
1137+
函数功能:获取RTP包媒体索引
1138+
参数.一:lpszClientAddr
1139+
In/Out:In
1140+
类型:常量字符指针
1141+
可空:N
1142+
意思:输入要操作的客户端
1143+
参数.二:pInt_VideoIndex
1144+
In/Out:Out
1145+
类型:整数型指针
1146+
可空:N
1147+
意思:输出RTP的包视频索引
1148+
参数.三:pInt_AudioIndex
1149+
In/Out:Out
1150+
类型:整数型指针
1151+
可空:N
1152+
意思:输出RTP的包音频索引
1153+
返回值
1154+
类型:逻辑型
1155+
意思:是否成功
1156+
备注:
1157+
*********************************************************************/
1158+
bool CModuleSession_PushStream::ModuleSession_PushStream_RTCIndexGet(LPCXSTR lpszClientAddr, int* pInt_VideoIndex, int* pInt_AudioIndex)
1159+
{
1160+
Session_IsErrorOccur = false;
1161+
if (NULL == lpszClientAddr)
1162+
{
1163+
Session_IsErrorOccur = true;
1164+
Session_dwErrorCode = ERROR_STREAMMEDIA_MODULE_SESSION_PARAMENT;
1165+
return false;
1166+
}
1167+
bool bFound = false;
1168+
//是否存在
1169+
st_Locker.lock_shared();
1170+
unordered_map<xstring, PUSHSTREAM_PACKET*>::iterator stl_MapIterator = stl_MapPushStream.begin();
1171+
for (; stl_MapIterator != stl_MapPushStream.end(); stl_MapIterator++)
1172+
{
1173+
if (0 == _tcsxnicmp(lpszClientAddr, stl_MapIterator->second->st_RTCInfo.tszClientAddr, _tcsxlen(lpszClientAddr)))
1174+
{
1175+
bFound = true;
1176+
break;
1177+
}
1178+
}
1179+
if (!bFound)
1180+
{
1181+
Session_IsErrorOccur = true;
1182+
Session_dwErrorCode = ERROR_STREAMMEDIA_MODULE_SESSION_NOTFOUND;
1183+
st_Locker.unlock_shared();
1184+
return false;
1185+
}
1186+
if (NULL != pInt_VideoIndex)
1187+
{
1188+
*pInt_VideoIndex = stl_MapIterator->second->st_RTCInfo.nIndexVideo;
1189+
}
1190+
if (NULL != pInt_AudioIndex)
1191+
{
1192+
*pInt_AudioIndex = stl_MapIterator->second->st_RTCInfo.nIndexAudio;
1193+
}
1194+
st_Locker.unlock_shared();
1195+
return true;
10771196
}

XEngine_Source/XEngine_ModuleSession/ModuleSession_PushStream/ModuleSession_PushStream.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ typedef struct
2222
struct
2323
{
2424
XCHAR tszClientAddr[XPATH_MAX];
25+
XCHAR tszRTPStr[128];
26+
int nIndexVideo;
27+
int nIndexAudio;
2528
bool bConnect;
2629
}st_RTCInfo;
2730
struct
@@ -69,6 +72,8 @@ class CModuleSession_PushStream
6972
bool ModuleSession_PushStream_RTCAddrGet(LPCXSTR lpszClientAddr, XCHAR* ptszClientUser);
7073
bool ModuleSession_PushStream_RTCConnSet(LPCXSTR lpszClientAddr, bool bConnect);
7174
bool ModuleSession_PushStream_RTCConnGet(LPCXSTR lpszClientAddr, bool* pbConnect);
75+
bool ModuleSession_PushStream_RTCIndexSet(LPCXSTR lpszClientUser, int nVideoIndex, int nAudioIndex);
76+
bool ModuleSession_PushStream_RTCIndexGet(LPCXSTR lpszClientAddr, int* pInt_VideoIndex, int* pInt_AudioIndex);
7277
private:
7378
shared_mutex st_Locker;
7479
private:

XEngine_Source/XEngine_ModuleSession/XEngine_ModuleSession.def

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,4 +47,6 @@ EXPORTS
4747
ModuleSession_PushStream_RTCConnSet
4848
ModuleSession_PushStream_RTCConnGet
4949
ModuleSession_PushStream_RTCAddrSet
50-
ModuleSession_PushStream_RTCAddrGet
50+
ModuleSession_PushStream_RTCAddrGet
51+
ModuleSession_PushStream_RTCIndexSet
52+
ModuleSession_PushStream_RTCIndexGet

XEngine_Source/XEngine_ModuleSession/pch.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,4 +199,12 @@ extern "C" bool ModuleSession_PushStream_RTCAddrSet(LPCXSTR lpszClientUser, LPCX
199199
extern "C" bool ModuleSession_PushStream_RTCAddrGet(LPCXSTR lpszClientAddr, XCHAR* ptszClientUser)
200200
{
201201
return m_PushStream.ModuleSession_PushStream_RTCAddrGet(lpszClientAddr, ptszClientUser);
202+
}
203+
extern "C" bool ModuleSession_PushStream_RTCIndexSet(LPCXSTR lpszClientUser, int nVideoIndex, int nAudioIndex)
204+
{
205+
return m_PushStream.ModuleSession_PushStream_RTCIndexSet(lpszClientUser, nVideoIndex, nAudioIndex);
206+
}
207+
extern "C" bool ModuleSession_PushStream_RTCIndexGet(LPCXSTR lpszClientAddr, int* pInt_VideoIndex, int* pInt_AudioIndex)
208+
{
209+
return m_PushStream.ModuleSession_PushStream_RTCIndexGet(lpszClientAddr, pInt_VideoIndex, pInt_AudioIndex);
202210
}

XEngine_Source/XEngine_ServiceApp/XEngine_StreamMediaApp/StreamMedia_PushStream/PushStream_ClientWebRtc.cpp

Lines changed: 41 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,18 @@ bool PushStream_ClientProtocol_Handle(LPCXSTR lpszClientAddr, XSOCKET hSocket, L
5454
{
5555
XBYTE tszKEYBuffer[XPATH_MAX] = {};
5656
Cryption_Server_GetKeyEx(xhRTCWhipSsl, lpszClientAddr, tszKEYBuffer);
57+
//创建SRTPCore
5758
ModuleHelp_SRTPCore_Create(tszKEYBuffer);
58-
59-
XCHAR tszSMSName[128] = {};
60-
XCHAR tszSMSAddr[128] = {};
59+
//创建RTC会话
6160
ModuleSession_PushStream_RTCConnSet(lpszClientAddr, true);
62-
XLOG_PRINT(xhLog, XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_INFO, _X("RTC客户端:%s,请求的DTLS握手协议处理成功,绑定的地址:%s,绑定的名称:%s"), lpszClientAddr, tszSMSAddr, tszSMSName);
61+
//创建RTC会话
62+
int nIndexVideo = 0;
63+
int nIndexAudio = 0;
64+
ModuleSession_PushStream_RTCIndexGet(lpszClientAddr, &nIndexVideo, &nIndexAudio);
65+
RTPProtocol_Parse_Insert(lpszClientAddr, ENUM_STREAMMEDIA_RTPPROTOCOL_PAYLOAD_TYPE_UNKNOW);
66+
RTPProtocol_Parse_SetLink(lpszClientAddr, nIndexVideo, ENUM_STREAMMEDIA_RTPPROTOCOL_PAYLOAD_TYPE_H264);
67+
RTPProtocol_Parse_SetLink(lpszClientAddr, nIndexAudio, ENUM_STREAMMEDIA_RTPPROTOCOL_PAYLOAD_TYPE_OPUS);
68+
XLOG_PRINT(xhLog, XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_INFO, _X("RTC客户端:%s,请求的DTLS握手协议处理成功,视频索引:%d,音频索引:%d"), lpszClientAddr, nIndexVideo, nIndexAudio);
6369
}
6470
else
6571
{
@@ -98,8 +104,8 @@ bool PushStream_ClientProtocol_Handle(LPCXSTR lpszClientAddr, XSOCKET hSocket, L
98104
NatProtocol_StunNat_BuildMapAddress(tszRVBuffer + nRVLen, &nRVLen, tszIPPort, nPort, true);
99105
nSDLen = nRVLen;
100106
NatProtocol_StunNat_Packet(tszSDBuffer, &nSDLen, (LPCXSTR)st_NatClient.byTokenStr, RFCCOMPONENTS_NATCLIENT_PROTOCOL_STUN_CLASS_RESPONSE, RFCCOMPONENTS_NATCLIENT_PROTOCOL_STUN_ATTR_MAPPED_ADDRESS, tszRVBuffer, true, st_ServiceConfig.st_XPull.st_PullWebRtc.tszICEPass, true);
101-
//更新绑定的地址
102107
SocketOpt_HeartBeat_ActiveAddrEx(xhRTCWhipHeart, tszUserStr); //激活一次心跳
108+
//更新绑定地址
103109
ModuleSession_PushStream_RTCAddrSet(tszUserStr, lpszClientAddr);
104110
XEngine_Network_Send(lpszClientAddr, tszSDBuffer, nSDLen, ENUM_XENGINE_STREAMMEDIA_CLIENT_TYPE_PUSH_RTC);
105111
XLOG_PRINT(xhLog, XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_INFO, _X("RTC客户端:%s,请求的STUN协议处理成功,请求的用户:%s"), lpszClientAddr, tszUserStr);
@@ -133,8 +139,36 @@ bool PushStream_ClientProtocol_Handle(LPCXSTR lpszClientAddr, XSOCKET hSocket, L
133139
}
134140
else
135141
{
142+
nRVLen = nMsgLen;
143+
memcpy(tszRVBuffer, lpszMsgBuffer, nMsgLen);
144+
if (!ModuleHelp_SRTPCore_RTPUNProtect(tszRVBuffer, &nRVLen))
145+
{
146+
XLOG_PRINT(xhLog, XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_ERROR, _X("RTC客户端:%s,RTP协议解密失败,大小:%d,错误码:%lX"), lpszClientAddr, nMsgLen, ModuleHelp_GetLastError());
147+
return false;
148+
}
136149
//RTP
137-
XLOG_PRINT(xhLog, XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_INFO, _X("RTC客户端:%s,请求的RTP协议处理成功"), lpszClientAddr);
150+
if (!RTPProtocol_Parse_Send(lpszClientAddr, tszRVBuffer, nRVLen))
151+
{
152+
XLOG_PRINT(xhLog, XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_ERROR, _X("RTC客户端:%s,RTP协议解析失败,大小:%d,错误码:%lX"), lpszClientAddr, nMsgLen, RTCPProtocol_GetLastError());
153+
return false;
154+
}
155+
STREAMMEDIA_RTPPROTOCOL_HDR st_RTPHdr = {};
156+
while (RTPProtocol_Parse_Recv(lpszClientAddr, tszRVBuffer, &nMsgLen, &st_RTPHdr))
157+
{
158+
if (st_RTPHdr.enPayload == ENUM_STREAMMEDIA_RTPPROTOCOL_PAYLOAD_TYPE_H264)
159+
{
160+
161+
}
162+
else if (st_RTPHdr.enPayload == ENUM_STREAMMEDIA_RTPPROTOCOL_PAYLOAD_TYPE_OPUS)
163+
{
164+
165+
}
166+
else
167+
{
168+
XLOG_PRINT(xhLog, XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_WARN, _X("RTC客户端:%s,发送了未知的RTP协议类型:%d"), lpszClientAddr, st_RTPHdr.enPayload);
169+
}
170+
}
171+
XLOG_PRINT(xhLog, XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_DEBUG, _X("RTC客户端:%s,%d,请求的RTP协议处理成功"), lpszClientAddr, nMsgLen);
138172
}
139173
}
140174
else
@@ -343,6 +377,7 @@ bool PushStream_ClientWhip_Handle(RFCCOMPONENTS_HTTP_REQPARAM* pSt_HTTPParam, LP
343377
SDPProtocol_Packet_Destory(xhPacket);
344378

345379
ModuleSession_PushStream_Create(tszUserStr, tszSMSAddr, ENUM_XENGINE_STREAMMEDIA_CLIENT_TYPE_PULL_RTC);
380+
ModuleSession_PushStream_RTCIndexSet(tszUserStr, nVideoIndex, nAudioIndex);
346381
ModuleSession_PushStream_SetAVInfo(tszUserStr, &st_AVInfo);
347382
SocketOpt_HeartBeat_InsertAddrEx(xhRTCWhipHeart, tszUserStr); //需要加入心跳,不然没法知道超时
348383

XEngine_Source/XEngine_ServiceApp/XEngine_StreamMediaApp/XEngine_StreamMediaApp.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ void ServiceApp_Stop(int signo)
9393
RTMPProtocol_Parse_Destory();
9494
FLVProtocol_Parse_Destory();
9595
HLSProtocol_TSParse_Destory();
96+
RTPProtocol_Parse_Destory();
9697
//销毁线程池
9798
ManagePool_Thread_NQDestroy(xhHttpPool);
9899
ManagePool_Thread_NQDestroy(xhXStreamPool);
@@ -244,6 +245,13 @@ int main(int argc, char** argv)
244245
goto XENGINE_SERVICEAPP_EXIT;
245246
}
246247
XLOG_PRINT(xhLog, XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_INFO, _X("启动服务中,初始化内存池成功"));
248+
249+
if (!RTPProtocol_Parse_Init(1))
250+
{
251+
XLOG_PRINT(xhLog, XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_ERROR, _X("启动服务中,初始化RTP包解析器失败,错误:%lX"), RTPProtocol_GetLastError());
252+
return false;
253+
}
254+
XLOG_PRINT(xhLog, XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_INFO, _X("启动服务中,初始化RTP包解析器成功"));
247255
//启动HTTP服务相关代码
248256
if (st_ServiceConfig.nHttpPort > 0)
249257
{
@@ -740,6 +748,7 @@ int main(int argc, char** argv)
740748
RTMPProtocol_Parse_Destory();
741749
FLVProtocol_Parse_Destory();
742750
HLSProtocol_TSParse_Destory();
751+
RTPProtocol_Parse_Destory();
743752
//销毁线程池
744753
ManagePool_Thread_NQDestroy(xhHttpPool);
745754
ManagePool_Thread_NQDestroy(xhXStreamPool);

0 commit comments

Comments
 (0)