重写jitter buffer算法,修复seq回环时可能丢包的bug

This commit is contained in:
xia-chu
2023-03-11 10:17:31 +08:00
parent c301ecd207
commit 4cc2982a2c
3 changed files with 103 additions and 74 deletions

View File

@@ -652,15 +652,14 @@ void WebRtcTransportImp::onRtcConfigure(RtcConfigure &configure) const {
///////////////////////////////////////////////////////////////////
class RtpChannel
: public RtpTrackImp
, public std::enable_shared_from_this<RtpChannel> {
class RtpChannel : public RtpTrackImp, public std::enable_shared_from_this<RtpChannel> {
public:
RtpChannel(EventPoller::Ptr poller, RtpTrackImp::OnSorted cb, function<void(const FCI_NACK &nack)> on_nack) {
_poller = std::move(poller);
_on_nack = std::move(on_nack);
setOnSorted(std::move(cb));
//设置jitter buffer参数
RtpTrackImp::setParams(1024, NackContext::kNackMaxMS, 512);
_nack_ctx.setOnNack([this](const FCI_NACK &nack) { onNack(nack); });
}