diff --git a/3rdpart/ZLToolKit b/3rdpart/ZLToolKit index 68296569..beb3be99 160000 --- a/3rdpart/ZLToolKit +++ b/3rdpart/ZLToolKit @@ -1 +1 @@ -Subproject commit 682965692e26ac50652cb574625e3f20e1a651ba +Subproject commit beb3be990a26b395359c9e1965a1f645267133fa diff --git a/src/Rtsp/RtspPlayer.cpp b/src/Rtsp/RtspPlayer.cpp index 926ecb71..65727c27 100644 --- a/src/Rtsp/RtspPlayer.cpp +++ b/src/Rtsp/RtspPlayer.cpp @@ -357,7 +357,8 @@ void RtspPlayer::handleResSETUP(const Parser &parser, unsigned int uiTrackIndex) WarnL << "收到其他地址的rtcp数据:" << inet_ntoa(((struct sockaddr_in *) addr)->sin_addr); 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{ trackIdx = getTrackIndexByInterleaved(interleaved - 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){ } diff --git a/src/Rtsp/RtspPlayer.h b/src/Rtsp/RtspPlayer.h index 5bc6252e..4993e31d 100644 --- a/src/Rtsp/RtspPlayer.h +++ b/src/Rtsp/RtspPlayer.h @@ -93,7 +93,7 @@ protected: * @param pucData * @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包维持心跳 diff --git a/src/Rtsp/RtspSession.cpp b/src/Rtsp/RtspSession.cpp index 3ecec4a9..db36e08c 100644 --- a/src/Rtsp/RtspSession.cpp +++ b/src/Rtsp/RtspSession.cpp @@ -197,12 +197,12 @@ void RtspSession::onRtpPacket(const char *data, uint64_t len) { }else{ trackIdx = getTrackIndexByInterleaved(interleaved - 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) { @@ -996,7 +996,8 @@ inline void RtspSession::onRcvPeerUdpData(int intervaled, const Buffer::Ptr &pBu if(_udpSockConnected.count(intervaled)){ _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()); } } diff --git a/src/Rtsp/RtspSession.h b/src/Rtsp/RtspSession.h index 085fb416..5cc04d68 100644 --- a/src/Rtsp/RtspSession.h +++ b/src/Rtsp/RtspSession.h @@ -120,7 +120,7 @@ protected: * @param pucData * @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: bool handleReq_Options(const Parser &parser); //处理options方法 bool handleReq_Describe(const Parser &parser); //处理describe方法