| 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 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 283 } | 283 } |
| 284 { | 284 { |
| 285 rtc::CritScope cs(&critsect_); | 285 rtc::CritScope cs(&critsect_); |
| 286 network_state_ = state; | 286 network_state_ = state; |
| 287 } | 287 } |
| 288 probe_controller_->OnNetworkStateChanged(state); | 288 probe_controller_->OnNetworkStateChanged(state); |
| 289 MaybeTriggerOnNetworkChanged(); | 289 MaybeTriggerOnNetworkChanged(); |
| 290 } | 290 } |
| 291 | 291 |
| 292 void CongestionController::OnSentPacket(const rtc::SentPacket& sent_packet) { | 292 void CongestionController::OnSentPacket(const rtc::SentPacket& sent_packet) { |
| 293 // We're not interested in packets without an id, which may be stun packets, |
| 294 // etc, sent on the same transport. |
| 295 if (sent_packet.packet_id == -1) |
| 296 return; |
| 293 transport_feedback_adapter_.OnSentPacket(sent_packet.packet_id, | 297 transport_feedback_adapter_.OnSentPacket(sent_packet.packet_id, |
| 294 sent_packet.send_time_ms); | 298 sent_packet.send_time_ms); |
| 295 } | 299 } |
| 296 | 300 |
| 297 void CongestionController::OnRttUpdate(int64_t avg_rtt_ms, int64_t max_rtt_ms) { | 301 void CongestionController::OnRttUpdate(int64_t avg_rtt_ms, int64_t max_rtt_ms) { |
| 298 remote_bitrate_estimator_->OnRttUpdate(avg_rtt_ms, max_rtt_ms); | 302 remote_bitrate_estimator_->OnRttUpdate(avg_rtt_ms, max_rtt_ms); |
| 299 transport_feedback_adapter_.OnRttUpdate(avg_rtt_ms, max_rtt_ms); | 303 transport_feedback_adapter_.OnRttUpdate(avg_rtt_ms, max_rtt_ms); |
| 300 } | 304 } |
| 301 | 305 |
| 302 int64_t CongestionController::TimeUntilNextProcess() { | 306 int64_t CongestionController::TimeUntilNextProcess() { |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 360 bool CongestionController::IsSendQueueFull() const { | 364 bool CongestionController::IsSendQueueFull() const { |
| 361 return pacer_->ExpectedQueueTimeMs() > PacedSender::kMaxQueueLengthMs; | 365 return pacer_->ExpectedQueueTimeMs() > PacedSender::kMaxQueueLengthMs; |
| 362 } | 366 } |
| 363 | 367 |
| 364 bool CongestionController::IsNetworkDown() const { | 368 bool CongestionController::IsNetworkDown() const { |
| 365 rtc::CritScope cs(&critsect_); | 369 rtc::CritScope cs(&critsect_); |
| 366 return network_state_ == kNetworkDown; | 370 return network_state_ == kNetworkDown; |
| 367 } | 371 } |
| 368 | 372 |
| 369 } // namespace webrtc | 373 } // namespace webrtc |
| OLD | NEW |