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

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: Introduce proxy object for RtcEventLog and handle other comments. Created 4 years, 9 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 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 int min_bitrate_bps_; 130 int min_bitrate_bps_;
131 131
132 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(WrappingBitrateEstimator); 132 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(WrappingBitrateEstimator);
133 }; 133 };
134 134
135 } // namespace 135 } // namespace
136 136
137 CongestionController::CongestionController( 137 CongestionController::CongestionController(
138 Clock* clock, 138 Clock* clock,
139 BitrateObserver* bitrate_observer, 139 BitrateObserver* bitrate_observer,
140 RemoteBitrateObserver* remote_bitrate_observer) 140 RemoteBitrateObserver* remote_bitrate_observer,
141 RtcEventLog* event_log)
141 : clock_(clock), 142 : clock_(clock),
142 pacer_(new PacedSender(clock_, 143 pacer_(new PacedSender(clock_,
143 &packet_router_, 144 &packet_router_,
144 BitrateController::kDefaultStartBitrateKbps, 145 BitrateController::kDefaultStartBitrateKbps,
145 PacedSender::kDefaultPaceMultiplier * 146 PacedSender::kDefaultPaceMultiplier *
146 BitrateController::kDefaultStartBitrateKbps, 147 BitrateController::kDefaultStartBitrateKbps,
147 0)), 148 0)),
148 remote_bitrate_estimator_( 149 remote_bitrate_estimator_(
149 new WrappingBitrateEstimator(remote_bitrate_observer, clock_)), 150 new WrappingBitrateEstimator(remote_bitrate_observer, clock_)),
150 // Constructed last as this object calls the provided callback on 151 // Constructed last as this object calls the provided callback on
151 // construction. 152 // construction.
152 bitrate_controller_( 153 bitrate_controller_(
153 BitrateController::CreateBitrateController(clock_, bitrate_observer)), 154 BitrateController::CreateBitrateController(clock_,
155 bitrate_observer,
156 event_log)),
154 remote_estimator_proxy_(clock_, &packet_router_), 157 remote_estimator_proxy_(clock_, &packet_router_),
155 transport_feedback_adapter_(bitrate_controller_.get(), clock_), 158 transport_feedback_adapter_(bitrate_controller_.get(), clock_),
156 min_bitrate_bps_(RemoteBitrateEstimator::kDefaultMinBitrateBps) { 159 min_bitrate_bps_(RemoteBitrateEstimator::kDefaultMinBitrateBps) {
157 transport_feedback_adapter_.SetBitrateEstimator( 160 transport_feedback_adapter_.SetBitrateEstimator(
158 new RemoteBitrateEstimatorAbsSendTime(&transport_feedback_adapter_, 161 new RemoteBitrateEstimatorAbsSendTime(&transport_feedback_adapter_,
159 clock_)); 162 clock_));
160 transport_feedback_adapter_.GetBitrateEstimator()->SetMinBitrate( 163 transport_feedback_adapter_.GetBitrateEstimator()->SetMinBitrate(
161 min_bitrate_bps_); 164 min_bitrate_bps_);
162 } 165 }
163 166
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 return std::min(bitrate_controller_->TimeUntilNextProcess(), 243 return std::min(bitrate_controller_->TimeUntilNextProcess(),
241 remote_bitrate_estimator_->TimeUntilNextProcess()); 244 remote_bitrate_estimator_->TimeUntilNextProcess());
242 } 245 }
243 246
244 void CongestionController::Process() { 247 void CongestionController::Process() {
245 bitrate_controller_->Process(); 248 bitrate_controller_->Process();
246 remote_bitrate_estimator_->Process(); 249 remote_bitrate_estimator_->Process();
247 } 250 }
248 251
249 } // namespace webrtc 252 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698