OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
140 callback->StatisticsUpdated(ssrc_stats.rtcp_stats, ssrc); | 140 callback->StatisticsUpdated(ssrc_stats.rtcp_stats, ssrc); |
141 } | 141 } |
142 VideoSendStream::Stats stats = statistics_proxy_->GetStats(); | 142 VideoSendStream::Stats stats = statistics_proxy_->GetStats(); |
143 ExpectEqual(expected_, stats); | 143 ExpectEqual(expected_, stats); |
144 } | 144 } |
145 | 145 |
146 TEST_F(SendStatisticsProxyTest, EncodedBitrateAndFramerate) { | 146 TEST_F(SendStatisticsProxyTest, EncodedBitrateAndFramerate) { |
147 int media_bitrate_bps = 500; | 147 int media_bitrate_bps = 500; |
148 int encode_fps = 29; | 148 int encode_fps = 29; |
149 | 149 |
150 statistics_proxy_->OnOutgoingRate(encode_fps, media_bitrate_bps); | 150 statistics_proxy_->OnOutgoingRate(encode_fps, media_bitrate_bps, ""); |
151 | 151 |
152 VideoSendStream::Stats stats = statistics_proxy_->GetStats(); | 152 VideoSendStream::Stats stats = statistics_proxy_->GetStats(); |
153 EXPECT_EQ(media_bitrate_bps, stats.media_bitrate_bps); | 153 EXPECT_EQ(media_bitrate_bps, stats.media_bitrate_bps); |
154 EXPECT_EQ(encode_fps, stats.encode_frame_rate); | 154 EXPECT_EQ(encode_fps, stats.encode_frame_rate); |
155 } | 155 } |
156 | 156 |
157 TEST_F(SendStatisticsProxyTest, Suspended) { | 157 TEST_F(SendStatisticsProxyTest, Suspended) { |
158 // Verify that the value is false by default. | 158 // Verify that the value is false by default. |
159 EXPECT_FALSE(statistics_proxy_->GetStats().suspended); | 159 EXPECT_FALSE(statistics_proxy_->GetStats().suspended); |
160 | 160 |
(...skipping 588 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
749 | 749 |
750 EXPECT_EQ(1, test::NumHistogramSamples( | 750 EXPECT_EQ(1, test::NumHistogramSamples( |
751 "WebRTC.Video.Screenshare.FecBitrateSentInKbps")); | 751 "WebRTC.Video.Screenshare.FecBitrateSentInKbps")); |
752 EXPECT_EQ(static_cast<int>((rtx_counters.fec.TotalBytes() * 2 * 8) / | 752 EXPECT_EQ(static_cast<int>((rtx_counters.fec.TotalBytes() * 2 * 8) / |
753 metrics::kMinRunTimeInSeconds / 1000), | 753 metrics::kMinRunTimeInSeconds / 1000), |
754 test::LastHistogramSample( | 754 test::LastHistogramSample( |
755 "WebRTC.Video.Screenshare.FecBitrateSentInKbps")); | 755 "WebRTC.Video.Screenshare.FecBitrateSentInKbps")); |
756 } | 756 } |
757 | 757 |
758 } // namespace webrtc | 758 } // namespace webrtc |
OLD | NEW |