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

Consumer.cpp: cometic changes

上级 5fa0a3c1
...@@ -111,9 +111,7 @@ namespace RTC ...@@ -111,9 +111,7 @@ namespace RTC
Json::Value json(Json::arrayValue); Json::Value json(Json::arrayValue);
if (this->rtpStream == nullptr) if (this->rtpStream == nullptr)
{
return json; return json;
}
auto jsonRtpStream = this->rtpStream->GetStats(); auto jsonRtpStream = this->rtpStream->GetStats();
...@@ -137,9 +135,7 @@ namespace RTC ...@@ -137,9 +135,7 @@ namespace RTC
auto jsonInboundRtpStream = inboundRtpStream->GetStats(); auto jsonInboundRtpStream = inboundRtpStream->GetStats();
jsonRtpStream[JsonStringInboundRtpId] = inboundRtpStream->GetId(); jsonRtpStream[JsonStringInboundRtpId] = inboundRtpStream->GetId();
json.append(jsonInboundRtpStream); json.append(jsonInboundRtpStream);
json.append(jsonRtpStream); json.append(jsonRtpStream);
return json; return json;
...@@ -190,9 +186,7 @@ namespace RTC ...@@ -190,9 +186,7 @@ namespace RTC
this->rtpPacketsBeforeProbation = RtpPacketsBeforeProbation; this->rtpPacketsBeforeProbation = RtpPacketsBeforeProbation;
if (IsProbing()) if (IsProbing())
{
StopProbation(); StopProbation();
}
} }
} }
...@@ -237,9 +231,7 @@ namespace RTC ...@@ -237,9 +231,7 @@ namespace RTC
this->rtpPacketsBeforeProbation = RtpPacketsBeforeProbation; this->rtpPacketsBeforeProbation = RtpPacketsBeforeProbation;
if (IsProbing()) if (IsProbing())
{
StopProbation(); StopProbation();
}
} }
} }
...@@ -414,9 +406,7 @@ namespace RTC ...@@ -414,9 +406,7 @@ namespace RTC
// Reset probation. // Reset probation.
if (IsProbing()) if (IsProbing())
{
StopProbation(); StopProbation();
}
} }
void Consumer::SendRtpPacket(RTC::RtpPacket* packet, RTC::RtpEncodingParameters::Profile profile) void Consumer::SendRtpPacket(RTC::RtpPacket* packet, RTC::RtpEncodingParameters::Profile profile)
...@@ -561,9 +551,7 @@ namespace RTC ...@@ -561,9 +551,7 @@ namespace RTC
// Retransmit the RTP packet if probing. // Retransmit the RTP packet if probing.
if (IsProbing()) if (IsProbing())
{
SendProbation(packet); SendProbation(packet);
}
} }
else else
{ {
...@@ -863,6 +851,7 @@ namespace RTC ...@@ -863,6 +851,7 @@ namespace RTC
else else
{ {
rtxPacket = packet; rtxPacket = packet;
MS_DEBUG_TAG( MS_DEBUG_TAG(
rtx, rtx,
"retransmitting packet [ssrc:%" PRIu32 ", seq:%" PRIu16 "]", "retransmitting packet [ssrc:%" PRIu32 ", seq:%" PRIu16 "]",
...@@ -916,14 +905,13 @@ namespace RTC ...@@ -916,14 +905,13 @@ namespace RTC
if (IsProbing()) if (IsProbing())
{ {
StopProbation(); StopProbation();
return; return;
} }
// Probated profile did not succeed. // Probated profile did not succeed.
if (probatedProfile != RtpEncodingParameters::Profile::NONE) if (probatedProfile != RtpEncodingParameters::Profile::NONE)
{
return; return;
}
auto it = this->mapProfileRtpStream.find(this->effectiveProfile); auto it = this->mapProfileRtpStream.find(this->effectiveProfile);
...@@ -1082,8 +1070,6 @@ namespace RTC ...@@ -1082,8 +1070,6 @@ namespace RTC
} }
if (this->probationPackets == 0) if (this->probationPackets == 0)
{
RecalculateTargetProfile(); RecalculateTargetProfile();
}
} }
} // namespace RTC } // namespace RTC
Markdown 格式
0% 或
您添加了 0 人 到此讨论。请谨慎行事。
请先完成此评论的编辑!
请 注册 或者 后发表评论