mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-10-06 20:23:43 +08:00
整理代码
This commit is contained in:
parent
33e7113e9f
commit
d250e1b7ec
|
@ -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;
|
//InfoP(this) <<(int)pkt.Interleaved;
|
||||||
switch (_rtpType) {
|
switch (_rtpType) {
|
||||||
case Rtsp::RTP_TCP: {
|
case Rtsp::RTP_TCP: {
|
||||||
|
@ -1152,7 +1152,7 @@ inline void RtspSession::sendRtpPacket(const RtpPacket::Ptr & pkt) {
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
inline void RtspSession::sendSenderReport(bool overTcp,int iTrackIndex) {
|
void RtspSession::sendSenderReport(bool overTcp,int iTrackIndex) {
|
||||||
static const char s_cname[] = "ZLMediaKitRtsp";
|
static const char s_cname[] = "ZLMediaKitRtsp";
|
||||||
uint8_t aui8Rtcp[4 + 28 + 10 + sizeof(s_cname) + 1] = {0};
|
uint8_t aui8Rtcp[4 + 28 + 10 + sizeof(s_cname) + 1] = {0};
|
||||||
uint8_t *pui8Rtcp_SR = aui8Rtcp + 4, *pui8Rtcp_SDES = pui8Rtcp_SR + 28;
|
uint8_t *pui8Rtcp_SR = aui8Rtcp + 4, *pui8Rtcp_SDES = pui8Rtcp_SR + 28;
|
||||||
|
|
|
@ -108,11 +108,9 @@ protected:
|
||||||
bool close(MediaSource &sender,bool force) override ;
|
bool close(MediaSource &sender,bool force) override ;
|
||||||
void onNoneReader(MediaSource &sender) override;
|
void onNoneReader(MediaSource &sender) override;
|
||||||
|
|
||||||
|
|
||||||
//TcpSession override
|
//TcpSession override
|
||||||
int send(const Buffer::Ptr &pkt) override;
|
int send(const Buffer::Ptr &pkt) override;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 收到RTCP包回调
|
* 收到RTCP包回调
|
||||||
* @param iTrackidx
|
* @param iTrackidx
|
||||||
|
@ -153,9 +151,10 @@ private:
|
||||||
void onAuthBasic(const string &realm,const string &strBase64);
|
void onAuthBasic(const string &realm,const string &strBase64);
|
||||||
void onAuthDigest(const string &realm,const string &strMd5);
|
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 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");
|
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:
|
private:
|
||||||
Ticker _ticker;
|
Ticker _ticker;
|
||||||
int _iCseq = 0;
|
int _iCseq = 0;
|
||||||
|
@ -193,7 +192,6 @@ private:
|
||||||
|
|
||||||
RtcpCounter _aRtcpCnt[2]; //rtcp统计,trackid idx 为数组下标
|
RtcpCounter _aRtcpCnt[2]; //rtcp统计,trackid idx 为数组下标
|
||||||
Ticker _aRtcpTicker[2]; //rtcp发送时间,trackid idx 为数组下标
|
Ticker _aRtcpTicker[2]; //rtcp发送时间,trackid idx 为数组下标
|
||||||
inline void sendSenderReport(bool overTcp,int iTrackIndex);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue
Block a user