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 c966c1c7b0eb11207c1ae16acbbd68e6ad7d6b00..ba4ad3aed7b9a7ea96ff00e83dba9b7e765e7e19 100644 |
--- a/webrtc/video/receive_statistics_proxy_unittest.cc |
+++ b/webrtc/video/receive_statistics_proxy_unittest.cc |
@@ -119,12 +119,14 @@ TEST_F(ReceiveStatisticsProxyTest, GetStatsReportsDecoderImplementationName) { |
kName, statistics_proxy_->GetStats().decoder_implementation_name.c_str()); |
} |
-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, 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, GetStatsReportsDecodeTimingStats) { |
@@ -136,9 +138,10 @@ TEST_F(ReceiveStatisticsProxyTest, GetStatsReportsDecodeTimingStats) { |
const int kMinPlayoutDelayMs = 6; |
const int kRenderDelayMs = 7; |
const int64_t kRttMs = 8; |
- statistics_proxy_->OnDecoderTiming( |
+ statistics_proxy_->OnRttUpdate(kRttMs, 0); |
+ statistics_proxy_->OnFrameBufferTimingsUpdated( |
kDecodeMs, kMaxDecodeMs, kCurrentDelayMs, kTargetDelayMs, kJitterBufferMs, |
- kMinPlayoutDelayMs, kRenderDelayMs, kRttMs); |
+ kMinPlayoutDelayMs, kRenderDelayMs); |
VideoReceiveStream::Stats stats = statistics_proxy_->GetStats(); |
EXPECT_EQ(kDecodeMs, stats.decode_ms); |
EXPECT_EQ(kMaxDecodeMs, stats.max_decode_ms); |