OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2016 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 22 matching lines...) Expand all Loading... |
33 class DelayBasedBwe : public RemoteBitrateEstimator { | 33 class DelayBasedBwe : public RemoteBitrateEstimator { |
34 public: | 34 public: |
35 explicit DelayBasedBwe(RemoteBitrateObserver* observer); | 35 explicit DelayBasedBwe(RemoteBitrateObserver* observer); |
36 virtual ~DelayBasedBwe() {} | 36 virtual ~DelayBasedBwe() {} |
37 | 37 |
38 void IncomingPacketFeedbackVector( | 38 void IncomingPacketFeedbackVector( |
39 const std::vector<PacketInfo>& packet_feedback_vector) override; | 39 const std::vector<PacketInfo>& packet_feedback_vector) override; |
40 | 40 |
41 void IncomingPacket(int64_t arrival_time_ms, | 41 void IncomingPacket(int64_t arrival_time_ms, |
42 size_t payload_size, | 42 size_t payload_size, |
43 const RTPHeader& header) override; | |
44 | |
45 void IncomingPacket(int64_t arrival_time_ms, | |
46 size_t payload_size, | |
47 const RTPHeader& header, | 43 const RTPHeader& header, |
| 44 bool was_paced) override; |
| 45 |
| 46 void IncomingPacket(int64_t arrival_time_ms, |
| 47 size_t payload_size, |
| 48 const RTPHeader& header, |
| 49 bool was_paced, |
48 int probe_cluster_id); | 50 int probe_cluster_id); |
49 | 51 |
50 // This class relies on Process() being called periodically (at least once | 52 // This class relies on Process() being called periodically (at least once |
51 // every other second) for streams to be timed out properly. Therefore it | 53 // every other second) for streams to be timed out properly. Therefore it |
52 // shouldn't be detached from the ProcessThread except if it's about to be | 54 // shouldn't be detached from the ProcessThread except if it's about to be |
53 // deleted. | 55 // deleted. |
54 void Process() override; | 56 void Process() override; |
55 int64_t TimeUntilNextProcess() override; | 57 int64_t TimeUntilNextProcess() override; |
56 void OnRttUpdate(int64_t avg_rtt_ms, int64_t max_rtt_ms) override; | 58 void OnRttUpdate(int64_t avg_rtt_ms, int64_t max_rtt_ms) override; |
57 void RemoveStream(uint32_t ssrc) override; | 59 void RemoveStream(uint32_t ssrc) override; |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 | 105 |
104 typedef std::map<uint32_t, int64_t> Ssrcs; | 106 typedef std::map<uint32_t, int64_t> Ssrcs; |
105 enum class ProbeResult { kBitrateUpdated, kNoUpdate }; | 107 enum class ProbeResult { kBitrateUpdated, kNoUpdate }; |
106 | 108 |
107 static void AddCluster(std::list<Cluster>* clusters, Cluster* cluster); | 109 static void AddCluster(std::list<Cluster>* clusters, Cluster* cluster); |
108 | 110 |
109 void IncomingPacketInfo(int64_t arrival_time_ms, | 111 void IncomingPacketInfo(int64_t arrival_time_ms, |
110 uint32_t send_time_24bits, | 112 uint32_t send_time_24bits, |
111 size_t payload_size, | 113 size_t payload_size, |
112 uint32_t ssrc, | 114 uint32_t ssrc, |
| 115 bool was_paced, |
113 int probe_cluster_id); | 116 int probe_cluster_id); |
114 | 117 |
115 void ComputeClusters(std::list<Cluster>* clusters) const; | 118 void ComputeClusters(std::list<Cluster>* clusters) const; |
116 | 119 |
117 std::list<Cluster>::const_iterator FindBestProbe( | 120 std::list<Cluster>::const_iterator FindBestProbe( |
118 const std::list<Cluster>& clusters) const; | 121 const std::list<Cluster>& clusters) const; |
119 | 122 |
120 // Returns true if a probe which changed the estimate was detected. | 123 // Returns true if a probe which changed the estimate was detected. |
121 ProbeResult ProcessClusters(int64_t now_ms) EXCLUSIVE_LOCKS_REQUIRED(&crit_); | 124 ProbeResult ProcessClusters(int64_t now_ms) EXCLUSIVE_LOCKS_REQUIRED(&crit_); |
122 | 125 |
(...skipping 18 matching lines...) Expand all Loading... |
141 rtc::CriticalSection crit_; | 144 rtc::CriticalSection crit_; |
142 Ssrcs ssrcs_ GUARDED_BY(&crit_); | 145 Ssrcs ssrcs_ GUARDED_BY(&crit_); |
143 AimdRateControl remote_rate_ GUARDED_BY(&crit_); | 146 AimdRateControl remote_rate_ GUARDED_BY(&crit_); |
144 | 147 |
145 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(DelayBasedBwe); | 148 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(DelayBasedBwe); |
146 }; | 149 }; |
147 | 150 |
148 } // namespace webrtc | 151 } // namespace webrtc |
149 | 152 |
150 #endif // WEBRTC_MODULES_CONGESTION_CONTROLLER_DELAY_BASED_BWE_H_ | 153 #endif // WEBRTC_MODULES_CONGESTION_CONTROLLER_DELAY_BASED_BWE_H_ |
OLD | NEW |