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