修复rtcp rr/sr时间戳转换相关问题,计算rtt

This commit is contained in:
ziyue
2021-07-06 21:48:51 +08:00
parent bf8642d62f
commit 4c296488f1
9 changed files with 72 additions and 33 deletions

View File

@@ -586,7 +586,7 @@ public:
//统计rtp接受情况便于生成nack rtcp包
_nack_ctx.received(seq);
//统计rtp收到的情况好做rr汇报
_rtcp_context.onRtp(seq, ntohl(rtp->stamp), len);
_rtcp_context.onRtp(seq, ntohl(rtp->stamp), sample_rate, len);
}
return RtpTrack::inputRtp(type, sample_rate, ptr, len);
}
@@ -825,7 +825,7 @@ void WebRtcTransportImp::onSendRtp(const RtpPacket::Ptr &rtp, bool flush, bool r
}
if (!rtx) {
//统计rtp发送情况好做sr汇报
track->rtcp_context_send->onRtp(rtp->getSeq(), ntohl(rtp->getHeader()->stamp), rtp->size() - RtpPacket::kRtpTcpHeaderSize);
track->rtcp_context_send->onRtp(rtp->getSeq(), ntohl(rtp->getHeader()->stamp), rtp->sample_rate, rtp->size() - RtpPacket::kRtpTcpHeaderSize);
track->nack_list.push_back(rtp);
#if 0
//此处模拟发送丢包