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

Trigger NACK when a new receiving stream is initialized rather than when its…

Trigger NACK when a new receiving stream is initialized rather than when its transport is connected (so it also works for future new streams over the same already connnected transport)
上级 912aa26d
......@@ -746,25 +746,6 @@ namespace RTC
this->listener->onFullFrameRequired(this, rtpSender);
}
// If the transport is used by any RtpReceiver (video/depth) notify the
// listener.
for (auto& kv : this->rtpReceivers)
{
RTC::RtpReceiver* rtpReceiver = kv.second;
if (
rtpReceiver->kind != RTC::Media::Kind::VIDEO &&
rtpReceiver->kind != RTC::Media::Kind::DEPTH)
{
continue;
}
if (rtpReceiver->GetTransport() != transport)
continue;
rtpReceiver->RequestFullFrame();
}
}
void Peer::onTransportClosed(RTC::Transport* transport)
......
......@@ -168,10 +168,11 @@ namespace RTC
if (this->params.useNack)
this->nackGenerator.reset(new RTC::NackGenerator(this));
// If we got out of sync, request a full frame.
if (this->started && this->params.usePli)
// Request a full frame so dropped video packets don't cause lag.
if (this->params.mime.type == RTC::RtpCodecMime::Type::VIDEO)
{
MS_DEBUG_TAG(rtx, "triggering PLI [ssrc:%" PRIu32 "]", this->params.ssrc);
MS_DEBUG_TAG(rtx, "stream initialized, triggering PLI [ssrc:%" PRIu32 "]",
this->params.ssrc);
this->listener->onPliRequired(this);
}
......
Markdown 格式
0% 或
您添加了 0 人 到此讨论。请谨慎行事。
请先完成此评论的编辑!
请 注册 或者 后发表评论