| 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 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 281 } | 281 } |
| 282 | 282 |
| 283 void CongestionController::OnSentPacket(const rtc::SentPacket& sent_packet) { | 283 void CongestionController::OnSentPacket(const rtc::SentPacket& sent_packet) { |
| 284 transport_feedback_adapter_.OnSentPacket(sent_packet.packet_id, | 284 transport_feedback_adapter_.OnSentPacket(sent_packet.packet_id, |
| 285 sent_packet.send_time_ms); | 285 sent_packet.send_time_ms); |
| 286 } | 286 } |
| 287 | 287 |
| 288 void CongestionController::OnRttUpdate(int64_t avg_rtt_ms, int64_t max_rtt_ms) { | 288 void CongestionController::OnRttUpdate(int64_t avg_rtt_ms, int64_t max_rtt_ms) { |
| 289 remote_bitrate_estimator_->OnRttUpdate(avg_rtt_ms, max_rtt_ms); | 289 remote_bitrate_estimator_->OnRttUpdate(avg_rtt_ms, max_rtt_ms); |
| 290 transport_feedback_adapter_.OnRttUpdate(avg_rtt_ms, max_rtt_ms); | 290 transport_feedback_adapter_.OnRttUpdate(avg_rtt_ms, max_rtt_ms); |
| 291 pacer_->OnRttUpdate(max_rtt_ms); |
| 291 } | 292 } |
| 292 | 293 |
| 293 int64_t CongestionController::TimeUntilNextProcess() { | 294 int64_t CongestionController::TimeUntilNextProcess() { |
| 294 return std::min(bitrate_controller_->TimeUntilNextProcess(), | 295 return std::min(bitrate_controller_->TimeUntilNextProcess(), |
| 295 remote_bitrate_estimator_->TimeUntilNextProcess()); | 296 remote_bitrate_estimator_->TimeUntilNextProcess()); |
| 296 } | 297 } |
| 297 | 298 |
| 298 void CongestionController::Process() { | 299 void CongestionController::Process() { |
| 299 bitrate_controller_->Process(); | 300 bitrate_controller_->Process(); |
| 300 remote_bitrate_estimator_->Process(); | 301 remote_bitrate_estimator_->Process(); |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 340 bool CongestionController::IsSendQueueFull() const { | 341 bool CongestionController::IsSendQueueFull() const { |
| 341 return pacer_->ExpectedQueueTimeMs() > PacedSender::kMaxQueueLengthMs; | 342 return pacer_->ExpectedQueueTimeMs() > PacedSender::kMaxQueueLengthMs; |
| 342 } | 343 } |
| 343 | 344 |
| 344 bool CongestionController::IsNetworkDown() const { | 345 bool CongestionController::IsNetworkDown() const { |
| 345 rtc::CritScope cs(&critsect_); | 346 rtc::CritScope cs(&critsect_); |
| 346 return network_state_ == kNetworkDown; | 347 return network_state_ == kNetworkDown; |
| 347 } | 348 } |
| 348 | 349 |
| 349 } // namespace webrtc | 350 } // namespace webrtc |
| OLD | NEW |