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

Unified Diff: webrtc/video/receive_statistics_proxy_unittest.cc

Issue 2638423003: Revert of Make the new jitter buffer the default jitter buffer. (Closed)
Patch Set: Created 3 years, 11 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/rtp_stream_receiver.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 3fd9bc68dd4215edaf9d4b2fe506453043b62079..a485edae022b6db34d96ed370472fd0965c73c94 100644
--- a/webrtc/video/receive_statistics_proxy_unittest.cc
+++ b/webrtc/video/receive_statistics_proxy_unittest.cc
@@ -74,14 +74,12 @@
kName, statistics_proxy_->GetStats().decoder_implementation_name.c_str());
}
-TEST_F(ReceiveStatisticsProxyTest, GetStatsReportsOnCompleteFrame) {
- const int kFrameSizeBytes = 1000;
- statistics_proxy_->OnCompleteFrame(true, kFrameSizeBytes);
- VideoReceiveStream::Stats stats = statistics_proxy_->GetStats();
- EXPECT_EQ(1, stats.network_frame_rate);
- EXPECT_EQ(kFrameSizeBytes * 8, stats.total_bitrate_bps);
- EXPECT_EQ(1, stats.frame_counts.key_frames);
- EXPECT_EQ(0, stats.frame_counts.delta_frames);
+TEST_F(ReceiveStatisticsProxyTest, GetStatsReportsIncomingRate) {
+ const int kFramerate = 28;
+ const int kBitrateBps = 311000;
+ statistics_proxy_->OnIncomingRate(kFramerate, kBitrateBps);
+ EXPECT_EQ(kFramerate, statistics_proxy_->GetStats().network_frame_rate);
+ EXPECT_EQ(kBitrateBps, statistics_proxy_->GetStats().total_bitrate_bps);
}
TEST_F(ReceiveStatisticsProxyTest, GetStatsReportsDecodeTimingStats) {
@@ -93,10 +91,9 @@
const int kMinPlayoutDelayMs = 6;
const int kRenderDelayMs = 7;
const int64_t kRttMs = 8;
- statistics_proxy_->OnRttUpdate(kRttMs, 0);
- statistics_proxy_->OnFrameBufferTimingsUpdated(
+ statistics_proxy_->OnDecoderTiming(
kDecodeMs, kMaxDecodeMs, kCurrentDelayMs, kTargetDelayMs, kJitterBufferMs,
- kMinPlayoutDelayMs, kRenderDelayMs);
+ kMinPlayoutDelayMs, kRenderDelayMs, kRttMs);
VideoReceiveStream::Stats stats = statistics_proxy_->GetStats();
EXPECT_EQ(kDecodeMs, stats.decode_ms);
EXPECT_EQ(kMaxDecodeMs, stats.max_decode_ms);
« no previous file with comments | « webrtc/video/receive_statistics_proxy.cc ('k') | webrtc/video/rtp_stream_receiver.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698