提交 bec2f94f authored 作者: José Luis Millán's avatar José Luis Millán

Consumer: recalculate target profile on RTP healthy...

if the target profile is lower than the preferrred one.
上级 c8b8d25a
...@@ -749,30 +749,35 @@ namespace RTC ...@@ -749,30 +749,35 @@ namespace RTC
{ {
MS_TRACE(); MS_TRACE();
if (!this->isProbing) if (this->isProbing)
return; {
MS_DEBUG_TAG(
rtp,
"successful probation [ssrc:%" PRIu32 ", profile:%s]",
rtpStream->GetSsrc(),
RTC::RtpEncodingParameters::profile2String[this->probingProfile].c_str());
MS_DEBUG_TAG( // Promote probing profile.
rtp, this->targetProfile = this->probingProfile;
"successful probation [ssrc:%" PRIu32 ", profile:%s]",
rtpStream->GetSsrc(),
RTC::RtpEncodingParameters::profile2String[this->probingProfile].c_str());
// Promote probing profile. // Disable probation flag.
this->targetProfile = this->probingProfile; this->isProbing = false;
this->probingProfile = RtpEncodingParameters::Profile::NONE;
// Disable probation flag. if (IsEnabled() && !IsPaused())
this->isProbing = false; RequestKeyFrame();
this->probingProfile = RtpEncodingParameters::Profile::NONE;
if (IsEnabled() && !IsPaused()) MS_DEBUG_TAG(
RequestKeyFrame(); rtp,
"target profile set [ssrc:%" PRIu32 ", profile:%s]",
rtpStream->GetSsrc(),
RTC::RtpEncodingParameters::profile2String[this->targetProfile].c_str());
}
MS_DEBUG_TAG( else if (this->targetProfile < this->preferredProfile)
rtp, {
"target profile set [ssrc:%" PRIu32 ", profile:%s]", RecalculateTargetProfile();
rtpStream->GetSsrc(), }
RTC::RtpEncodingParameters::profile2String[this->targetProfile].c_str());
} }
void Consumer::OnRtpMonitorUnhealthy() void Consumer::OnRtpMonitorUnhealthy()
......
Markdown 格式
0% 或
您添加了 0 人 到此讨论。请谨慎行事。
请先完成此评论的编辑!
请 注册 或者 后发表评论