| 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 13 matching lines...) Expand all Loading... |
| 24 #include "webrtc/base/constructormagic.h" | 24 #include "webrtc/base/constructormagic.h" |
| 25 #include "webrtc/base/criticalsection.h" | 25 #include "webrtc/base/criticalsection.h" |
| 26 #include "webrtc/modules/bitrate_controller/send_side_bandwidth_estimation.h" | 26 #include "webrtc/modules/bitrate_controller/send_side_bandwidth_estimation.h" |
| 27 | 27 |
| 28 namespace webrtc { | 28 namespace webrtc { |
| 29 | 29 |
| 30 class BitrateControllerImpl : public BitrateController { | 30 class BitrateControllerImpl : public BitrateController { |
| 31 public: | 31 public: |
| 32 // TODO(perkj): BitrateObserver has been deprecated and is not used in WebRTC. | 32 // TODO(perkj): BitrateObserver has been deprecated and is not used in WebRTC. |
| 33 // |observer| is left for project that is not yet updated. | 33 // |observer| is left for project that is not yet updated. |
| 34 BitrateControllerImpl(Clock* clock, | 34 BitrateControllerImpl(const Clock* clock, |
| 35 BitrateObserver* observer, | 35 BitrateObserver* observer, |
| 36 RtcEventLog* event_log); | 36 RtcEventLog* event_log); |
| 37 virtual ~BitrateControllerImpl() {} | 37 virtual ~BitrateControllerImpl() {} |
| 38 | 38 |
| 39 bool AvailableBandwidth(uint32_t* bandwidth) const override; | 39 bool AvailableBandwidth(uint32_t* bandwidth) const override; |
| 40 | 40 |
| 41 RtcpBandwidthObserver* CreateRtcpBandwidthObserver() override; | 41 RtcpBandwidthObserver* CreateRtcpBandwidthObserver() override; |
| 42 | 42 |
| 43 // Deprecated | 43 // Deprecated |
| 44 void SetStartBitrate(int start_bitrate_bps) override; | 44 void SetStartBitrate(int start_bitrate_bps) override; |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 int64_t now_ms); | 78 int64_t now_ms); |
| 79 | 79 |
| 80 // Deprecated | 80 // Deprecated |
| 81 void MaybeTriggerOnNetworkChanged(); | 81 void MaybeTriggerOnNetworkChanged(); |
| 82 | 82 |
| 83 void OnNetworkChanged(uint32_t bitrate, | 83 void OnNetworkChanged(uint32_t bitrate, |
| 84 uint8_t fraction_loss, // 0 - 255. | 84 uint8_t fraction_loss, // 0 - 255. |
| 85 int64_t rtt) EXCLUSIVE_LOCKS_REQUIRED(critsect_); | 85 int64_t rtt) EXCLUSIVE_LOCKS_REQUIRED(critsect_); |
| 86 | 86 |
| 87 // Used by process thread. | 87 // Used by process thread. |
| 88 Clock* const clock_; | 88 const Clock* const clock_; |
| 89 BitrateObserver* const observer_; | 89 BitrateObserver* const observer_; |
| 90 int64_t last_bitrate_update_ms_; | 90 int64_t last_bitrate_update_ms_; |
| 91 RtcEventLog* const event_log_; | 91 RtcEventLog* const event_log_; |
| 92 | 92 |
| 93 rtc::CriticalSection critsect_; | 93 rtc::CriticalSection critsect_; |
| 94 SendSideBandwidthEstimation bandwidth_estimation_ GUARDED_BY(critsect_); | 94 SendSideBandwidthEstimation bandwidth_estimation_ GUARDED_BY(critsect_); |
| 95 uint32_t reserved_bitrate_bps_ GUARDED_BY(critsect_); | 95 uint32_t reserved_bitrate_bps_ GUARDED_BY(critsect_); |
| 96 | 96 |
| 97 uint32_t last_bitrate_bps_ GUARDED_BY(critsect_); | 97 uint32_t last_bitrate_bps_ GUARDED_BY(critsect_); |
| 98 uint8_t last_fraction_loss_ GUARDED_BY(critsect_); | 98 uint8_t last_fraction_loss_ GUARDED_BY(critsect_); |
| 99 int64_t last_rtt_ms_ GUARDED_BY(critsect_); | 99 int64_t last_rtt_ms_ GUARDED_BY(critsect_); |
| 100 uint32_t last_reserved_bitrate_bps_ GUARDED_BY(critsect_); | 100 uint32_t last_reserved_bitrate_bps_ GUARDED_BY(critsect_); |
| 101 | 101 |
| 102 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(BitrateControllerImpl); | 102 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(BitrateControllerImpl); |
| 103 }; | 103 }; |
| 104 } // namespace webrtc | 104 } // namespace webrtc |
| 105 #endif // WEBRTC_MODULES_BITRATE_CONTROLLER_BITRATE_CONTROLLER_IMPL_H_ | 105 #endif // WEBRTC_MODULES_BITRATE_CONTROLLER_BITRATE_CONTROLLER_IMPL_H_ |
| OLD | NEW |