Feed the clock skew to AbsoluteCaptureTimeReceiver in audio receiver.
Bug: webrtc:10739
Change-Id: Ie61582079fb1791954b1929b6a3bf4c9edb7d75e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/207433
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Reviewed-by: Chen Xing <chxg@google.com>
Commit-Queue: Minyue Li <minyue@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33334}
diff --git a/audio/channel_receive.cc b/audio/channel_receive.cc
index 8b6c9cf..70d549b 100644
--- a/audio/channel_receive.cc
+++ b/audio/channel_receive.cc
@@ -704,6 +704,12 @@
{
MutexLock lock(&ts_stats_lock_);
ntp_estimator_.UpdateRtcpTimestamp(rtt, ntp_secs, ntp_frac, rtp_timestamp);
+ absl::optional<int64_t> remote_to_local_clock_offset_ms =
+ ntp_estimator_.EstimateRemoteToLocalClockOffsetMs();
+ if (remote_to_local_clock_offset_ms.has_value()) {
+ absolute_capture_time_receiver_.SetRemoteToLocalClockOffset(
+ Int64MsToQ32x32(*remote_to_local_clock_offset_ms));
+ }
}
}