OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2016 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 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
168 // Simulate a client leaving and rejoining the call after some multiple of | 168 // Simulate a client leaving and rejoining the call after some multiple of |
169 // 64 seconds later. This will cause a zero difference in abs send times due | 169 // 64 seconds later. This will cause a zero difference in abs send times due |
170 // to the wrap, but a big difference in arrival time, if streams aren't | 170 // to the wrap, but a big difference in arrival time, if streams aren't |
171 // properly timed out. | 171 // properly timed out. |
172 TestWrappingHelper(10 * 64); | 172 TestWrappingHelper(10 * 64); |
173 } | 173 } |
174 | 174 |
175 class DelayBasedBweExperimentTest : public DelayBasedBweTest { | 175 class DelayBasedBweExperimentTest : public DelayBasedBweTest { |
176 public: | 176 public: |
177 DelayBasedBweExperimentTest() | 177 DelayBasedBweExperimentTest() |
178 : override_field_trials_("WebRTC-ImprovedBitrateEstimate/Enabled/") {} | 178 : override_field_trials_("WebRTC-ImprovedBitrateEstimate/Enabled/") { |
179 | |
180 protected: | |
181 void SetUp() override { | |
182 bitrate_estimator_.reset(new DelayBasedBwe(&clock_)); | 179 bitrate_estimator_.reset(new DelayBasedBwe(&clock_)); |
183 } | 180 } |
184 | 181 |
| 182 private: |
185 test::ScopedFieldTrials override_field_trials_; | 183 test::ScopedFieldTrials override_field_trials_; |
186 }; | 184 }; |
187 | 185 |
188 TEST_F(DelayBasedBweExperimentTest, RateIncreaseRtpTimestamps) { | 186 TEST_F(DelayBasedBweExperimentTest, RateIncreaseRtpTimestamps) { |
189 RateIncreaseRtpTimestampsTestHelper(1288); | 187 RateIncreaseRtpTimestampsTestHelper(1288); |
190 } | 188 } |
191 | 189 |
192 TEST_F(DelayBasedBweExperimentTest, CapacityDropOneStream) { | 190 TEST_F(DelayBasedBweExperimentTest, CapacityDropOneStream) { |
193 CapacityDropTestHelper(1, false, 333, 0); | 191 CapacityDropTestHelper(1, false, 333, 0); |
194 } | 192 } |
195 | 193 |
196 TEST_F(DelayBasedBweExperimentTest, CapacityDropPosOffsetChange) { | 194 TEST_F(DelayBasedBweExperimentTest, CapacityDropPosOffsetChange) { |
197 CapacityDropTestHelper(1, false, 300, 30000); | 195 CapacityDropTestHelper(1, false, 300, 30000); |
198 } | 196 } |
199 | 197 |
200 TEST_F(DelayBasedBweExperimentTest, CapacityDropNegOffsetChange) { | 198 TEST_F(DelayBasedBweExperimentTest, CapacityDropNegOffsetChange) { |
201 CapacityDropTestHelper(1, false, 300, -30000); | 199 CapacityDropTestHelper(1, false, 300, -30000); |
202 } | 200 } |
203 | 201 |
204 TEST_F(DelayBasedBweExperimentTest, CapacityDropOneStreamWrap) { | 202 TEST_F(DelayBasedBweExperimentTest, CapacityDropOneStreamWrap) { |
205 CapacityDropTestHelper(1, true, 333, 0); | 203 CapacityDropTestHelper(1, true, 333, 0); |
206 } | 204 } |
207 | 205 |
208 class DelayBasedBweTrendlineExperimentTest : public DelayBasedBweTest { | 206 class DelayBasedBweTrendlineExperimentTest : public DelayBasedBweTest { |
209 public: | 207 public: |
210 DelayBasedBweTrendlineExperimentTest() | 208 DelayBasedBweTrendlineExperimentTest() |
211 : override_field_trials_("WebRTC-BweTrendlineFilter/Enabled-15,0.9,4/") {} | 209 : override_field_trials_("WebRTC-BweTrendlineFilter/Enabled-15,0.9,4/") { |
212 | |
213 protected: | |
214 void SetUp() override { | |
215 bitrate_estimator_.reset(new DelayBasedBwe(&clock_)); | 210 bitrate_estimator_.reset(new DelayBasedBwe(&clock_)); |
216 } | 211 } |
217 | 212 |
| 213 private: |
218 test::ScopedFieldTrials override_field_trials_; | 214 test::ScopedFieldTrials override_field_trials_; |
219 }; | 215 }; |
220 | 216 |
221 TEST_F(DelayBasedBweTrendlineExperimentTest, RateIncreaseRtpTimestamps) { | 217 TEST_F(DelayBasedBweTrendlineExperimentTest, RateIncreaseRtpTimestamps) { |
222 RateIncreaseRtpTimestampsTestHelper(1240); | 218 RateIncreaseRtpTimestampsTestHelper(1240); |
223 } | 219 } |
224 | 220 |
225 TEST_F(DelayBasedBweTrendlineExperimentTest, CapacityDropOneStream) { | 221 TEST_F(DelayBasedBweTrendlineExperimentTest, CapacityDropOneStream) { |
226 CapacityDropTestHelper(1, false, 600, 0); | 222 CapacityDropTestHelper(1, false, 600, 0); |
227 } | 223 } |
228 | 224 |
229 TEST_F(DelayBasedBweTrendlineExperimentTest, CapacityDropPosOffsetChange) { | 225 TEST_F(DelayBasedBweTrendlineExperimentTest, CapacityDropPosOffsetChange) { |
230 CapacityDropTestHelper(1, false, 600, 30000); | 226 CapacityDropTestHelper(1, false, 600, 30000); |
231 } | 227 } |
232 | 228 |
233 TEST_F(DelayBasedBweTrendlineExperimentTest, CapacityDropNegOffsetChange) { | 229 TEST_F(DelayBasedBweTrendlineExperimentTest, CapacityDropNegOffsetChange) { |
234 CapacityDropTestHelper(1, false, 1267, -30000); | 230 CapacityDropTestHelper(1, false, 1267, -30000); |
235 } | 231 } |
236 | 232 |
237 TEST_F(DelayBasedBweTrendlineExperimentTest, CapacityDropOneStreamWrap) { | 233 TEST_F(DelayBasedBweTrendlineExperimentTest, CapacityDropOneStreamWrap) { |
238 CapacityDropTestHelper(1, true, 600, 0); | 234 CapacityDropTestHelper(1, true, 600, 0); |
239 } | 235 } |
240 | 236 |
| 237 class DelayBasedBweMedianSlopeExperimentTest : public DelayBasedBweTest { |
| 238 public: |
| 239 DelayBasedBweMedianSlopeExperimentTest() |
| 240 : override_field_trials_("WebRTC-BweMedianSlopeFilter/Enabled-20,4/") { |
| 241 bitrate_estimator_.reset(new DelayBasedBwe(&clock_)); |
| 242 } |
| 243 |
| 244 private: |
| 245 test::ScopedFieldTrials override_field_trials_; |
| 246 }; |
| 247 |
| 248 TEST_F(DelayBasedBweMedianSlopeExperimentTest, RateIncreaseRtpTimestamps) { |
| 249 RateIncreaseRtpTimestampsTestHelper(1240); |
| 250 } |
| 251 |
| 252 TEST_F(DelayBasedBweMedianSlopeExperimentTest, CapacityDropOneStream) { |
| 253 CapacityDropTestHelper(1, false, 600, 0); |
| 254 } |
| 255 |
| 256 TEST_F(DelayBasedBweMedianSlopeExperimentTest, CapacityDropPosOffsetChange) { |
| 257 CapacityDropTestHelper(1, false, 600, 30000); |
| 258 } |
| 259 |
| 260 TEST_F(DelayBasedBweMedianSlopeExperimentTest, CapacityDropNegOffsetChange) { |
| 261 CapacityDropTestHelper(1, false, 1267, -30000); |
| 262 } |
| 263 |
| 264 TEST_F(DelayBasedBweMedianSlopeExperimentTest, CapacityDropOneStreamWrap) { |
| 265 CapacityDropTestHelper(1, true, 600, 0); |
| 266 } |
| 267 |
241 } // namespace webrtc | 268 } // namespace webrtc |
OLD | NEW |