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/common_types.h" | 17 #include "webrtc/common_types.h" |
18 #include "webrtc/modules/bitrate_controller/include/bitrate_controller.h" | |
18 #include "webrtc/modules/include/module.h" | 19 #include "webrtc/modules/include/module.h" |
19 #include "webrtc/modules/include/module_common_types.h" | 20 #include "webrtc/modules/include/module_common_types.h" |
20 #include "webrtc/modules/pacing/packet_router.h" | 21 #include "webrtc/modules/pacing/packet_router.h" |
21 #include "webrtc/modules/pacing/paced_sender.h" | 22 #include "webrtc/modules/pacing/paced_sender.h" |
22 #include "webrtc/modules/remote_bitrate_estimator/remote_estimator_proxy.h" | 23 #include "webrtc/modules/remote_bitrate_estimator/remote_estimator_proxy.h" |
23 #include "webrtc/modules/remote_bitrate_estimator/transport_feedback_adapter.h" | 24 #include "webrtc/modules/remote_bitrate_estimator/transport_feedback_adapter.h" |
24 | 25 |
25 namespace rtc { | 26 namespace rtc { |
26 struct SentPacket; | 27 struct SentPacket; |
27 } | 28 } |
28 | 29 |
29 namespace webrtc { | 30 namespace webrtc { |
30 | 31 |
31 class BitrateController; | |
danilchap
2016/08/19 17:19:34
Why this class need full instead of forward defini
Irfan
2016/08/23 05:46:57
due to use of std::unique_ptr<> I see complaints f
| |
32 class Clock; | 32 class Clock; |
33 class ProcessThread; | 33 class ProcessThread; |
34 class RateLimiter; | 34 class RateLimiter; |
35 class RemoteBitrateEstimator; | 35 class RemoteBitrateEstimator; |
36 class RemoteBitrateObserver; | 36 class RemoteBitrateObserver; |
37 class RtcEventLog; | 37 class RtcEventLog; |
38 class TransportFeedbackObserver; | 38 class TransportFeedbackObserver; |
39 | 39 |
40 class CongestionController : public CallStatsObserver, public Module { | 40 class CongestionController : public CallStatsObserver, public Module { |
41 public: | 41 public: |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
89 // sending streams. This is the minimum bitrate the PacedSender will use. | 89 // sending streams. This is the minimum bitrate the PacedSender will use. |
90 // Note that CongestionController::OnNetworkChanged can still be called with | 90 // Note that CongestionController::OnNetworkChanged can still be called with |
91 // a lower bitrate estimate. | 91 // a lower bitrate estimate. |
92 // |max_padding_bitrate_bps| is the max bitrate the send streams request for | 92 // |max_padding_bitrate_bps| is the max bitrate the send streams request for |
93 // padding. This can be higher than the current network estimate and tells | 93 // padding. This can be higher than the current network estimate and tells |
94 // the PacedSender how much it should max pad unless there is real packets to | 94 // the PacedSender how much it should max pad unless there is real packets to |
95 // send. | 95 // send. |
96 void SetAllocatedSendBitrateLimits(int min_send_bitrate_bps, | 96 void SetAllocatedSendBitrateLimits(int min_send_bitrate_bps, |
97 int max_padding_bitrate_bps); | 97 int max_padding_bitrate_bps); |
98 | 98 |
99 virtual void OnSentPacket(const rtc::SentPacket& sent_packet); | 99 void OnSentPacket(const rtc::SentPacket& sent_packet); |
100 | |
101 // Called by delay based estimator to report estimated bandwidth. | |
102 void OnDelayBasedBweChanged(int bitrate_bps); | |
103 // Called by delay based estimator to evaluate if probes need to be handled. | |
104 bool IsExpectingProbingResults(); | |
100 | 105 |
101 // Implements CallStatsObserver. | 106 // Implements CallStatsObserver. |
102 void OnRttUpdate(int64_t avg_rtt_ms, int64_t max_rtt_ms) override; | 107 void OnRttUpdate(int64_t avg_rtt_ms, int64_t max_rtt_ms) override; |
103 | 108 |
104 // Implements Module. | 109 // Implements Module. |
105 int64_t TimeUntilNextProcess() override; | 110 int64_t TimeUntilNextProcess() override; |
106 void Process() override; | 111 void Process() override; |
107 | 112 |
108 private: | 113 private: |
109 void Init(); | 114 void Init(); |
(...skipping 19 matching lines...) Expand all Loading... | |
129 uint8_t last_reported_fraction_loss_ GUARDED_BY(critsect_); | 134 uint8_t last_reported_fraction_loss_ GUARDED_BY(critsect_); |
130 int64_t last_reported_rtt_ GUARDED_BY(critsect_); | 135 int64_t last_reported_rtt_ GUARDED_BY(critsect_); |
131 NetworkState network_state_ GUARDED_BY(critsect_); | 136 NetworkState network_state_ GUARDED_BY(critsect_); |
132 | 137 |
133 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(CongestionController); | 138 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(CongestionController); |
134 }; | 139 }; |
135 | 140 |
136 } // namespace webrtc | 141 } // namespace webrtc |
137 | 142 |
138 #endif // WEBRTC_MODULES_CONGESTION_CONTROLLER_INCLUDE_CONGESTION_CONTROLLER_H_ | 143 #endif // WEBRTC_MODULES_CONGESTION_CONTROLLER_INCLUDE_CONGESTION_CONTROLLER_H_ |
OLD | NEW |