| OLD | NEW |
| 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 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 162 observer_(observer), | 162 observer_(observer), |
| 163 packet_router_(new PacketRouter()), | 163 packet_router_(new PacketRouter()), |
| 164 pacer_(new PacedSender(clock_, packet_router_.get())), | 164 pacer_(new PacedSender(clock_, packet_router_.get())), |
| 165 remote_bitrate_estimator_( | 165 remote_bitrate_estimator_( |
| 166 new WrappingBitrateEstimator(remote_bitrate_observer, clock_)), | 166 new WrappingBitrateEstimator(remote_bitrate_observer, clock_)), |
| 167 bitrate_controller_( | 167 bitrate_controller_( |
| 168 BitrateController::CreateBitrateController(clock_, event_log)), | 168 BitrateController::CreateBitrateController(clock_, event_log)), |
| 169 probe_controller_(new ProbeController(pacer_.get(), clock_)), | 169 probe_controller_(new ProbeController(pacer_.get(), clock_)), |
| 170 retransmission_rate_limiter_( | 170 retransmission_rate_limiter_( |
| 171 new RateLimiter(clock, kRetransmitWindowSizeMs)), | 171 new RateLimiter(clock, kRetransmitWindowSizeMs)), |
| 172 remote_estimator_proxy_(clock_, packet_router_.get()), | 172 remote_estimator_proxy_( |
| 173 clock_, |
| 174 packet_router_.get(), |
| 175 std::unique_ptr<rtc::RateTracker>(new rtc::RateTracker(1000, 1))), |
| 173 transport_feedback_adapter_(clock_, bitrate_controller_.get()), | 176 transport_feedback_adapter_(clock_, bitrate_controller_.get()), |
| 174 min_bitrate_bps_(RemoteBitrateEstimator::kDefaultMinBitrateBps), | 177 min_bitrate_bps_(RemoteBitrateEstimator::kDefaultMinBitrateBps), |
| 175 max_bitrate_bps_(0), | 178 max_bitrate_bps_(0), |
| 176 last_reported_bitrate_bps_(0), | 179 last_reported_bitrate_bps_(0), |
| 177 last_reported_fraction_loss_(0), | 180 last_reported_fraction_loss_(0), |
| 178 last_reported_rtt_(0), | 181 last_reported_rtt_(0), |
| 179 network_state_(kNetworkUp) { | 182 network_state_(kNetworkUp) { |
| 180 Init(); | 183 Init(); |
| 181 } | 184 } |
| 182 | 185 |
| (...skipping 10 matching lines...) Expand all Loading... |
| 193 pacer_(std::move(pacer)), | 196 pacer_(std::move(pacer)), |
| 194 remote_bitrate_estimator_( | 197 remote_bitrate_estimator_( |
| 195 new WrappingBitrateEstimator(remote_bitrate_observer, clock_)), | 198 new WrappingBitrateEstimator(remote_bitrate_observer, clock_)), |
| 196 // Constructed last as this object calls the provided callback on | 199 // Constructed last as this object calls the provided callback on |
| 197 // construction. | 200 // construction. |
| 198 bitrate_controller_( | 201 bitrate_controller_( |
| 199 BitrateController::CreateBitrateController(clock_, event_log)), | 202 BitrateController::CreateBitrateController(clock_, event_log)), |
| 200 probe_controller_(new ProbeController(pacer_.get(), clock_)), | 203 probe_controller_(new ProbeController(pacer_.get(), clock_)), |
| 201 retransmission_rate_limiter_( | 204 retransmission_rate_limiter_( |
| 202 new RateLimiter(clock, kRetransmitWindowSizeMs)), | 205 new RateLimiter(clock, kRetransmitWindowSizeMs)), |
| 203 remote_estimator_proxy_(clock_, packet_router_.get()), | 206 remote_estimator_proxy_( |
| 207 clock_, |
| 208 packet_router_.get(), |
| 209 std::unique_ptr<rtc::RateTracker>(new rtc::RateTracker(1000, 1))), |
| 204 transport_feedback_adapter_(clock_, bitrate_controller_.get()), | 210 transport_feedback_adapter_(clock_, bitrate_controller_.get()), |
| 205 min_bitrate_bps_(RemoteBitrateEstimator::kDefaultMinBitrateBps), | 211 min_bitrate_bps_(RemoteBitrateEstimator::kDefaultMinBitrateBps), |
| 206 max_bitrate_bps_(0), | 212 max_bitrate_bps_(0), |
| 207 last_reported_bitrate_bps_(0), | 213 last_reported_bitrate_bps_(0), |
| 208 last_reported_fraction_loss_(0), | 214 last_reported_fraction_loss_(0), |
| 209 last_reported_rtt_(0), | 215 last_reported_rtt_(0), |
| 210 network_state_(kNetworkUp) { | 216 network_state_(kNetworkUp) { |
| 211 Init(); | 217 Init(); |
| 212 } | 218 } |
| 213 | 219 |
| (...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 372 bool CongestionController::IsSendQueueFull() const { | 378 bool CongestionController::IsSendQueueFull() const { |
| 373 return pacer_->ExpectedQueueTimeMs() > PacedSender::kMaxQueueLengthMs; | 379 return pacer_->ExpectedQueueTimeMs() > PacedSender::kMaxQueueLengthMs; |
| 374 } | 380 } |
| 375 | 381 |
| 376 bool CongestionController::IsNetworkDown() const { | 382 bool CongestionController::IsNetworkDown() const { |
| 377 rtc::CritScope cs(&critsect_); | 383 rtc::CritScope cs(&critsect_); |
| 378 return network_state_ == kNetworkDown; | 384 return network_state_ == kNetworkDown; |
| 379 } | 385 } |
| 380 | 386 |
| 381 } // namespace webrtc | 387 } // namespace webrtc |
| OLD | NEW |