| 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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 // Implements CallStatsObserver. | 88 // Implements CallStatsObserver. |
| 89 void OnRttUpdate(int64_t avg_rtt_ms, int64_t max_rtt_ms) override; | 89 void OnRttUpdate(int64_t avg_rtt_ms, int64_t max_rtt_ms) override; |
| 90 | 90 |
| 91 // Implements Module. | 91 // Implements Module. |
| 92 int64_t TimeUntilNextProcess() override; | 92 int64_t TimeUntilNextProcess() override; |
| 93 void Process() override; | 93 void Process() override; |
| 94 | 94 |
| 95 private: | 95 private: |
| 96 void Init(); | 96 void Init(); |
| 97 void MaybeTriggerOnNetworkChanged(); | 97 void MaybeTriggerOnNetworkChanged(); |
| 98 // Updates |send_queue_is_full_|. Returns true if |send_queue_is_full_| | |
| 99 // has changed. | |
| 100 bool UpdateSendQueueStatus(bool send_queue_is_full); | |
| 101 | 98 |
| 99 bool IsSendQueueFull() const; |
| 100 bool IsNetworkDown() const; |
| 101 bool HasNetworkParametersToReportChanged(uint32_t bitrate_bps, |
| 102 uint8_t fraction_loss, |
| 103 int64_t rtt); |
| 102 Clock* const clock_; | 104 Clock* const clock_; |
| 103 Observer* const observer_; | 105 Observer* const observer_; |
| 104 const std::unique_ptr<PacketRouter> packet_router_; | 106 const std::unique_ptr<PacketRouter> packet_router_; |
| 105 const std::unique_ptr<PacedSender> pacer_; | 107 const std::unique_ptr<PacedSender> pacer_; |
| 106 const std::unique_ptr<RemoteBitrateEstimator> remote_bitrate_estimator_; | 108 const std::unique_ptr<RemoteBitrateEstimator> remote_bitrate_estimator_; |
| 107 const std::unique_ptr<BitrateController> bitrate_controller_; | 109 const std::unique_ptr<BitrateController> bitrate_controller_; |
| 108 RemoteEstimatorProxy remote_estimator_proxy_; | 110 RemoteEstimatorProxy remote_estimator_proxy_; |
| 109 TransportFeedbackAdapter transport_feedback_adapter_; | 111 TransportFeedbackAdapter transport_feedback_adapter_; |
| 110 int min_bitrate_bps_; | 112 int min_bitrate_bps_; |
| 111 rtc::CriticalSection critsect_; | 113 rtc::CriticalSection critsect_; |
| 112 bool send_queue_is_full_ GUARDED_BY(critsect_); | 114 uint32_t last_reported_bitrate_bps_ GUARDED_BY(critsect_); |
| 115 uint8_t last_reported_fraction_loss_ GUARDED_BY(critsect_); |
| 116 int64_t last_reported_rtt_ GUARDED_BY(critsect_); |
| 117 NetworkState network_state_ GUARDED_BY(critsect_); |
| 113 | 118 |
| 114 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(CongestionController); | 119 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(CongestionController); |
| 115 }; | 120 }; |
| 116 | 121 |
| 117 } // namespace webrtc | 122 } // namespace webrtc |
| 118 | 123 |
| 119 #endif // WEBRTC_MODULES_CONGESTION_CONTROLLER_INCLUDE_CONGESTION_CONTROLLER_H_ | 124 #endif // WEBRTC_MODULES_CONGESTION_CONTROLLER_INCLUDE_CONGESTION_CONTROLLER_H_ |
| OLD | NEW |