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