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

Side by Side Diff: webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimators_test.cc

Issue 1151603008: Make the BWE threshold adaptive. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Fix string length issue. Created 5 years, 5 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 unified diff | Download patch
OLDNEW
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 246 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 257
258 private: 258 private:
259 DISALLOW_COPY_AND_ASSIGN(BweFeedbackTest); 259 DISALLOW_COPY_AND_ASSIGN(BweFeedbackTest);
260 }; 260 };
261 261
262 INSTANTIATE_TEST_CASE_P(VideoSendersTest, 262 INSTANTIATE_TEST_CASE_P(VideoSendersTest,
263 BweFeedbackTest, 263 BweFeedbackTest,
264 ::testing::Values(kRembEstimator, 264 ::testing::Values(kRembEstimator,
265 kFullSendSideEstimator)); 265 kFullSendSideEstimator));
266 266
267 TEST_P(BweFeedbackTest, ConstantCapacity) {
268 AdaptiveVideoSource source(0, 30, 300, 0, 0);
269 PacedVideoSender sender(&uplink_, &source, GetParam());
270 ChokeFilter filter(&uplink_, 0);
271 RateCounterFilter counter(&uplink_, 0, "receiver_input");
272 PacketReceiver receiver(&uplink_, 0, GetParam(), false, false);
273 const int kCapacityKbps = 1000;
274 filter.SetCapacity(kCapacityKbps);
275 filter.SetMaxDelay(500);
276 RunFor(180 * 1000);
277 PrintResults(kCapacityKbps, counter.GetBitrateStats(), 0,
278 receiver.GetDelayStats(), counter.GetBitrateStats());
279 }
280
267 TEST_P(BweFeedbackTest, Choke1000kbps500kbps1000kbps) { 281 TEST_P(BweFeedbackTest, Choke1000kbps500kbps1000kbps) {
268 AdaptiveVideoSource source(0, 30, 300, 0, 0); 282 AdaptiveVideoSource source(0, 30, 300, 0, 0);
269 PacedVideoSender sender(&uplink_, &source, GetParam()); 283 PacedVideoSender sender(&uplink_, &source, GetParam());
270 ChokeFilter filter(&uplink_, 0); 284 ChokeFilter filter(&uplink_, 0);
271 RateCounterFilter counter(&uplink_, 0, "receiver_input"); 285 RateCounterFilter counter(&uplink_, 0, "receiver_input");
272 PacketReceiver receiver(&uplink_, 0, GetParam(), false, false); 286 PacketReceiver receiver(&uplink_, 0, GetParam(), false, false);
273 const int kHighCapacityKbps = 1000; 287 const int kHighCapacityKbps = 1000;
274 const int kLowCapacityKbps = 500; 288 const int kLowCapacityKbps = 500;
275 filter.SetCapacity(kHighCapacityKbps); 289 filter.SetCapacity(kHighCapacityKbps);
276 filter.SetMaxDelay(500); 290 filter.SetMaxDelay(500);
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
331 RunFor(300 * 1000); 345 RunFor(300 * 1000);
332 PrintResults(filter.GetBitrateStats().GetMean(), counter2.GetBitrateStats(), 346 PrintResults(filter.GetBitrateStats().GetMean(), counter2.GetBitrateStats(),
333 0, receiver.GetDelayStats(), counter2.GetBitrateStats()); 347 0, receiver.GetDelayStats(), counter2.GetBitrateStats());
334 } 348 }
335 349
336 TEST_P(BweFeedbackTest, PacedSelfFairness50msTest) { 350 TEST_P(BweFeedbackTest, PacedSelfFairness50msTest) {
337 RunFairnessTest(GetParam(), 4, 0, 300, 3000, 50); 351 RunFairnessTest(GetParam(), 4, 0, 300, 3000, 50);
338 } 352 }
339 353
340 TEST_P(BweFeedbackTest, PacedSelfFairness500msTest) { 354 TEST_P(BweFeedbackTest, PacedSelfFairness500msTest) {
341 RunFairnessTest(GetParam(), 4, 0, 300, 3000, 50); 355 RunFairnessTest(GetParam(), 4, 0, 300, 3000, 500);
342 } 356 }
343 357
344 TEST_P(BweFeedbackTest, PacedSelfFairness1000msTest) { 358 TEST_P(BweFeedbackTest, PacedSelfFairness1000msTest) {
345 RunFairnessTest(GetParam(), 4, 0, 300, 3000, 1000); 359 RunFairnessTest(GetParam(), 4, 0, 300, 3000, 1000);
346 } 360 }
347 361
348 TEST_P(BweFeedbackTest, TcpFairness50msTest) { 362 TEST_P(BweFeedbackTest, TcpFairness50msTest) {
349 RunFairnessTest(GetParam(), 1, 1, 300, 2000, 50); 363 RunFairnessTest(GetParam(), 1, 1, 300, 2000, 50);
350 } 364 }
351 365
352 TEST_P(BweFeedbackTest, TcpFairness500msTest) { 366 TEST_P(BweFeedbackTest, TcpFairness500msTest) {
353 RunFairnessTest(GetParam(), 1, 1, 300, 2000, 500); 367 RunFairnessTest(GetParam(), 1, 1, 300, 2000, 500);
354 } 368 }
355 369
356 TEST_P(BweFeedbackTest, TcpFairness1000msTest) { 370 TEST_P(BweFeedbackTest, TcpFairness1000msTest) {
357 RunFairnessTest(GetParam(), 1, 1, 300, 2000, 1000); 371 RunFairnessTest(GetParam(), 1, 1, 300, 2000, 1000);
358 } 372 }
359 } // namespace bwe 373 } // namespace bwe
360 } // namespace testing 374 } // namespace testing
361 } // namespace webrtc 375 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698