Increased event log visualizer RTP clock estimation tolerance.
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 <terelius@webrtc.org>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29000}
diff --git a/rtc_tools/rtc_event_log_visualizer/analyzer.cc b/rtc_tools/rtc_event_log_visualizer/analyzer.cc
index d2e6da2..60574ee 100644
--- a/rtc_tools/rtc_event_log_visualizer/analyzer.cc
+++ b/rtc_tools/rtc_event_log_visualizer/analyzer.cc
@@ -156,13 +156,13 @@
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;
}