From 3fa4938fafef6b481ff55d7c68f42a75e8d80d4d Mon Sep 17 00:00:00 2001 From: philipel Date: Tue, 20 Aug 2019 15:59:57 +0200 Subject: [PATCH] Increased event log visualizer RTP clock estimation tolerance. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Increased the tolarence of the RTP clock estimation without causing overlap between any of the known frequencies. Bug: None Change-Id: I7c3ffa0e69b25799d740f7eed17c7bfd464cd254 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/149835 Reviewed-by: Björn Terelius Commit-Queue: Philip Eliasson Cr-Commit-Position: refs/heads/master@{#29000} --- rtc_tools/rtc_event_log_visualizer/analyzer.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rtc_tools/rtc_event_log_visualizer/analyzer.cc b/rtc_tools/rtc_event_log_visualizer/analyzer.cc index d2e6da25e6..60574ee366 100644 --- a/rtc_tools/rtc_event_log_visualizer/analyzer.cc +++ b/rtc_tools/rtc_event_log_visualizer/analyzer.cc @@ -156,13 +156,13 @@ absl::optional EstimateRtpClockFrequency( double estimated_frequency = (last_rtp_timestamp - first_rtp_timestamp) / duration; for (uint32_t f : {8000, 16000, 32000, 48000, 90000}) { - if (std::fabs(estimated_frequency - f) < 0.05 * f) { + if (std::fabs(estimated_frequency - f) < 0.15 * f) { return f; } } RTC_LOG(LS_WARNING) << "Failed to estimate RTP clock frequency: Estimate " << estimated_frequency - << "not close to any stardard RTP frequency."; + << " not close to any stardard RTP frequency."; return absl::nullopt; }