From 39bc030e0bde94d0439ca418511fab89945e44f1 Mon Sep 17 00:00:00 2001 From: Danil Chapovalov Date: Tue, 17 May 2022 12:29:31 +0200 Subject: [PATCH] Delete deprecated functions in RempoteNtpTimeEstimator MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bug: webrtc:13757 Change-Id: Ie9cdb41de956df1b6877c8b86fd1829fdcd35043 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/262761 Reviewed-by: Erik Språng Auto-Submit: Danil Chapovalov Commit-Queue: Erik Språng Cr-Commit-Position: refs/heads/main@{#36908} --- .../include/remote_ntp_time_estimator.h | 26 ++----------------- 1 file changed, 2 insertions(+), 24 deletions(-) diff --git a/modules/rtp_rtcp/include/remote_ntp_time_estimator.h b/modules/rtp_rtcp/include/remote_ntp_time_estimator.h index 9abad381af..e45ee39530 100644 --- a/modules/rtp_rtcp/include/remote_ntp_time_estimator.h +++ b/modules/rtp_rtcp/include/remote_ntp_time_estimator.h @@ -13,7 +13,6 @@ #include -#include "absl/base/attributes.h" #include "absl/types/optional.h" #include "api/units/time_delta.h" #include "api/units/timestamp.h" @@ -35,18 +34,8 @@ class RemoteNtpTimeEstimator { RemoteNtpTimeEstimator& operator=(const RemoteNtpTimeEstimator&) = delete; ~RemoteNtpTimeEstimator() = default; - // Updates the estimator with round trip time `rtt`, NTP seconds `ntp_secs`, - // NTP fraction `ntp_frac` and RTP timestamp `rtp_timestamp`. - ABSL_DEPRECATED( - "Use UpdateRtcpTimestamp with strict time types: TimeDelta and NtpTime.") - bool UpdateRtcpTimestamp(int64_t rtt, - uint32_t ntp_secs, - uint32_t ntp_frac, - uint32_t rtp_timestamp) { - return UpdateRtcpTimestamp(TimeDelta::Millis(rtt), - NtpTime(ntp_secs, ntp_frac), rtp_timestamp); - } - + // Updates the estimator with round trip time `rtt` and + // new NTP time <-> RTP timestamp mapping from an RTCP sender report. bool UpdateRtcpTimestamp(TimeDelta rtt, NtpTime sender_send_time, uint32_t rtp_timestamp); @@ -65,17 +54,6 @@ class RemoteNtpTimeEstimator { // Returns invalid NtpTime (i.e. NtpTime(0)) on failure. NtpTime EstimateNtp(uint32_t rtp_timestamp); - // Estimates the offset, in milliseconds, between the remote clock and the - // local one. This is equal to local NTP clock - remote NTP clock. - ABSL_DEPRECATED("Use EstimateRemoteToLocalClockOffset.") - absl::optional EstimateRemoteToLocalClockOffsetMs() { - if (absl::optional offset = EstimateRemoteToLocalClockOffset()) { - return std::round(static_cast(*offset) * 1'000 / - (int64_t{1} << 32)); - } - return absl::nullopt; - } - // Estimates the offset between the remote clock and the // local one. This is equal to local NTP clock - remote NTP clock. // The offset is returned in ntp time resolution, i.e. 1/2^32 sec ~= 0.2 ns.