| 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 |
| 11 #ifndef WEBRTC_MODULES_CONGESTION_CONTROLLER_INCLUDE_CONGESTION_CONTROLLER_H_ | 11 #ifndef WEBRTC_MODULES_CONGESTION_CONTROLLER_INCLUDE_CONGESTION_CONTROLLER_H_ |
| 12 #define WEBRTC_MODULES_CONGESTION_CONTROLLER_INCLUDE_CONGESTION_CONTROLLER_H_ | 12 #define WEBRTC_MODULES_CONGESTION_CONTROLLER_INCLUDE_CONGESTION_CONTROLLER_H_ |
| 13 | 13 |
| 14 #include <memory> | 14 #include <memory> |
| 15 | 15 |
| 16 #include "webrtc/base/constructormagic.h" | 16 #include "webrtc/base/constructormagic.h" |
| 17 #include "webrtc/base/deprecation.h" | 17 #include "webrtc/base/deprecation.h" |
| 18 #include "webrtc/common_types.h" | 18 #include "webrtc/common_types.h" |
| 19 #include "webrtc/modules/congestion_controller/transport_feedback_adapter.h" | 19 #include "webrtc/modules/congestion_controller/transport_feedback_adapter.h" |
| 20 #include "webrtc/modules/include/module.h" | 20 #include "webrtc/modules/include/module.h" |
| 21 #include "webrtc/modules/include/module_common_types.h" | 21 #include "webrtc/modules/include/module_common_types.h" |
| 22 #include "webrtc/modules/pacing/packet_router.h" | 22 #include "webrtc/modules/pacing/packet_router.h" |
| 23 #include "webrtc/modules/pacing/paced_sender.h" | 23 #include "webrtc/modules/pacing/paced_sender.h" |
| 24 #include "webrtc/modules/remote_bitrate_estimator/remote_estimator_proxy.h" | 24 #include "webrtc/modules/remote_bitrate_estimator/remote_estimator_proxy.h" |
| 25 #include "webrtc/modules/rtp_rtcp/source/rtp_header_extension.h" |
| 25 | 26 |
| 26 namespace rtc { | 27 namespace rtc { |
| 27 struct SentPacket; | 28 struct SentPacket; |
| 28 } | 29 } |
| 29 | 30 |
| 30 namespace webrtc { | 31 namespace webrtc { |
| 31 | 32 |
| 32 class BitrateController; | 33 class BitrateController; |
| 33 class Clock; | 34 class Clock; |
| 34 class ProbeController; | 35 class ProbeController; |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 virtual RemoteBitrateEstimator* GetRemoteBitrateEstimator( | 82 virtual RemoteBitrateEstimator* GetRemoteBitrateEstimator( |
| 82 bool send_side_bwe); | 83 bool send_side_bwe); |
| 83 virtual int64_t GetPacerQueuingDelayMs() const; | 84 virtual int64_t GetPacerQueuingDelayMs() const; |
| 84 // TODO(nisse): Delete this accessor function. The pacer should be | 85 // TODO(nisse): Delete this accessor function. The pacer should be |
| 85 // internal to the congestion controller. | 86 // internal to the congestion controller. |
| 86 virtual PacedSender* pacer() { return pacer_.get(); } | 87 virtual PacedSender* pacer() { return pacer_.get(); } |
| 87 virtual TransportFeedbackObserver* GetTransportFeedbackObserver(); | 88 virtual TransportFeedbackObserver* GetTransportFeedbackObserver(); |
| 88 RateLimiter* GetRetransmissionRateLimiter(); | 89 RateLimiter* GetRetransmissionRateLimiter(); |
| 89 void EnablePeriodicAlrProbing(bool enable); | 90 void EnablePeriodicAlrProbing(bool enable); |
| 90 | 91 |
| 92 // Are the necessary RTCP and RTP header extensions enabled for send-side BWE? |
| 93 static bool UseSendSideBwe( |
| 94 bool transport_cc, |
| 95 const RtpHeaderExtensionMap& rtp_header_extensions); |
| 96 |
| 91 // SetAllocatedSendBitrateLimits sets bitrates limits imposed by send codec | 97 // SetAllocatedSendBitrateLimits sets bitrates limits imposed by send codec |
| 92 // settings. | 98 // settings. |
| 93 // |min_send_bitrate_bps| is the total minimum send bitrate required by all | 99 // |min_send_bitrate_bps| is the total minimum send bitrate required by all |
| 94 // sending streams. This is the minimum bitrate the PacedSender will use. | 100 // sending streams. This is the minimum bitrate the PacedSender will use. |
| 95 // Note that CongestionController::OnNetworkChanged can still be called with | 101 // Note that CongestionController::OnNetworkChanged can still be called with |
| 96 // a lower bitrate estimate. | 102 // a lower bitrate estimate. |
| 97 // |max_padding_bitrate_bps| is the max bitrate the send streams request for | 103 // |max_padding_bitrate_bps| is the max bitrate the send streams request for |
| 98 // padding. This can be higher than the current network estimate and tells | 104 // padding. This can be higher than the current network estimate and tells |
| 99 // the PacedSender how much it should max pad unless there is real packets to | 105 // the PacedSender how much it should max pad unless there is real packets to |
| 100 // send. | 106 // send. |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 135 uint8_t last_reported_fraction_loss_ GUARDED_BY(critsect_); | 141 uint8_t last_reported_fraction_loss_ GUARDED_BY(critsect_); |
| 136 int64_t last_reported_rtt_ GUARDED_BY(critsect_); | 142 int64_t last_reported_rtt_ GUARDED_BY(critsect_); |
| 137 NetworkState network_state_ GUARDED_BY(critsect_); | 143 NetworkState network_state_ GUARDED_BY(critsect_); |
| 138 | 144 |
| 139 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(CongestionController); | 145 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(CongestionController); |
| 140 }; | 146 }; |
| 141 | 147 |
| 142 } // namespace webrtc | 148 } // namespace webrtc |
| 143 | 149 |
| 144 #endif // WEBRTC_MODULES_CONGESTION_CONTROLLER_INCLUDE_CONGESTION_CONTROLLER_H_ | 150 #endif // WEBRTC_MODULES_CONGESTION_CONTROLLER_INCLUDE_CONGESTION_CONTROLLER_H_ |
| OLD | NEW |