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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 class CongestionController : public CallStatsObserver, | 46 class CongestionController : public CallStatsObserver, |
47 public Module, | 47 public Module, |
48 public TransportFeedbackObserver { | 48 public TransportFeedbackObserver { |
49 public: | 49 public: |
50 using Observer = SendSideCongestionController::Observer; | 50 using Observer = SendSideCongestionController::Observer; |
51 | 51 |
52 CongestionController(const Clock* clock, | 52 CongestionController(const Clock* clock, |
53 Observer* observer, | 53 Observer* observer, |
54 RemoteBitrateObserver* /* remote_bitrate_observer */, | 54 RemoteBitrateObserver* /* remote_bitrate_observer */, |
55 RtcEventLog* event_log, | 55 RtcEventLog* event_log, |
56 PacketRouter* packet_router) | |
57 : send_side_cc_(clock, observer, event_log, packet_router), | |
58 receive_side_cc_(clock, packet_router) {} | |
59 CongestionController(const Clock* clock, | |
60 Observer* observer, | |
61 RemoteBitrateObserver* /* remote_bitrate_observer */, | |
62 RtcEventLog* event_log, | |
63 PacketRouter* packet_router, | 56 PacketRouter* packet_router, |
64 std::unique_ptr<PacedSender> pacer) | 57 PacedSender* pacer) |
65 : send_side_cc_(clock, observer, event_log, std::move(pacer)), | 58 : send_side_cc_(clock, observer, event_log, pacer), |
66 receive_side_cc_(clock, packet_router) {} | 59 receive_side_cc_(clock, packet_router) {} |
67 | 60 |
68 virtual ~CongestionController() {} | 61 virtual ~CongestionController() {} |
69 | 62 |
70 virtual void OnReceivedPacket(int64_t arrival_time_ms, | 63 virtual void OnReceivedPacket(int64_t arrival_time_ms, |
71 size_t payload_size, | 64 size_t payload_size, |
72 const RTPHeader& header); | 65 const RTPHeader& header); |
73 | 66 |
74 virtual void SetBweBitrates(int min_bitrate_bps, | 67 virtual void SetBweBitrates(int min_bitrate_bps, |
75 int start_bitrate_bps, | 68 int start_bitrate_bps, |
76 int max_bitrate_bps); | 69 int max_bitrate_bps); |
77 // Resets both the BWE state and the bitrate estimator. Note the first | 70 // Resets both the BWE state and the bitrate estimator. Note the first |
78 // argument is the bitrate_bps. | 71 // argument is the bitrate_bps. |
79 virtual void OnNetworkRouteChanged(const rtc::NetworkRoute& network_route, | 72 virtual void OnNetworkRouteChanged(const rtc::NetworkRoute& network_route, |
80 int bitrate_bps, | 73 int bitrate_bps, |
81 int min_bitrate_bps, | 74 int min_bitrate_bps, |
82 int max_bitrate_bps); | 75 int max_bitrate_bps); |
83 virtual void SignalNetworkState(NetworkState state); | 76 virtual void SignalNetworkState(NetworkState state); |
84 virtual void SetTransportOverhead(size_t transport_overhead_bytes_per_packet); | 77 virtual void SetTransportOverhead(size_t transport_overhead_bytes_per_packet); |
85 | 78 |
86 virtual BitrateController* GetBitrateController() const; | 79 virtual BitrateController* GetBitrateController() const; |
87 virtual RemoteBitrateEstimator* GetRemoteBitrateEstimator( | 80 virtual RemoteBitrateEstimator* GetRemoteBitrateEstimator( |
88 bool send_side_bwe); | 81 bool send_side_bwe); |
89 virtual int64_t GetPacerQueuingDelayMs() const; | 82 virtual int64_t GetPacerQueuingDelayMs() const; |
90 // TODO(nisse): Delete this accessor function. The pacer should be | |
91 // internal to the congestion controller. Currently needed by Call, | |
92 // to register the pacer module on the right thread. | |
93 virtual PacedSender* pacer() { return send_side_cc_.pacer(); } | |
94 // TODO(nisse): Delete this method, as soon as downstream projects | 83 // TODO(nisse): Delete this method, as soon as downstream projects |
95 // are updated. | 84 // are updated. |
96 virtual TransportFeedbackObserver* GetTransportFeedbackObserver() { | 85 virtual TransportFeedbackObserver* GetTransportFeedbackObserver() { |
97 return this; | 86 return this; |
98 } | 87 } |
99 RateLimiter* GetRetransmissionRateLimiter(); | 88 RateLimiter* GetRetransmissionRateLimiter(); |
100 void EnablePeriodicAlrProbing(bool enable); | 89 void EnablePeriodicAlrProbing(bool enable); |
101 | 90 |
102 // SetAllocatedSendBitrateLimits sets bitrates limits imposed by send codec | 91 // SetAllocatedSendBitrateLimits sets bitrates limits imposed by send codec |
103 // settings. | 92 // settings. |
(...skipping 28 matching lines...) Expand all Loading... |
132 private: | 121 private: |
133 SendSideCongestionController send_side_cc_; | 122 SendSideCongestionController send_side_cc_; |
134 ReceiveSideCongestionController receive_side_cc_; | 123 ReceiveSideCongestionController receive_side_cc_; |
135 | 124 |
136 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(CongestionController); | 125 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(CongestionController); |
137 }; | 126 }; |
138 | 127 |
139 } // namespace webrtc | 128 } // namespace webrtc |
140 | 129 |
141 #endif // WEBRTC_MODULES_CONGESTION_CONTROLLER_INCLUDE_CONGESTION_CONTROLLER_H_ | 130 #endif // WEBRTC_MODULES_CONGESTION_CONTROLLER_INCLUDE_CONGESTION_CONTROLLER_H_ |
OLD | NEW |