diff --git a/video/receive_statistics_proxy.cc b/video/receive_statistics_proxy.cc index d4bdc6d274..10b200be1f 100644 --- a/video/receive_statistics_proxy.cc +++ b/video/receive_statistics_proxy.cc @@ -45,7 +45,9 @@ const int kLowVarianceThreshold = 1; const int kHighVarianceThreshold = 2; // Some metrics are reported as a maximum over this period. -const int kMovingMaxWindowMs = 10000; +// This should be synchronized with a typical getStats polling interval in +// the clients. +const int kMovingMaxWindowMs = 1000; // How large window we use to calculate the framerate/bitrate. const int kRateStatisticsWindowSizeMs = 1000; diff --git a/video/receive_statistics_proxy_unittest.cc b/video/receive_statistics_proxy_unittest.cc index 83dffb7fcd..44fdc8bd15 100644 --- a/video/receive_statistics_proxy_unittest.cc +++ b/video/receive_statistics_proxy_unittest.cc @@ -144,9 +144,9 @@ TEST_F(ReceiveStatisticsProxyTest, ReportsMaxInterframeDelay) { } TEST_F(ReceiveStatisticsProxyTest, ReportInterframeDelayInWindow) { - const int64_t kInterframeDelayMs1 = 9000; - const int64_t kInterframeDelayMs2 = 7500; - const int64_t kInterframeDelayMs3 = 7000; + const int64_t kInterframeDelayMs1 = 900; + const int64_t kInterframeDelayMs2 = 750; + const int64_t kInterframeDelayMs3 = 700; EXPECT_EQ(-1, statistics_proxy_->GetStats().interframe_delay_max_ms); statistics_proxy_->OnDecodedFrame(rtc::Optional(3u), VideoContentType::UNSPECIFIED);