| 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 * Usage: this class will register multiple RtcpBitrateObserver's one at each | 10 * Usage: this class will register multiple RtcpBitrateObserver's one at each |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 int64_t rtt, | 59 int64_t rtt, |
| 60 int number_of_packets, | 60 int number_of_packets, |
| 61 int64_t now_ms); | 61 int64_t now_ms); |
| 62 | 62 |
| 63 void MaybeTriggerOnNetworkChanged(); | 63 void MaybeTriggerOnNetworkChanged(); |
| 64 | 64 |
| 65 // Returns true if the parameters have changed since the last call. | 65 // Returns true if the parameters have changed since the last call. |
| 66 bool GetNetworkParameters(uint32_t* bitrate, | 66 bool GetNetworkParameters(uint32_t* bitrate, |
| 67 uint8_t* fraction_loss, | 67 uint8_t* fraction_loss, |
| 68 int64_t* rtt); | 68 int64_t* rtt); |
| 69 // Updates |send_queue_full_| to |is_full| and returns true if this caused | 69 // Updates |send_queue_ready_| to |is_ready| and returns true if this caused |
| 70 // |send_queue_full_| to be changed. | 70 // |send_queue_ready_| to be changed. |
| 71 bool UpdateSendQueueStatus(bool is_full); | 71 bool UpdateSendQueueStatus(bool is_ready); |
| 72 | 72 |
| 73 void OnNetworkChanged(uint32_t bitrate, | 73 void OnNetworkChanged(uint32_t bitrate, |
| 74 uint8_t fraction_loss, // 0 - 255. | 74 uint8_t fraction_loss, // 0 - 255. |
| 75 int64_t rtt) EXCLUSIVE_LOCKS_REQUIRED(critsect_); | 75 int64_t rtt) EXCLUSIVE_LOCKS_REQUIRED(critsect_); |
| 76 | 76 |
| 77 // Used by process thread. | 77 // Used by process thread. |
| 78 Clock* const clock_; | 78 Clock* const clock_; |
| 79 BitrateObserver* const observer_; | 79 BitrateObserver* const observer_; |
| 80 PacedSender* const pacer_; | 80 PacedSender* const pacer_; |
| 81 int64_t last_bitrate_update_ms_; | 81 int64_t last_bitrate_update_ms_; |
| 82 | 82 |
| 83 rtc::CriticalSection critsect_; | 83 rtc::CriticalSection critsect_; |
| 84 SendSideBandwidthEstimation bandwidth_estimation_ GUARDED_BY(critsect_); | 84 SendSideBandwidthEstimation bandwidth_estimation_ GUARDED_BY(critsect_); |
| 85 uint32_t reserved_bitrate_bps_ GUARDED_BY(critsect_); | 85 uint32_t reserved_bitrate_bps_ GUARDED_BY(critsect_); |
| 86 | 86 |
| 87 uint32_t last_bitrate_bps_ GUARDED_BY(critsect_); | 87 uint32_t last_bitrate_bps_ GUARDED_BY(critsect_); |
| 88 uint8_t last_fraction_loss_ GUARDED_BY(critsect_); | 88 uint8_t last_fraction_loss_ GUARDED_BY(critsect_); |
| 89 int64_t last_rtt_ms_ GUARDED_BY(critsect_); | 89 int64_t last_rtt_ms_ GUARDED_BY(critsect_); |
| 90 uint32_t last_reserved_bitrate_bps_ GUARDED_BY(critsect_); | 90 uint32_t last_reserved_bitrate_bps_ GUARDED_BY(critsect_); |
| 91 bool send_queue_full_ GUARDED_BY(critsect_); | 91 bool send_queue_ready_ GUARDED_BY(critsect_); |
| 92 | 92 |
| 93 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(BitrateControllerImpl); | 93 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(BitrateControllerImpl); |
| 94 }; | 94 }; |
| 95 } // namespace webrtc | 95 } // namespace webrtc |
| 96 #endif // WEBRTC_MODULES_BITRATE_CONTROLLER_BITRATE_CONTROLLER_IMPL_H_ | 96 #endif // WEBRTC_MODULES_BITRATE_CONTROLLER_BITRATE_CONTROLLER_IMPL_H_ |
| OLD | NEW |