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

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

Issue 1748403002: Move RtcEventLog object from inside VoiceEngine to Call. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Fix for failing tests. Created 4 years, 8 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) 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2012 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 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 int min_bitrate_bps_; 131 int min_bitrate_bps_;
132 132
133 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(WrappingBitrateEstimator); 133 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(WrappingBitrateEstimator);
134 }; 134 };
135 135
136 } // namespace 136 } // namespace
137 137
138 CongestionController::CongestionController( 138 CongestionController::CongestionController(
139 Clock* clock, 139 Clock* clock,
140 BitrateObserver* bitrate_observer, 140 BitrateObserver* bitrate_observer,
141 RemoteBitrateObserver* remote_bitrate_observer) 141 RemoteBitrateObserver* remote_bitrate_observer,
142 RtcEventLog* event_log)
142 : clock_(clock), 143 : clock_(clock),
143 pacer_(new PacedSender(clock_, 144 pacer_(new PacedSender(clock_,
144 &packet_router_, 145 &packet_router_,
145 BitrateController::kDefaultStartBitrateKbps, 146 BitrateController::kDefaultStartBitrateKbps,
146 PacedSender::kDefaultPaceMultiplier * 147 PacedSender::kDefaultPaceMultiplier *
147 BitrateController::kDefaultStartBitrateKbps, 148 BitrateController::kDefaultStartBitrateKbps,
148 0)), 149 0)),
149 remote_bitrate_estimator_( 150 remote_bitrate_estimator_(
150 new WrappingBitrateEstimator(remote_bitrate_observer, clock_)), 151 new WrappingBitrateEstimator(remote_bitrate_observer, clock_)),
151 // Constructed last as this object calls the provided callback on 152 // Constructed last as this object calls the provided callback on
152 // construction. 153 // construction.
153 bitrate_controller_( 154 bitrate_controller_(
154 BitrateController::CreateBitrateController(clock_, bitrate_observer)), 155 BitrateController::CreateBitrateController(clock_,
156 bitrate_observer,
157 event_log)),
155 remote_estimator_proxy_(clock_, &packet_router_), 158 remote_estimator_proxy_(clock_, &packet_router_),
156 transport_feedback_adapter_(bitrate_controller_.get(), clock_), 159 transport_feedback_adapter_(bitrate_controller_.get(), clock_),
157 min_bitrate_bps_(RemoteBitrateEstimator::kDefaultMinBitrateBps) { 160 min_bitrate_bps_(RemoteBitrateEstimator::kDefaultMinBitrateBps) {
158 transport_feedback_adapter_.SetBitrateEstimator( 161 transport_feedback_adapter_.SetBitrateEstimator(
159 new RemoteBitrateEstimatorAbsSendTime(&transport_feedback_adapter_, 162 new RemoteBitrateEstimatorAbsSendTime(&transport_feedback_adapter_,
160 clock_)); 163 clock_));
161 transport_feedback_adapter_.GetBitrateEstimator()->SetMinBitrate( 164 transport_feedback_adapter_.GetBitrateEstimator()->SetMinBitrate(
162 min_bitrate_bps_); 165 min_bitrate_bps_);
163 } 166 }
164 167
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 return std::min(bitrate_controller_->TimeUntilNextProcess(), 242 return std::min(bitrate_controller_->TimeUntilNextProcess(),
240 remote_bitrate_estimator_->TimeUntilNextProcess()); 243 remote_bitrate_estimator_->TimeUntilNextProcess());
241 } 244 }
242 245
243 void CongestionController::Process() { 246 void CongestionController::Process() {
244 bitrate_controller_->Process(); 247 bitrate_controller_->Process();
245 remote_bitrate_estimator_->Process(); 248 remote_bitrate_estimator_->Process();
246 } 249 }
247 250
248 } // namespace webrtc 251 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698