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

Side by Side Diff: webrtc/modules/congestion_controller/delay_based_bwe_unittest_helper.cc

Issue 2235373004: Probing: Add support for exponential startup probing (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@fix_probing2
Patch Set: lint fix Created 4 years, 3 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) 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 #include "webrtc/modules/congestion_controller/delay_based_bwe_unittest_helper.h " 10 #include "webrtc/modules/congestion_controller/delay_based_bwe_unittest_helper.h "
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 } 145 }
146 it = std::min_element(streams_.begin(), streams_.end(), RtpStream::Compare); 146 it = std::min_element(streams_.begin(), streams_.end(), RtpStream::Compare);
147 return std::max((*it)->next_rtp_time(), time_now_us); 147 return std::max((*it)->next_rtp_time(), time_now_us);
148 } 148 }
149 } // namespace test 149 } // namespace test
150 150
151 DelayBasedBweTest::DelayBasedBweTest() 151 DelayBasedBweTest::DelayBasedBweTest()
152 : clock_(100000000), 152 : clock_(100000000),
153 bitrate_observer_(new test::TestBitrateObserver), 153 bitrate_observer_(new test::TestBitrateObserver),
154 bitrate_estimator_(new DelayBasedBwe(bitrate_observer_.get(), &clock_)), 154 bitrate_estimator_(new DelayBasedBwe(bitrate_observer_.get(), &clock_)),
155 stream_generator_( 155 stream_generator_(new test::StreamGenerator(1e6, // Capacity.
156 new test::StreamGenerator(1e6, // Capacity. 156 clock_.TimeInMicroseconds())),
157 clock_.TimeInMicroseconds())),
158 arrival_time_offset_ms_(0) {} 157 arrival_time_offset_ms_(0) {}
159 158
160 DelayBasedBweTest::~DelayBasedBweTest() {} 159 DelayBasedBweTest::~DelayBasedBweTest() {}
161 160
162 void DelayBasedBweTest::AddDefaultStream() { 161 void DelayBasedBweTest::AddDefaultStream() {
163 stream_generator_->AddStream(new test::RtpStream(30, 3e5)); 162 stream_generator_->AddStream(new test::RtpStream(30, 3e5));
164 } 163 }
165 164
166 const uint32_t DelayBasedBweTest::kDefaultSsrc = 0; 165 const uint32_t DelayBasedBweTest::kDefaultSsrc = 0;
167 166
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after
495 sequence_number++, 1000); 494 sequence_number++, 1000);
496 clock_.AdvanceTimeMilliseconds(2 * kFrameIntervalMs); 495 clock_.AdvanceTimeMilliseconds(2 * kFrameIntervalMs);
497 send_time_ms += kFrameIntervalMs; 496 send_time_ms += kFrameIntervalMs;
498 bitrate_estimator_->Process(); 497 bitrate_estimator_->Process();
499 } 498 }
500 uint32_t bitrate_after = 0; 499 uint32_t bitrate_after = 0;
501 bitrate_estimator_->LatestEstimate(&ssrcs, &bitrate_after); 500 bitrate_estimator_->LatestEstimate(&ssrcs, &bitrate_after);
502 EXPECT_LT(bitrate_after, bitrate_before); 501 EXPECT_LT(bitrate_after, bitrate_before);
503 } 502 }
504 } // namespace webrtc 503 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698