Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(69)

Unified Diff: webrtc/video/receive_statistics_proxy_unittest.cc

Issue 2965033002: Report interframe delay sum in old GetStats (Closed)
Patch Set: Rebase Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/video/receive_statistics_proxy.cc ('k') | webrtc/video_receive_stream.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/video/receive_statistics_proxy_unittest.cc
diff --git a/webrtc/video/receive_statistics_proxy_unittest.cc b/webrtc/video/receive_statistics_proxy_unittest.cc
index 2c4d3301950c40d952a4cba08827b6148184ecdd..822fc453f4deaa8821c6012c42dceb4c9b7c7172 100644
--- a/webrtc/video/receive_statistics_proxy_unittest.cc
+++ b/webrtc/video/receive_statistics_proxy_unittest.cc
@@ -97,6 +97,28 @@ TEST_F(ReceiveStatisticsProxyTest, OnDecodedFrameIncreasesQpSum) {
statistics_proxy_->GetStats().qp_sum);
}
+TEST_F(ReceiveStatisticsProxyTest,
+ OnDecodedFrameIncreasesInterframeDelayMsSum) {
+ const uint64_t kInterframeDelayMs1 = 100;
+ const uint64_t kInterframeDelayMs2 = 200;
+ EXPECT_EQ(0u, statistics_proxy_->GetStats().interframe_delay_sum_ms);
+ statistics_proxy_->OnDecodedFrame(rtc::Optional<uint8_t>(3u),
+ VideoContentType::UNSPECIFIED);
+ EXPECT_EQ(0u, statistics_proxy_->GetStats().interframe_delay_sum_ms);
+
+ fake_clock_.AdvanceTimeMilliseconds(kInterframeDelayMs1);
+ statistics_proxy_->OnDecodedFrame(rtc::Optional<uint8_t>(127u),
+ VideoContentType::UNSPECIFIED);
+ EXPECT_EQ(kInterframeDelayMs1,
+ statistics_proxy_->GetStats().interframe_delay_sum_ms);
+
+ fake_clock_.AdvanceTimeMilliseconds(kInterframeDelayMs2);
+ statistics_proxy_->OnDecodedFrame(rtc::Optional<uint8_t>(127u),
+ VideoContentType::UNSPECIFIED);
+ EXPECT_EQ(kInterframeDelayMs1 + kInterframeDelayMs2,
+ statistics_proxy_->GetStats().interframe_delay_sum_ms);
+}
+
TEST_F(ReceiveStatisticsProxyTest, OnDecodedFrameWithoutQpQpSumWontExist) {
EXPECT_EQ(rtc::Optional<uint64_t>(), statistics_proxy_->GetStats().qp_sum);
statistics_proxy_->OnDecodedFrame(rtc::Optional<uint8_t>(),
« no previous file with comments | « webrtc/video/receive_statistics_proxy.cc ('k') | webrtc/video_receive_stream.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698