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 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
297 } | 297 } |
298 { | 298 { |
299 rtc::CritScope cs(&critsect_); | 299 rtc::CritScope cs(&critsect_); |
300 network_state_ = state; | 300 network_state_ = state; |
301 } | 301 } |
302 MaybeTriggerOnNetworkChanged(); | 302 MaybeTriggerOnNetworkChanged(); |
303 } | 303 } |
304 | 304 |
305 void CongestionController::OnSentPacket(const rtc::SentPacket& sent_packet) { | 305 void CongestionController::OnSentPacket(const rtc::SentPacket& sent_packet) { |
306 transport_feedback_adapter_.OnSentPacket(sent_packet.packet_id, | 306 transport_feedback_adapter_.OnSentPacket(sent_packet.packet_id, |
307 sent_packet.send_time_ms); | 307 sent_packet.send_time_ms); |
308 } | 308 } |
309 | 309 |
310 void CongestionController::OnRttUpdate(int64_t avg_rtt_ms, int64_t max_rtt_ms) { | 310 void CongestionController::OnRttUpdate(int64_t avg_rtt_ms, int64_t max_rtt_ms) { |
311 remote_bitrate_estimator_->OnRttUpdate(avg_rtt_ms, max_rtt_ms); | 311 remote_bitrate_estimator_->OnRttUpdate(avg_rtt_ms, max_rtt_ms); |
312 transport_feedback_adapter_.OnRttUpdate(avg_rtt_ms, max_rtt_ms); | 312 transport_feedback_adapter_.OnRttUpdate(avg_rtt_ms, max_rtt_ms); |
313 | 313 |
314 int64_t nack_window_size_ms = max_rtt_ms; | 314 int64_t nack_window_size_ms = max_rtt_ms; |
315 if (nack_window_size_ms > kMaxRetransmitWindowSizeMs) { | 315 if (nack_window_size_ms > kMaxRetransmitWindowSizeMs) { |
316 nack_window_size_ms = kMaxRetransmitWindowSizeMs; | 316 nack_window_size_ms = kMaxRetransmitWindowSizeMs; |
317 } else if (nack_window_size_ms < kMinRetransmitWindowSizeMs) { | 317 } else if (nack_window_size_ms < kMinRetransmitWindowSizeMs) { |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
376 bool CongestionController::IsSendQueueFull() const { | 376 bool CongestionController::IsSendQueueFull() const { |
377 return pacer_->ExpectedQueueTimeMs() > PacedSender::kMaxQueueLengthMs; | 377 return pacer_->ExpectedQueueTimeMs() > PacedSender::kMaxQueueLengthMs; |
378 } | 378 } |
379 | 379 |
380 bool CongestionController::IsNetworkDown() const { | 380 bool CongestionController::IsNetworkDown() const { |
381 rtc::CritScope cs(&critsect_); | 381 rtc::CritScope cs(&critsect_); |
382 return network_state_ == kNetworkDown; | 382 return network_state_ == kNetworkDown; |
383 } | 383 } |
384 | 384 |
385 } // namespace webrtc | 385 } // namespace webrtc |
OLD | NEW |