Revert 5228 "Use the RTT from RtcpRttStats class if provided whe..."

> Use the RTT from RtcpRttStats class if provided when sending/receiving NACK.
> 
> R=holmer@google.com
> 
> Review URL: https://webrtc-codereview.appspot.com/5049004

TBR=asapersson@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/5799004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@5285 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
asapersson@webrtc.org
2013-12-13 16:16:45 +00:00
parent 0a222eba69
commit 86bb56a7f5
3 changed files with 7 additions and 20 deletions

View File

@ -1135,13 +1135,10 @@ int32_t ModuleRtpRtcpImpl::SendNACK(const uint16_t* nack_list,
id_,
"SendNACK(size:%u)", size);
// Use RTT from RtcpRttStats class if provided.
uint16_t rtt = rtt_ms();
if (rtt == 0) {
rtcp_receiver_.RTT(rtcp_receiver_.RemoteSSRC(), NULL, &rtt, NULL, NULL);
}
uint16_t avg_rtt = 0;
rtcp_receiver_.RTT(rtcp_receiver_.RemoteSSRC(), NULL, &avg_rtt, NULL, NULL);
int64_t wait_time = 5 + ((rtt * 3) >> 1); // 5 + RTT * 1.5.
int64_t wait_time = 5 + ((avg_rtt * 3) >> 1); // 5 + RTT * 1.5.
if (wait_time == 5) {
wait_time = 100; // During startup we don't have an RTT.
}
@ -1625,12 +1622,9 @@ void ModuleRtpRtcpImpl::OnReceivedNACK(
nack_sequence_numbers.size() == 0) {
return;
}
// Use RTT from RtcpRttStats class if provided.
uint16_t rtt = rtt_ms();
if (rtt == 0) {
rtcp_receiver_.RTT(rtcp_receiver_.RemoteSSRC(), NULL, &rtt, NULL, NULL);
}
rtp_sender_.OnReceivedNACK(nack_sequence_numbers, rtt);
uint16_t avg_rtt = 0;
rtcp_receiver_.RTT(rtcp_receiver_.RemoteSSRC(), NULL, &avg_rtt, NULL, NULL);
rtp_sender_.OnReceivedNACK(nack_sequence_numbers, avg_rtt);
}
int32_t ModuleRtpRtcpImpl::LastReceivedNTP(