mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-11-26 04:31:37 +08:00
优化接口命名,更新ZLToolKit
This commit is contained in:
parent
fe19ea3991
commit
9d92f613e2
@ -1 +1 @@
|
|||||||
Subproject commit 682965692e26ac50652cb574625e3f20e1a651ba
|
Subproject commit beb3be990a26b395359c9e1965a1f645267133fa
|
@ -357,7 +357,8 @@ void RtspPlayer::handleResSETUP(const Parser &parser, unsigned int uiTrackIndex)
|
|||||||
WarnL << "收到其他地址的rtcp数据:" << inet_ntoa(((struct sockaddr_in *) addr)->sin_addr);
|
WarnL << "收到其他地址的rtcp数据:" << inet_ntoa(((struct sockaddr_in *) addr)->sin_addr);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
strongSelf->onRecvRtcp(uiTrackIndex, strongSelf->_aTrackInfo[uiTrackIndex], (unsigned char *) buf->data(), buf->size());
|
strongSelf->onRtcpPacket(uiTrackIndex, strongSelf->_aTrackInfo[uiTrackIndex],
|
||||||
|
(unsigned char *) buf->data(), buf->size());
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -481,12 +482,12 @@ void RtspPlayer::onRtpPacket(const char *data, uint64_t len) {
|
|||||||
}else{
|
}else{
|
||||||
trackIdx = getTrackIndexByInterleaved(interleaved - 1);
|
trackIdx = getTrackIndexByInterleaved(interleaved - 1);
|
||||||
if (trackIdx != -1) {
|
if (trackIdx != -1) {
|
||||||
onRecvRtcp(trackIdx,_aTrackInfo[trackIdx],(unsigned char *)data + 4, len - 4);
|
onRtcpPacket(trackIdx, _aTrackInfo[trackIdx], (unsigned char *) data + 4, len - 4);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void RtspPlayer::onRecvRtcp(int iTrackidx,SdpTrack::Ptr &track, unsigned char *pucData, unsigned int uiLen){
|
void RtspPlayer::onRtcpPacket(int iTrackidx, SdpTrack::Ptr &track, unsigned char *pucData, unsigned int uiLen){
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -93,7 +93,7 @@ protected:
|
|||||||
* @param pucData
|
* @param pucData
|
||||||
* @param uiLen
|
* @param uiLen
|
||||||
*/
|
*/
|
||||||
virtual void onRecvRtcp(int iTrackidx,SdpTrack::Ptr &track, unsigned char *pucData, unsigned int uiLen);
|
virtual void onRtcpPacket(int iTrackidx, SdpTrack::Ptr &track, unsigned char *pucData, unsigned int uiLen);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 发送rtcp包维持心跳
|
* 发送rtcp包维持心跳
|
||||||
|
@ -197,12 +197,12 @@ void RtspSession::onRtpPacket(const char *data, uint64_t len) {
|
|||||||
}else{
|
}else{
|
||||||
trackIdx = getTrackIndexByInterleaved(interleaved - 1);
|
trackIdx = getTrackIndexByInterleaved(interleaved - 1);
|
||||||
if (trackIdx != -1) {
|
if (trackIdx != -1) {
|
||||||
onRecvRtcp(trackIdx,_aTrackInfo[trackIdx],(unsigned char *)data + 4, len - 4);
|
onRtcpPacket(trackIdx, _aTrackInfo[trackIdx], (unsigned char *) data + 4, len - 4);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void RtspSession::onRecvRtcp(int iTrackidx,SdpTrack::Ptr &track, unsigned char *pucData, unsigned int uiLen){
|
void RtspSession::onRtcpPacket(int iTrackidx, SdpTrack::Ptr &track, unsigned char *pucData, unsigned int uiLen){
|
||||||
|
|
||||||
}
|
}
|
||||||
int64_t RtspSession::getContentLength(Parser &parser) {
|
int64_t RtspSession::getContentLength(Parser &parser) {
|
||||||
@ -996,7 +996,8 @@ inline void RtspSession::onRcvPeerUdpData(int intervaled, const Buffer::Ptr &pBu
|
|||||||
if(_udpSockConnected.count(intervaled)){
|
if(_udpSockConnected.count(intervaled)){
|
||||||
_apRtcpSock[(intervaled - 1) / 2]->setSendPeerAddr(&addr);
|
_apRtcpSock[(intervaled - 1) / 2]->setSendPeerAddr(&addr);
|
||||||
}
|
}
|
||||||
onRecvRtcp((intervaled - 1) / 2,_aTrackInfo[(intervaled - 1) / 2],( unsigned char *)pBuf->data(),pBuf->size());
|
onRtcpPacket((intervaled - 1) / 2, _aTrackInfo[(intervaled - 1) / 2], (unsigned char *) pBuf->data(),
|
||||||
|
pBuf->size());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -120,7 +120,7 @@ protected:
|
|||||||
* @param pucData
|
* @param pucData
|
||||||
* @param uiLen
|
* @param uiLen
|
||||||
*/
|
*/
|
||||||
virtual void onRecvRtcp(int iTrackidx,SdpTrack::Ptr &track, unsigned char *pucData, unsigned int uiLen);
|
virtual void onRtcpPacket(int iTrackidx, SdpTrack::Ptr &track, unsigned char *pucData, unsigned int uiLen);
|
||||||
private:
|
private:
|
||||||
bool handleReq_Options(const Parser &parser); //处理options方法
|
bool handleReq_Options(const Parser &parser); //处理options方法
|
||||||
bool handleReq_Describe(const Parser &parser); //处理describe方法
|
bool handleReq_Describe(const Parser &parser); //处理describe方法
|
||||||
|
Loading…
Reference in New Issue
Block a user