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

Consumer.cpp: s/newEffectiveProfile/newTargetProfile/g

上级 b5692d1b
...@@ -666,7 +666,7 @@ namespace RTC ...@@ -666,7 +666,7 @@ namespace RTC
{ {
MS_TRACE(); MS_TRACE();
RTC::RtpEncodingParameters::Profile newEffectiveProfile; RTC::RtpEncodingParameters::Profile newTargetProfile;
// If there are no profiles, select none or default, depending on whether this // If there are no profiles, select none or default, depending on whether this
// is single stream or simulcast/SVC. // is single stream or simulcast/SVC.
...@@ -678,22 +678,22 @@ namespace RTC ...@@ -678,22 +678,22 @@ namespace RTC
"no profiles, but effective profile is not none nor default"); "no profiles, but effective profile is not none nor default");
if (this->effectiveProfile == RtpEncodingParameters::Profile::NONE) if (this->effectiveProfile == RtpEncodingParameters::Profile::NONE)
newEffectiveProfile = RtpEncodingParameters::Profile::NONE; newTargetProfile = RtpEncodingParameters::Profile::NONE;
else else
newEffectiveProfile = RtpEncodingParameters::Profile::DEFAULT; newTargetProfile = RtpEncodingParameters::Profile::DEFAULT;
} }
// If there is no preferred profile, take the best one available. // If there is no preferred profile, take the best one available.
else if (this->preferredProfile == RTC::RtpEncodingParameters::Profile::DEFAULT) else if (this->preferredProfile == RTC::RtpEncodingParameters::Profile::DEFAULT)
{ {
auto it = this->profiles.crbegin(); auto it = this->profiles.crbegin();
newEffectiveProfile = *it; newTargetProfile = *it;
} }
// Otherwise take the highest available profile equal or lower than the preferred. // Otherwise take the highest available profile equal or lower than the preferred.
else else
{ {
std::set<RtpEncodingParameters::Profile>::reverse_iterator it; std::set<RtpEncodingParameters::Profile>::reverse_iterator it;
newEffectiveProfile = RtpEncodingParameters::Profile::NONE; newTargetProfile = RtpEncodingParameters::Profile::NONE;
for (it = this->profiles.rbegin(); it != this->profiles.rend(); ++it) for (it = this->profiles.rbegin(); it != this->profiles.rend(); ++it)
{ {
...@@ -701,13 +701,13 @@ namespace RTC ...@@ -701,13 +701,13 @@ namespace RTC
if (profile <= this->preferredProfile) if (profile <= this->preferredProfile)
{ {
newEffectiveProfile = *it; newTargetProfile = *it;
break; break;
} }
} }
} }
this->targetProfile = newEffectiveProfile; this->targetProfile = newTargetProfile;
if (this->targetProfile == this->effectiveProfile) if (this->targetProfile == this->effectiveProfile)
return; return;
......
Markdown 格式
0% 或
您添加了 0 人 到此讨论。请谨慎行事。
请先完成此评论的编辑!
请 注册 或者 后发表评论