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

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

Issue 2694713002: Replace use of Clock::CurrentNtp with Clock::CurrentNtpTime (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
« no previous file with comments | « no previous file | webrtc/system_wrappers/source/clock_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/rtp_rtcp/source/rtcp_sender.cc
diff --git a/webrtc/modules/rtp_rtcp/source/rtcp_sender.cc b/webrtc/modules/rtp_rtcp/source/rtcp_sender.cc
index 48a016d70a577a5c47bf74bf7410bf9d054c81cf..776e5bb62069e5eaa11d9657cfaaa94818a740f1 100644
--- a/webrtc/modules/rtp_rtcp/source/rtcp_sender.cc
+++ b/webrtc/modules/rtp_rtcp/source/rtcp_sender.cc
@@ -38,6 +38,7 @@
#include "webrtc/modules/rtp_rtcp/source/rtcp_packet/tmmbr.h"
#include "webrtc/modules/rtp_rtcp/source/rtcp_packet/transport_feedback.h"
#include "webrtc/modules/rtp_rtcp/source/rtp_rtcp_impl.h"
+#include "webrtc/modules/rtp_rtcp/source/time_util.h"
#include "webrtc/modules/rtp_rtcp/source/tmmbr_help.h"
namespace webrtc {
@@ -906,17 +907,13 @@ bool RTCPSender::AddReportBlock(const FeedbackState& feedback_state,
// TODO(sprang): Do we really need separate time stamps for each report?
// Get our NTP as late as possible to avoid a race.
- uint32_t ntp_secs;
- uint32_t ntp_frac;
- clock_->CurrentNtp(ntp_secs, ntp_frac);
+ NtpTime ntp = clock_->CurrentNtpTime();
// Delay since last received report.
if ((feedback_state.last_rr_ntp_secs != 0) ||
(feedback_state.last_rr_ntp_frac != 0)) {
// Get the 16 lowest bits of seconds and the 16 highest bits of fractions.
- uint32_t now = ntp_secs & 0x0000FFFF;
- now <<= 16;
- now += (ntp_frac & 0xffff0000) >> 16;
+ uint32_t now = CompactNtp(ntp);
uint32_t receiveTime = feedback_state.last_rr_ntp_secs & 0x0000FFFF;
receiveTime <<= 16;
« no previous file with comments | « no previous file | webrtc/system_wrappers/source/clock_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698