整理代码

This commit is contained in:
xiongziliang 2019-06-26 10:01:04 +08:00
parent 33e7113e9f
commit d250e1b7ec
2 changed files with 4 additions and 6 deletions

View File

@ -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;

View File

@ -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<string> &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);
};
/**