| 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 284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 295 << (state == kNetworkUp ? "Up" : "Down"); | 295 << (state == kNetworkUp ? "Up" : "Down"); |
| 296 if (state == kNetworkUp) { | 296 if (state == kNetworkUp) { |
| 297 pacer_->Resume(); | 297 pacer_->Resume(); |
| 298 } else { | 298 } else { |
| 299 pacer_->Pause(); | 299 pacer_->Pause(); |
| 300 } | 300 } |
| 301 { | 301 { |
| 302 rtc::CritScope cs(&critsect_); | 302 rtc::CritScope cs(&critsect_); |
| 303 network_state_ = state; | 303 network_state_ = state; |
| 304 } | 304 } |
| 305 probe_controller_->OnNetworkStateChanged(state); |
| 305 MaybeTriggerOnNetworkChanged(); | 306 MaybeTriggerOnNetworkChanged(); |
| 306 } | 307 } |
| 307 | 308 |
| 308 void CongestionController::OnSentPacket(const rtc::SentPacket& sent_packet) { | 309 void CongestionController::OnSentPacket(const rtc::SentPacket& sent_packet) { |
| 309 transport_feedback_adapter_.OnSentPacket(sent_packet.packet_id, | 310 transport_feedback_adapter_.OnSentPacket(sent_packet.packet_id, |
| 310 sent_packet.send_time_ms); | 311 sent_packet.send_time_ms); |
| 311 } | 312 } |
| 312 | 313 |
| 313 void CongestionController::OnRttUpdate(int64_t avg_rtt_ms, int64_t max_rtt_ms) { | 314 void CongestionController::OnRttUpdate(int64_t avg_rtt_ms, int64_t max_rtt_ms) { |
| 314 remote_bitrate_estimator_->OnRttUpdate(avg_rtt_ms, max_rtt_ms); | 315 remote_bitrate_estimator_->OnRttUpdate(avg_rtt_ms, max_rtt_ms); |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 372 bool CongestionController::IsSendQueueFull() const { | 373 bool CongestionController::IsSendQueueFull() const { |
| 373 return pacer_->ExpectedQueueTimeMs() > PacedSender::kMaxQueueLengthMs; | 374 return pacer_->ExpectedQueueTimeMs() > PacedSender::kMaxQueueLengthMs; |
| 374 } | 375 } |
| 375 | 376 |
| 376 bool CongestionController::IsNetworkDown() const { | 377 bool CongestionController::IsNetworkDown() const { |
| 377 rtc::CritScope cs(&critsect_); | 378 rtc::CritScope cs(&critsect_); |
| 378 return network_state_ == kNetworkDown; | 379 return network_state_ == kNetworkDown; |
| 379 } | 380 } |
| 380 | 381 |
| 381 } // namespace webrtc | 382 } // namespace webrtc |
| OLD | NEW |