Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(129)

Side by Side Diff: webrtc/modules/congestion_controller/include/congestion_controller.h

Issue 2131913003: Revert of Refactor NACK bitrate allocation (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 13 matching lines...) Expand all
24 24
25 namespace rtc { 25 namespace rtc {
26 struct SentPacket; 26 struct SentPacket;
27 } 27 }
28 28
29 namespace webrtc { 29 namespace webrtc {
30 30
31 class BitrateController; 31 class BitrateController;
32 class Clock; 32 class Clock;
33 class ProcessThread; 33 class ProcessThread;
34 class RateLimiter;
35 class RemoteBitrateEstimator; 34 class RemoteBitrateEstimator;
36 class RemoteBitrateObserver; 35 class RemoteBitrateObserver;
37 class RtcEventLog; 36 class RtcEventLog;
38 class TransportFeedbackObserver; 37 class TransportFeedbackObserver;
39 38
40 class CongestionController : public CallStatsObserver, public Module { 39 class CongestionController : public CallStatsObserver, public Module {
41 public: 40 public:
42 // Observer class for bitrate changes announced due to change in bandwidth 41 // Observer class for bitrate changes announced due to change in bandwidth
43 // estimate or due to that the send pacer is full. Fraction loss and rtt is 42 // estimate or due to that the send pacer is full. Fraction loss and rtt is
44 // also part of this callback to allow the observer to optimize its settings 43 // also part of this callback to allow the observer to optimize its settings
(...skipping 29 matching lines...) Expand all
74 int min_bitrate_bps, 73 int min_bitrate_bps,
75 int max_bitrate_bps); 74 int max_bitrate_bps);
76 virtual void SignalNetworkState(NetworkState state); 75 virtual void SignalNetworkState(NetworkState state);
77 virtual BitrateController* GetBitrateController() const; 76 virtual BitrateController* GetBitrateController() const;
78 virtual RemoteBitrateEstimator* GetRemoteBitrateEstimator( 77 virtual RemoteBitrateEstimator* GetRemoteBitrateEstimator(
79 bool send_side_bwe); 78 bool send_side_bwe);
80 virtual int64_t GetPacerQueuingDelayMs() const; 79 virtual int64_t GetPacerQueuingDelayMs() const;
81 virtual PacedSender* pacer() { return pacer_.get(); } 80 virtual PacedSender* pacer() { return pacer_.get(); }
82 virtual PacketRouter* packet_router() { return packet_router_.get(); } 81 virtual PacketRouter* packet_router() { return packet_router_.get(); }
83 virtual TransportFeedbackObserver* GetTransportFeedbackObserver(); 82 virtual TransportFeedbackObserver* GetTransportFeedbackObserver();
84 RateLimiter* GetRetransmissionRateLimiter();
85 83
86 // SetAllocatedSendBitrateLimits sets bitrates limits imposed by send codec 84 // SetAllocatedSendBitrateLimits sets bitrates limits imposed by send codec
87 // settings. 85 // settings.
88 // |min_send_bitrate_bps| is the total minimum send bitrate required by all 86 // |min_send_bitrate_bps| is the total minimum send bitrate required by all
89 // sending streams. This is the minimum bitrate the PacedSender will use. 87 // sending streams. This is the minimum bitrate the PacedSender will use.
90 // Note that CongestionController::OnNetworkChanged can still be called with 88 // Note that CongestionController::OnNetworkChanged can still be called with
91 // a lower bitrate estimate. 89 // a lower bitrate estimate.
92 // |max_padding_bitrate_bps| is the max bitrate the send streams request for 90 // |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 91 // 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 92 // the PacedSender how much it should max pad unless there is real packets to
(...skipping 18 matching lines...) Expand all
113 bool IsNetworkDown() const; 111 bool IsNetworkDown() const;
114 bool HasNetworkParametersToReportChanged(uint32_t bitrate_bps, 112 bool HasNetworkParametersToReportChanged(uint32_t bitrate_bps,
115 uint8_t fraction_loss, 113 uint8_t fraction_loss,
116 int64_t rtt); 114 int64_t rtt);
117 Clock* const clock_; 115 Clock* const clock_;
118 Observer* const observer_; 116 Observer* const observer_;
119 const std::unique_ptr<PacketRouter> packet_router_; 117 const std::unique_ptr<PacketRouter> packet_router_;
120 const std::unique_ptr<PacedSender> pacer_; 118 const std::unique_ptr<PacedSender> pacer_;
121 const std::unique_ptr<RemoteBitrateEstimator> remote_bitrate_estimator_; 119 const std::unique_ptr<RemoteBitrateEstimator> remote_bitrate_estimator_;
122 const std::unique_ptr<BitrateController> bitrate_controller_; 120 const std::unique_ptr<BitrateController> bitrate_controller_;
123 const std::unique_ptr<RateLimiter> retransmission_rate_limiter_;
124 RemoteEstimatorProxy remote_estimator_proxy_; 121 RemoteEstimatorProxy remote_estimator_proxy_;
125 TransportFeedbackAdapter transport_feedback_adapter_; 122 TransportFeedbackAdapter transport_feedback_adapter_;
126 int min_bitrate_bps_; 123 int min_bitrate_bps_;
127 rtc::CriticalSection critsect_; 124 rtc::CriticalSection critsect_;
128 uint32_t last_reported_bitrate_bps_ GUARDED_BY(critsect_); 125 uint32_t last_reported_bitrate_bps_ GUARDED_BY(critsect_);
129 uint8_t last_reported_fraction_loss_ GUARDED_BY(critsect_); 126 uint8_t last_reported_fraction_loss_ GUARDED_BY(critsect_);
130 int64_t last_reported_rtt_ GUARDED_BY(critsect_); 127 int64_t last_reported_rtt_ GUARDED_BY(critsect_);
131 NetworkState network_state_ GUARDED_BY(critsect_); 128 NetworkState network_state_ GUARDED_BY(critsect_);
132 129
133 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(CongestionController); 130 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(CongestionController);
134 }; 131 };
135 132
136 } // namespace webrtc 133 } // namespace webrtc
137 134
138 #endif // WEBRTC_MODULES_CONGESTION_CONTROLLER_INCLUDE_CONGESTION_CONTROLLER_H_ 135 #endif // WEBRTC_MODULES_CONGESTION_CONTROLLER_INCLUDE_CONGESTION_CONTROLLER_H_
OLDNEW
« no previous file with comments | « webrtc/modules/congestion_controller/congestion_controller.cc ('k') | webrtc/modules/rtp_rtcp/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698