提交 07b549c5 authored 作者: Iñaki Baz Castillo's avatar Iñaki Baz Castillo

RtpStreamRecv: Initialize NackGenerator in the constructor (if params.useNack is set)

上级 87b171b4
......@@ -117,8 +117,7 @@ gulp.task('test:worker', shell.task(
'Debug' : 'Release'}/mediasoup-worker-test --invisibles --use-colour=yes`
],
{
verbose : true,
env : { DEBUG: '*ABORT* *WARN*' }
verbose : true
}
));
......
......@@ -37,6 +37,7 @@ namespace RTC
if (!this->started)
{
InitSeq(seq);
this->started = true;
this->maxSeq = seq - 1;
this->probation = MinSequential;
......
......@@ -13,6 +13,9 @@ namespace RTC
: RtpStream::RtpStream(params), listener(listener)
{
MS_TRACE();
if (this->params.useNack)
this->nackGenerator.reset(new RTC::NackGenerator(this));
}
RtpStreamRecv::~RtpStreamRecv()
......@@ -127,7 +130,7 @@ namespace RTC
this->cycles + static_cast<uint32_t>(packet->GetSequenceNumber()));
// Pass the packet to the NackGenerator.
if (this->params.useNack && this->nackGenerator)
if (this->params.useNack)
this->nackGenerator->ReceivePacket(packet);
return true;
......@@ -230,10 +233,7 @@ namespace RTC
void RtpStreamRecv::OnInitSeq()
{
MS_TRACE();
// Request a full frame so dropped video packets don't cause lag.
RequestFullFrame();
// Do nothing.
}
void RtpStreamRecv::OnNackGeneratorNackRequired(const std::vector<uint16_t>& seqNumbers)
......
......@@ -4,7 +4,6 @@
#include "RTC/RtpPacket.hpp"
#include "RTC/RtpStream.hpp"
#include "RTC/RtpStreamRecv.hpp"
#include "Logger.hpp"
#include <vector>
using namespace RTC;
......
Markdown 格式
0% 或
您添加了 0 人 到此讨论。请谨慎行事。
请先完成此评论的编辑!
请 注册 或者 后发表评论