From d250e1b7ecf96802ba6e6d714248f8a4862a487b Mon Sep 17 00:00:00 2001 From: xiongziliang <771730766@qq.com> Date: Wed, 26 Jun 2019 10:01:04 +0800 Subject: [PATCH] =?UTF-8?q?=E6=95=B4=E7=90=86=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Rtsp/RtspSession.cpp | 4 ++-- src/Rtsp/RtspSession.h | 6 ++---- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/Rtsp/RtspSession.cpp b/src/Rtsp/RtspSession.cpp index 0abae3f2..ed310289 100644 --- a/src/Rtsp/RtspSession.cpp +++ b/src/Rtsp/RtspSession.cpp @@ -1110,7 +1110,7 @@ void RtspSession::onNoneReader(MediaSource &sender){ } -inline void RtspSession::sendRtpPacket(const RtpPacket::Ptr & pkt) { +void RtspSession::sendRtpPacket(const RtpPacket::Ptr & pkt) { //InfoP(this) <<(int)pkt.Interleaved; switch (_rtpType) { case Rtsp::RTP_TCP: { @@ -1152,7 +1152,7 @@ inline void RtspSession::sendRtpPacket(const RtpPacket::Ptr & pkt) { #endif } -inline void RtspSession::sendSenderReport(bool overTcp,int iTrackIndex) { +void RtspSession::sendSenderReport(bool overTcp,int iTrackIndex) { static const char s_cname[] = "ZLMediaKitRtsp"; uint8_t aui8Rtcp[4 + 28 + 10 + sizeof(s_cname) + 1] = {0}; uint8_t *pui8Rtcp_SR = aui8Rtcp + 4, *pui8Rtcp_SDES = pui8Rtcp_SR + 28; diff --git a/src/Rtsp/RtspSession.h b/src/Rtsp/RtspSession.h index 433c13f7..ed3970e5 100644 --- a/src/Rtsp/RtspSession.h +++ b/src/Rtsp/RtspSession.h @@ -108,11 +108,9 @@ protected: bool close(MediaSource &sender,bool force) override ; void onNoneReader(MediaSource &sender) override; - //TcpSession override int send(const Buffer::Ptr &pkt) override; - /** * 收到RTCP包回调 * @param iTrackidx @@ -153,9 +151,10 @@ private: void onAuthBasic(const string &realm,const string &strBase64); void onAuthDigest(const string &realm,const string &strMd5); - inline void sendRtpPacket(const RtpPacket::Ptr &pkt); + void sendRtpPacket(const RtpPacket::Ptr &pkt); bool sendRtspResponse(const string &res_code,const std::initializer_list &header, const string &sdp = "" , const char *protocol = "RTSP/1.0"); bool sendRtspResponse(const string &res_code,const StrCaseMap &header = StrCaseMap(), const string &sdp = "",const char *protocol = "RTSP/1.0"); + void sendSenderReport(bool overTcp,int iTrackIndex); private: Ticker _ticker; int _iCseq = 0; @@ -193,7 +192,6 @@ private: RtcpCounter _aRtcpCnt[2]; //rtcp统计,trackid idx 为数组下标 Ticker _aRtcpTicker[2]; //rtcp发送时间,trackid idx 为数组下标 - inline void sendSenderReport(bool overTcp,int iTrackIndex); }; /**