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

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

Issue 2548633003: Delete deprecated CongestionController constructor and packet_router method. (Closed)
Patch Set: Rebase. 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
« no previous file with comments | « webrtc/modules/congestion_controller/congestion_controller.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 int64_t probing_interval_ms) {} 60 int64_t probing_interval_ms) {}
61 61
62 protected: 62 protected:
63 virtual ~Observer() {} 63 virtual ~Observer() {}
64 }; 64 };
65 CongestionController(Clock* clock, 65 CongestionController(Clock* clock,
66 Observer* observer, 66 Observer* observer,
67 RemoteBitrateObserver* remote_bitrate_observer, 67 RemoteBitrateObserver* remote_bitrate_observer,
68 RtcEventLog* event_log, 68 RtcEventLog* event_log,
69 PacketRouter* packet_router); 69 PacketRouter* packet_router);
70 // TODO(nisse): Deprecated. Will create and own a PacketRouter.
71 CongestionController(Clock* clock, 70 CongestionController(Clock* clock,
72 Observer* observer, 71 Observer* observer,
73 RemoteBitrateObserver* remote_bitrate_observer, 72 RemoteBitrateObserver* remote_bitrate_observer,
74 RtcEventLog* event_log);
75 CongestionController(Clock* clock,
76 Observer* observer,
77 RemoteBitrateObserver* remote_bitrate_observer,
78 RtcEventLog* event_log, 73 RtcEventLog* event_log,
79 PacketRouter* packet_router, 74 PacketRouter* packet_router,
80 std::unique_ptr<PacedSender> pacer); 75 std::unique_ptr<PacedSender> pacer);
81 virtual ~CongestionController(); 76 virtual ~CongestionController();
82 77
83 virtual void SetBweBitrates(int min_bitrate_bps, 78 virtual void SetBweBitrates(int min_bitrate_bps,
84 int start_bitrate_bps, 79 int start_bitrate_bps,
85 int max_bitrate_bps); 80 int max_bitrate_bps);
86 // Resets both the BWE state and the bitrate estimator. Note the first 81 // Resets both the BWE state and the bitrate estimator. Note the first
87 // argument is the bitrate_bps. 82 // argument is the bitrate_bps.
88 virtual void ResetBweAndBitrates(int bitrate_bps, 83 virtual void ResetBweAndBitrates(int bitrate_bps,
89 int min_bitrate_bps, 84 int min_bitrate_bps,
90 int max_bitrate_bps); 85 int max_bitrate_bps);
91 virtual void SignalNetworkState(NetworkState state); 86 virtual void SignalNetworkState(NetworkState state);
92 virtual BitrateController* GetBitrateController() const; 87 virtual BitrateController* GetBitrateController() const;
93 virtual RemoteBitrateEstimator* GetRemoteBitrateEstimator( 88 virtual RemoteBitrateEstimator* GetRemoteBitrateEstimator(
94 bool send_side_bwe); 89 bool send_side_bwe);
95 virtual int64_t GetPacerQueuingDelayMs() const; 90 virtual int64_t GetPacerQueuingDelayMs() const;
96 // TODO(nisse): Delete this accessor function. The pacer should be 91 // TODO(nisse): Delete this accessor function. The pacer should be
97 // internal to the congestion controller. 92 // internal to the congestion controller.
98 virtual PacedSender* pacer() { return pacer_.get(); } 93 virtual PacedSender* pacer() { return pacer_.get(); }
99 // TODO(nisse): Deprecated, but still used by downstream projects.
100 virtual PacketRouter* packet_router() { return packet_router_; }
101 virtual TransportFeedbackObserver* GetTransportFeedbackObserver(); 94 virtual TransportFeedbackObserver* GetTransportFeedbackObserver();
102 RateLimiter* GetRetransmissionRateLimiter(); 95 RateLimiter* GetRetransmissionRateLimiter();
103 void EnablePeriodicAlrProbing(bool enable); 96 void EnablePeriodicAlrProbing(bool enable);
104 97
105 // SetAllocatedSendBitrateLimits sets bitrates limits imposed by send codec 98 // SetAllocatedSendBitrateLimits sets bitrates limits imposed by send codec
106 // settings. 99 // settings.
107 // |min_send_bitrate_bps| is the total minimum send bitrate required by all 100 // |min_send_bitrate_bps| is the total minimum send bitrate required by all
108 // sending streams. This is the minimum bitrate the PacedSender will use. 101 // sending streams. This is the minimum bitrate the PacedSender will use.
109 // Note that CongestionController::OnNetworkChanged can still be called with 102 // Note that CongestionController::OnNetworkChanged can still be called with
110 // a lower bitrate estimate. 103 // a lower bitrate estimate.
(...skipping 16 matching lines...) Expand all
127 private: 120 private:
128 void MaybeTriggerOnNetworkChanged(); 121 void MaybeTriggerOnNetworkChanged();
129 122
130 bool IsSendQueueFull() const; 123 bool IsSendQueueFull() const;
131 bool IsNetworkDown() const; 124 bool IsNetworkDown() const;
132 bool HasNetworkParametersToReportChanged(uint32_t bitrate_bps, 125 bool HasNetworkParametersToReportChanged(uint32_t bitrate_bps,
133 uint8_t fraction_loss, 126 uint8_t fraction_loss,
134 int64_t rtt); 127 int64_t rtt);
135 Clock* const clock_; 128 Clock* const clock_;
136 Observer* const observer_; 129 Observer* const observer_;
137 // Used by the deprecated constructor, where caller doesn't provide
138 // the packet_router.
139 std::unique_ptr<PacketRouter> owned_packet_router_;
140 PacketRouter* const packet_router_; 130 PacketRouter* const packet_router_;
141 const std::unique_ptr<PacedSender> pacer_; 131 const std::unique_ptr<PacedSender> pacer_;
142 const std::unique_ptr<RemoteBitrateEstimator> remote_bitrate_estimator_; 132 const std::unique_ptr<RemoteBitrateEstimator> remote_bitrate_estimator_;
143 const std::unique_ptr<BitrateController> bitrate_controller_; 133 const std::unique_ptr<BitrateController> bitrate_controller_;
144 const std::unique_ptr<ProbeController> probe_controller_; 134 const std::unique_ptr<ProbeController> probe_controller_;
145 const std::unique_ptr<RateLimiter> retransmission_rate_limiter_; 135 const std::unique_ptr<RateLimiter> retransmission_rate_limiter_;
146 RemoteEstimatorProxy remote_estimator_proxy_; 136 RemoteEstimatorProxy remote_estimator_proxy_;
147 TransportFeedbackAdapter transport_feedback_adapter_; 137 TransportFeedbackAdapter transport_feedback_adapter_;
148 int min_bitrate_bps_; 138 int min_bitrate_bps_;
149 int max_bitrate_bps_; 139 int max_bitrate_bps_;
150 rtc::CriticalSection critsect_; 140 rtc::CriticalSection critsect_;
151 uint32_t last_reported_bitrate_bps_ GUARDED_BY(critsect_); 141 uint32_t last_reported_bitrate_bps_ GUARDED_BY(critsect_);
152 uint8_t last_reported_fraction_loss_ GUARDED_BY(critsect_); 142 uint8_t last_reported_fraction_loss_ GUARDED_BY(critsect_);
153 int64_t last_reported_rtt_ GUARDED_BY(critsect_); 143 int64_t last_reported_rtt_ GUARDED_BY(critsect_);
154 NetworkState network_state_ GUARDED_BY(critsect_); 144 NetworkState network_state_ GUARDED_BY(critsect_);
155 145
156 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(CongestionController); 146 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(CongestionController);
157 }; 147 };
158 148
159 } // namespace webrtc 149 } // namespace webrtc
160 150
161 #endif // WEBRTC_MODULES_CONGESTION_CONTROLLER_INCLUDE_CONGESTION_CONTROLLER_H_ 151 #endif // WEBRTC_MODULES_CONGESTION_CONTROLLER_INCLUDE_CONGESTION_CONTROLLER_H_
OLDNEW
« no previous file with comments | « webrtc/modules/congestion_controller/congestion_controller.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698