| 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 29 matching lines...) Expand all Loading... |
| 40 | 40 |
| 41 class CongestionController : public CallStatsObserver, public Module { | 41 class CongestionController : public CallStatsObserver, public Module { |
| 42 public: | 42 public: |
| 43 // Observer class for bitrate changes announced due to change in bandwidth | 43 // Observer class for bitrate changes announced due to change in bandwidth |
| 44 // estimate or due to that the send pacer is full. Fraction loss and rtt is | 44 // estimate or due to that the send pacer is full. Fraction loss and rtt is |
| 45 // also part of this callback to allow the observer to optimize its settings | 45 // also part of this callback to allow the observer to optimize its settings |
| 46 // for different types of network environments. The bitrate does not include | 46 // for different types of network environments. The bitrate does not include |
| 47 // packet headers and is measured in bits per second. | 47 // packet headers and is measured in bits per second. |
| 48 class Observer { | 48 class Observer { |
| 49 public: | 49 public: |
| 50 // This is to be deprecated. Please use the one below instead. | |
| 51 RTC_DEPRECATED virtual void OnNetworkChanged(uint32_t bitrate_bps, | |
| 52 uint8_t fraction_loss, | |
| 53 int64_t rtt_ms) {} | |
| 54 | |
| 55 // TODO(minyue): make this method pure virtual when all uses of the old API | |
| 56 // have been updated. | |
| 57 virtual void OnNetworkChanged(uint32_t bitrate_bps, | 50 virtual void OnNetworkChanged(uint32_t bitrate_bps, |
| 58 uint8_t fraction_loss, // 0 - 255. | 51 uint8_t fraction_loss, // 0 - 255. |
| 59 int64_t rtt_ms, | 52 int64_t rtt_ms, |
| 60 int64_t probing_interval_ms) {} | 53 int64_t probing_interval_ms) = 0; |
| 61 | 54 |
| 62 protected: | 55 protected: |
| 63 virtual ~Observer() {} | 56 virtual ~Observer() {} |
| 64 }; | 57 }; |
| 65 CongestionController(Clock* clock, | 58 CongestionController(Clock* clock, |
| 66 Observer* observer, | 59 Observer* observer, |
| 67 RemoteBitrateObserver* remote_bitrate_observer, | 60 RemoteBitrateObserver* remote_bitrate_observer, |
| 68 RtcEventLog* event_log, | 61 RtcEventLog* event_log, |
| 69 PacketRouter* packet_router); | 62 PacketRouter* packet_router); |
| 70 // TODO(nisse): Deprecated. Will create and own a PacketRouter. | 63 // TODO(nisse): Deprecated. Will create and own a PacketRouter. |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 150 uint8_t last_reported_fraction_loss_ GUARDED_BY(critsect_); | 143 uint8_t last_reported_fraction_loss_ GUARDED_BY(critsect_); |
| 151 int64_t last_reported_rtt_ GUARDED_BY(critsect_); | 144 int64_t last_reported_rtt_ GUARDED_BY(critsect_); |
| 152 NetworkState network_state_ GUARDED_BY(critsect_); | 145 NetworkState network_state_ GUARDED_BY(critsect_); |
| 153 | 146 |
| 154 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(CongestionController); | 147 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(CongestionController); |
| 155 }; | 148 }; |
| 156 | 149 |
| 157 } // namespace webrtc | 150 } // namespace webrtc |
| 158 | 151 |
| 159 #endif // WEBRTC_MODULES_CONGESTION_CONTROLLER_INCLUDE_CONGESTION_CONTROLLER_H_ | 152 #endif // WEBRTC_MODULES_CONGESTION_CONTROLLER_INCLUDE_CONGESTION_CONTROLLER_H_ |
| OLD | NEW |