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_->OnEncoderStatsUpdate(encode_fps, media_bitrate_bps, |
151 "a name"); | |
pbos-webrtc
2016/05/02 00:16:06
"encoder name" or something descriptive
perkj_webrtc
2016/05/02 12:02:12
Done.
| |
151 | 152 |
152 VideoSendStream::Stats stats = statistics_proxy_->GetStats(); | 153 VideoSendStream::Stats stats = statistics_proxy_->GetStats(); |
153 EXPECT_EQ(media_bitrate_bps, stats.media_bitrate_bps); | 154 EXPECT_EQ(media_bitrate_bps, stats.media_bitrate_bps); |
154 EXPECT_EQ(encode_fps, stats.encode_frame_rate); | 155 EXPECT_EQ(encode_fps, stats.encode_frame_rate); |
156 EXPECT_EQ("a name", stats.encoder_implementation_name); | |
155 } | 157 } |
156 | 158 |
157 TEST_F(SendStatisticsProxyTest, Suspended) { | 159 TEST_F(SendStatisticsProxyTest, Suspended) { |
158 // Verify that the value is false by default. | 160 // Verify that the value is false by default. |
159 EXPECT_FALSE(statistics_proxy_->GetStats().suspended); | 161 EXPECT_FALSE(statistics_proxy_->GetStats().suspended); |
160 | 162 |
161 // Verify that we can set it to true. | 163 // Verify that we can set it to true. |
162 statistics_proxy_->OnSuspendChange(true); | 164 statistics_proxy_->OnSuspendChange(true); |
163 EXPECT_TRUE(statistics_proxy_->GetStats().suspended); | 165 EXPECT_TRUE(statistics_proxy_->GetStats().suspended); |
164 | 166 |
(...skipping 584 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
749 | 751 |
750 EXPECT_EQ(1, test::NumHistogramSamples( | 752 EXPECT_EQ(1, test::NumHistogramSamples( |
751 "WebRTC.Video.Screenshare.FecBitrateSentInKbps")); | 753 "WebRTC.Video.Screenshare.FecBitrateSentInKbps")); |
752 EXPECT_EQ(static_cast<int>((rtx_counters.fec.TotalBytes() * 2 * 8) / | 754 EXPECT_EQ(static_cast<int>((rtx_counters.fec.TotalBytes() * 2 * 8) / |
753 metrics::kMinRunTimeInSeconds / 1000), | 755 metrics::kMinRunTimeInSeconds / 1000), |
754 test::LastHistogramSample( | 756 test::LastHistogramSample( |
755 "WebRTC.Video.Screenshare.FecBitrateSentInKbps")); | 757 "WebRTC.Video.Screenshare.FecBitrateSentInKbps")); |
756 } | 758 } |
757 | 759 |
758 } // namespace webrtc | 760 } // namespace webrtc |
OLD | NEW |