RTT intermediate calculation use ntp time instead of milliseconds.

Compact NTP representation was designed exactly for that purpose: calculate RTT. No need to map to ms before doing arithmetic on this values.
  Because of this change there is no need to keep mapping between compact ntp presentation and milliseconds in the RTCPSender.

BUG=webrtc:5565
R=stefan@webrtc.org

Review URL: https://codereview.webrtc.org/1491843004 .

Cr-Commit-Position: refs/heads/master@{#11710}
This commit is contained in:
Danil Chapovalov
2016-02-22 18:59:36 +01:00
parent 723ead844b
commit a094fd1550
8 changed files with 120 additions and 182 deletions

View File

@ -106,10 +106,6 @@ class RTCPSender {
int32_t RemoveMixedCNAME(uint32_t SSRC);
int64_t SendTimeOfSendReport(uint32_t sendReport);
bool SendTimeOfXrRrReport(uint32_t mid_ntp, int64_t* time_ms) const;
bool TimeToSendRTCPReport(bool sendKeyframeBeforeRTP = false) const;
int32_t SendRTCP(const FeedbackState& feedback_state,
@ -231,17 +227,6 @@ class RTCPSender {
std::map<uint32_t, std::string> csrc_cnames_
GUARDED_BY(critical_section_rtcp_sender_);
// Sent
uint32_t last_send_report_[RTCP_NUMBER_OF_SR] GUARDED_BY(
critical_section_rtcp_sender_); // allow packet loss and RTT above 1 sec
int64_t last_rtcp_time_[RTCP_NUMBER_OF_SR] GUARDED_BY(
critical_section_rtcp_sender_);
// Sent XR receiver reference time report.
// <mid ntp (mid 32 bits of the 64 bits NTP timestamp), send time in ms>.
std::map<uint32_t, int64_t> last_xr_rr_
GUARDED_BY(critical_section_rtcp_sender_);
// send CSRCs
std::vector<uint32_t> csrcs_ GUARDED_BY(critical_section_rtcp_sender_);