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

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

Issue 2580843002: Change return type of CongestionController::pacer() method.
Patch Set: Created 4 years 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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 // Resets both the BWE state and the bitrate estimator. Note the first 74 // Resets both the BWE state and the bitrate estimator. Note the first
75 // argument is the bitrate_bps. 75 // argument is the bitrate_bps.
76 virtual void ResetBweAndBitrates(int bitrate_bps, 76 virtual void ResetBweAndBitrates(int bitrate_bps,
77 int min_bitrate_bps, 77 int min_bitrate_bps,
78 int max_bitrate_bps); 78 int max_bitrate_bps);
79 virtual void SignalNetworkState(NetworkState state); 79 virtual void SignalNetworkState(NetworkState state);
80 virtual BitrateController* GetBitrateController() const; 80 virtual BitrateController* GetBitrateController() const;
81 virtual RemoteBitrateEstimator* GetRemoteBitrateEstimator( 81 virtual RemoteBitrateEstimator* GetRemoteBitrateEstimator(
82 bool send_side_bwe); 82 bool send_side_bwe);
83 virtual int64_t GetPacerQueuingDelayMs() const; 83 virtual int64_t GetPacerQueuingDelayMs() const;
84 // TODO(nisse): Delete this accessor function. The pacer should be 84 // TODO(nisse): Rename or delete this accessor function. The pacer
85 // internal to the congestion controller. 85 // should be internal to the congestion controller.
86 virtual PacedSender* pacer() { return pacer_.get(); } 86 virtual RtpPacketSender* pacer() { return pacer_.get(); }
87 virtual TransportFeedbackObserver* GetTransportFeedbackObserver(); 87 virtual TransportFeedbackObserver* GetTransportFeedbackObserver();
88 RateLimiter* GetRetransmissionRateLimiter(); 88 RateLimiter* GetRetransmissionRateLimiter();
89 void EnablePeriodicAlrProbing(bool enable); 89 void EnablePeriodicAlrProbing(bool enable);
90 90
91 // SetAllocatedSendBitrateLimits sets bitrates limits imposed by send codec 91 // SetAllocatedSendBitrateLimits sets bitrates limits imposed by send codec
92 // settings. 92 // settings.
93 // |min_send_bitrate_bps| is the total minimum send bitrate required by all 93 // |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. 94 // sending streams. This is the minimum bitrate the PacedSender will use.
95 // Note that CongestionController::OnNetworkChanged can still be called with 95 // Note that CongestionController::OnNetworkChanged can still be called with
96 // a lower bitrate estimate. 96 // a lower bitrate estimate.
(...skipping 17 matching lines...) Expand all
114 void MaybeTriggerOnNetworkChanged(); 114 void MaybeTriggerOnNetworkChanged();
115 115
116 bool IsSendQueueFull() const; 116 bool IsSendQueueFull() const;
117 bool IsNetworkDown() const; 117 bool IsNetworkDown() const;
118 bool HasNetworkParametersToReportChanged(uint32_t bitrate_bps, 118 bool HasNetworkParametersToReportChanged(uint32_t bitrate_bps,
119 uint8_t fraction_loss, 119 uint8_t fraction_loss,
120 int64_t rtt); 120 int64_t rtt);
121 Clock* const clock_; 121 Clock* const clock_;
122 Observer* const observer_; 122 Observer* const observer_;
123 PacketRouter* const packet_router_; 123 PacketRouter* const packet_router_;
124 // TODO(nisse): Convert to TaskQueue.
the sun 2016/12/15 15:11:32 Yes, please!
125 const std::unique_ptr<ProcessThread> pacer_thread_;
124 const std::unique_ptr<PacedSender> pacer_; 126 const std::unique_ptr<PacedSender> pacer_;
125 const std::unique_ptr<RemoteBitrateEstimator> remote_bitrate_estimator_; 127 const std::unique_ptr<RemoteBitrateEstimator> remote_bitrate_estimator_;
126 const std::unique_ptr<BitrateController> bitrate_controller_; 128 const std::unique_ptr<BitrateController> bitrate_controller_;
127 const std::unique_ptr<ProbeController> probe_controller_; 129 const std::unique_ptr<ProbeController> probe_controller_;
128 const std::unique_ptr<RateLimiter> retransmission_rate_limiter_; 130 const std::unique_ptr<RateLimiter> retransmission_rate_limiter_;
129 RemoteEstimatorProxy remote_estimator_proxy_; 131 RemoteEstimatorProxy remote_estimator_proxy_;
130 TransportFeedbackAdapter transport_feedback_adapter_; 132 TransportFeedbackAdapter transport_feedback_adapter_;
131 int min_bitrate_bps_; 133 int min_bitrate_bps_;
132 int max_bitrate_bps_; 134 int max_bitrate_bps_;
133 rtc::CriticalSection critsect_; 135 rtc::CriticalSection critsect_;
134 uint32_t last_reported_bitrate_bps_ GUARDED_BY(critsect_); 136 uint32_t last_reported_bitrate_bps_ GUARDED_BY(critsect_);
135 uint8_t last_reported_fraction_loss_ GUARDED_BY(critsect_); 137 uint8_t last_reported_fraction_loss_ GUARDED_BY(critsect_);
136 int64_t last_reported_rtt_ GUARDED_BY(critsect_); 138 int64_t last_reported_rtt_ GUARDED_BY(critsect_);
137 NetworkState network_state_ GUARDED_BY(critsect_); 139 NetworkState network_state_ GUARDED_BY(critsect_);
138 140
139 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(CongestionController); 141 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(CongestionController);
140 }; 142 };
141 143
142 } // namespace webrtc 144 } // namespace webrtc
143 145
144 #endif // WEBRTC_MODULES_CONGESTION_CONTROLLER_INCLUDE_CONGESTION_CONTROLLER_H_ 146 #endif // WEBRTC_MODULES_CONGESTION_CONTROLLER_INCLUDE_CONGESTION_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698