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 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 virtual BitrateController* GetBitrateController() const; | 90 virtual BitrateController* GetBitrateController() const; |
91 virtual RemoteBitrateEstimator* GetRemoteBitrateEstimator( | 91 virtual RemoteBitrateEstimator* GetRemoteBitrateEstimator( |
92 bool send_side_bwe); | 92 bool send_side_bwe); |
93 virtual int64_t GetPacerQueuingDelayMs() const; | 93 virtual int64_t GetPacerQueuingDelayMs() const; |
94 // TODO(nisse): Delete this accessor function. The pacer should be | 94 // TODO(nisse): Delete this accessor function. The pacer should be |
95 // internal to the congestion controller. | 95 // internal to the congestion controller. |
96 virtual PacedSender* pacer() { return pacer_.get(); } | 96 virtual PacedSender* pacer() { return pacer_.get(); } |
97 virtual TransportFeedbackObserver* GetTransportFeedbackObserver() { | 97 virtual TransportFeedbackObserver* GetTransportFeedbackObserver() { |
98 return this; | 98 return this; |
99 } | 99 } |
| 100 void RegisterTransportFeedbackAdapterObserver( |
| 101 TransportFeedbackAdapterObserver* observer); |
| 102 void DeRegisterTransportFeedbackAdapterObserver( |
| 103 TransportFeedbackAdapterObserver* observer); |
100 RateLimiter* GetRetransmissionRateLimiter(); | 104 RateLimiter* GetRetransmissionRateLimiter(); |
101 void EnablePeriodicAlrProbing(bool enable); | 105 void EnablePeriodicAlrProbing(bool enable); |
102 | 106 |
103 // SetAllocatedSendBitrateLimits sets bitrates limits imposed by send codec | 107 // SetAllocatedSendBitrateLimits sets bitrates limits imposed by send codec |
104 // settings. | 108 // settings. |
105 // |min_send_bitrate_bps| is the total minimum send bitrate required by all | 109 // |min_send_bitrate_bps| is the total minimum send bitrate required by all |
106 // sending streams. This is the minimum bitrate the PacedSender will use. | 110 // sending streams. This is the minimum bitrate the PacedSender will use. |
107 // Note that CongestionController::OnNetworkChanged can still be called with | 111 // Note that CongestionController::OnNetworkChanged can still be called with |
108 // a lower bitrate estimate. | 112 // a lower bitrate estimate. |
109 // |max_padding_bitrate_bps| is the max bitrate the send streams request for | 113 // |max_padding_bitrate_bps| is the max bitrate the send streams request for |
110 // padding. This can be higher than the current network estimate and tells | 114 // padding. This can be higher than the current network estimate and tells |
111 // the PacedSender how much it should max pad unless there is real packets to | 115 // the PacedSender how much it should max pad unless there is real packets to |
112 // send. | 116 // send. |
113 void SetAllocatedSendBitrateLimits(int min_send_bitrate_bps, | 117 void SetAllocatedSendBitrateLimits(int min_send_bitrate_bps, |
114 int max_padding_bitrate_bps); | 118 int max_padding_bitrate_bps); |
115 | 119 |
116 virtual void OnSentPacket(const rtc::SentPacket& sent_packet); | 120 virtual void OnSentPacket(const rtc::SentPacket& sent_packet); |
117 | 121 |
118 // Implements CallStatsObserver. | 122 // Implements CallStatsObserver. |
119 void OnRttUpdate(int64_t avg_rtt_ms, int64_t max_rtt_ms) override; | 123 void OnRttUpdate(int64_t avg_rtt_ms, int64_t max_rtt_ms) override; |
120 | 124 |
121 // Implements Module. | 125 // Implements Module. |
122 int64_t TimeUntilNextProcess() override; | 126 int64_t TimeUntilNextProcess() override; |
123 void Process() override; | 127 void Process() override; |
124 | 128 |
125 // Implements TransportFeedbackObserver. | 129 // Implements TransportFeedbackObserver. |
126 void AddPacket(uint16_t sequence_number, | 130 void AddPacket(uint32_t ssrc, |
| 131 uint16_t sequence_number, |
127 size_t length, | 132 size_t length, |
128 const PacedPacketInfo& pacing_info) override; | 133 const PacedPacketInfo& pacing_info) override; |
129 void OnTransportFeedback(const rtcp::TransportFeedback& feedback) override; | 134 void OnTransportFeedback(const rtcp::TransportFeedback& feedback) override; |
130 std::vector<PacketFeedback> GetTransportFeedbackVector() const override; | 135 std::vector<PacketFeedback> GetTransportFeedbackVector() const override; |
131 | 136 |
132 private: | 137 private: |
133 class WrappingBitrateEstimator : public RemoteBitrateEstimator { | 138 class WrappingBitrateEstimator : public RemoteBitrateEstimator { |
134 public: | 139 public: |
135 WrappingBitrateEstimator(RemoteBitrateObserver* observer, | 140 WrappingBitrateEstimator(RemoteBitrateObserver* observer, |
136 const Clock* clock); | 141 const Clock* clock); |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
198 std::unique_ptr<DelayBasedBwe> delay_based_bwe_ GUARDED_BY(bwe_lock_); | 203 std::unique_ptr<DelayBasedBwe> delay_based_bwe_ GUARDED_BY(bwe_lock_); |
199 | 204 |
200 rtc::ThreadChecker worker_thread_checker_; | 205 rtc::ThreadChecker worker_thread_checker_; |
201 | 206 |
202 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(CongestionController); | 207 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(CongestionController); |
203 }; | 208 }; |
204 | 209 |
205 } // namespace webrtc | 210 } // namespace webrtc |
206 | 211 |
207 #endif // WEBRTC_MODULES_CONGESTION_CONTROLLER_INCLUDE_CONGESTION_CONTROLLER_H_ | 212 #endif // WEBRTC_MODULES_CONGESTION_CONTROLLER_INCLUDE_CONGESTION_CONTROLLER_H_ |
OLD | NEW |