Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(332)

Unified Diff: webrtc/modules/rtp_rtcp/source/rtcp_receiver.cc

Issue 2393723004: replace NtpTime->Clock with Clock->NtpTime dependency (Closed)
Patch Set: . Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: webrtc/modules/rtp_rtcp/source/rtcp_receiver.cc
diff --git a/webrtc/modules/rtp_rtcp/source/rtcp_receiver.cc b/webrtc/modules/rtp_rtcp/source/rtcp_receiver.cc
index e8d2ff291349f6e3ed896245ad4c5b4163d6a927..b19ce3880a8971c7d638446c249bbcd681927567 100644
--- a/webrtc/modules/rtp_rtcp/source/rtcp_receiver.cc
+++ b/webrtc/modules/rtp_rtcp/source/rtcp_receiver.cc
@@ -260,7 +260,7 @@ bool RTCPReceiver::LastReceivedXrReferenceTimeInfo(
// Get the delay since last received report (RFC 3611).
uint32_t receive_time_ntp = CompactNtp(last_received_xr_ntp_);
- uint32_t now_ntp = CompactNtp(NtpTime(*clock_));
+ uint32_t now_ntp = CompactNtp(clock_->CurrentNtpTime());
info->delay_since_last_rr = now_ntp - receive_time_ntp;
return true;
@@ -423,7 +423,7 @@ void RTCPReceiver::HandleSenderReport(const CommonHeader& rtcp_block,
remote_sender_info_.sendPacketCount = sender_report.sender_packet_count();
remote_sender_info_.sendOctetCount = sender_report.sender_octet_count();
- last_received_sr_ntp_.SetCurrent(*clock_);
+ last_received_sr_ntp_ = clock_->CurrentNtpTime();
} else {
// We will only store the send report from one source, but
// we will store all the receive blocks.
@@ -504,7 +504,7 @@ void RTCPReceiver::HandleReportBlock(const ReportBlock& report_block,
if (!receiver_only_ && send_time_ntp != 0) {
uint32_t delay_ntp = report_block.delay_since_last_sr();
// Local NTP time.
- uint32_t receive_time_ntp = CompactNtp(NtpTime(*clock_));
+ uint32_t receive_time_ntp = CompactNtp(clock_->CurrentNtpTime());
// RTT in 1/(2^16) seconds.
uint32_t rtt_ntp = receive_time_ntp - delay_ntp - send_time_ntp;
@@ -709,7 +709,7 @@ void RTCPReceiver::HandleXrReceiveReferenceTime(uint32_t sender_ssrc,
const rtcp::Rrtr& rrtr) {
remote_time_info_.ssrc = sender_ssrc;
remote_time_info_.last_rr = CompactNtp(rrtr.ntp());
- last_received_xr_ntp_.SetCurrent(*clock_);
+ last_received_xr_ntp_ = clock_->CurrentNtpTime();
}
void RTCPReceiver::HandleXrDlrrReportBlock(const rtcp::ReceiveTimeInfo& rti) {
@@ -728,7 +728,7 @@ void RTCPReceiver::HandleXrDlrrReportBlock(const rtcp::ReceiveTimeInfo& rti) {
return;
uint32_t delay_ntp = rti.delay_since_last_rr;
- uint32_t now_ntp = CompactNtp(NtpTime(*clock_));
+ uint32_t now_ntp = CompactNtp(clock_->CurrentNtpTime());
uint32_t rtt_ntp = now_ntp - delay_ntp - send_time_ntp;
xr_rr_rtt_ms_ = CompactNtpRttToMs(rtt_ntp);
« no previous file with comments | « webrtc/modules/rtp_rtcp/source/receive_statistics_impl.cc ('k') | webrtc/modules/rtp_rtcp/source/rtcp_receiver_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698