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

Side by Side Diff: webrtc/modules/pacing/paced_sender.h

Issue 2235373004: Probing: Add support for exponential startup probing (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@fix_probing2
Patch Set: Addressed comments Created 4 years, 3 months 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
11 #ifndef WEBRTC_MODULES_PACING_PACED_SENDER_H_ 11 #ifndef WEBRTC_MODULES_PACING_PACED_SENDER_H_
12 #define WEBRTC_MODULES_PACING_PACED_SENDER_H_ 12 #define WEBRTC_MODULES_PACING_PACED_SENDER_H_
13 13
14 #include <list> 14 #include <list>
15 #include <memory> 15 #include <memory>
16 #include <set> 16 #include <set>
17 17
18 #include "webrtc/base/checks.h"
18 #include "webrtc/base/thread_annotations.h" 19 #include "webrtc/base/thread_annotations.h"
19 #include "webrtc/modules/include/module.h" 20 #include "webrtc/modules/include/module.h"
20 #include "webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h" 21 #include "webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h"
21 #include "webrtc/typedefs.h" 22 #include "webrtc/typedefs.h"
22 23
23 namespace webrtc { 24 namespace webrtc {
24 class BitrateProber; 25 class BitrateProber;
25 class Clock; 26 class Clock;
26 class CriticalSectionWrapper; 27 class CriticalSectionWrapper;
27 28
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 // packets currently in the pacer queue, or 0 if queue is empty. 124 // packets currently in the pacer queue, or 0 if queue is empty.
124 virtual int64_t AverageQueueTimeMs(); 125 virtual int64_t AverageQueueTimeMs();
125 126
126 // Returns the number of milliseconds until the module want a worker thread 127 // Returns the number of milliseconds until the module want a worker thread
127 // to call Process. 128 // to call Process.
128 int64_t TimeUntilNextProcess() override; 129 int64_t TimeUntilNextProcess() override;
129 130
130 // Process any pending packets in the queue(s). 131 // Process any pending packets in the queue(s).
131 void Process() override; 132 void Process() override;
132 133
134 bool IsExpectingProbingResults() const;
135
133 private: 136 private:
134 // Updates the number of bytes that can be sent for the next time interval. 137 // Updates the number of bytes that can be sent for the next time interval.
135 void UpdateBytesPerInterval(int64_t delta_time_in_ms) 138 void UpdateBytesPerInterval(int64_t delta_time_in_ms)
136 EXCLUSIVE_LOCKS_REQUIRED(critsect_); 139 EXCLUSIVE_LOCKS_REQUIRED(critsect_);
137 140
138 bool SendPacket(const paced_sender::Packet& packet, int probe_cluster_id) 141 bool SendPacket(const paced_sender::Packet& packet, int probe_cluster_id)
139 EXCLUSIVE_LOCKS_REQUIRED(critsect_); 142 EXCLUSIVE_LOCKS_REQUIRED(critsect_);
140 void SendPadding(size_t padding_needed, int probe_cluster_id) 143 void SendPadding(size_t padding_needed, int probe_cluster_id)
141 EXCLUSIVE_LOCKS_REQUIRED(critsect_); 144 EXCLUSIVE_LOCKS_REQUIRED(critsect_);
142 145
(...skipping 20 matching lines...) Expand all
163 int max_padding_bitrate_kbps_ GUARDED_BY(critsect_); 166 int max_padding_bitrate_kbps_ GUARDED_BY(critsect_);
164 int pacing_bitrate_kbps_ GUARDED_BY(critsect_); 167 int pacing_bitrate_kbps_ GUARDED_BY(critsect_);
165 168
166 int64_t time_last_update_us_ GUARDED_BY(critsect_); 169 int64_t time_last_update_us_ GUARDED_BY(critsect_);
167 170
168 std::unique_ptr<paced_sender::PacketQueue> packets_ GUARDED_BY(critsect_); 171 std::unique_ptr<paced_sender::PacketQueue> packets_ GUARDED_BY(critsect_);
169 uint64_t packet_counter_; 172 uint64_t packet_counter_;
170 }; 173 };
171 } // namespace webrtc 174 } // namespace webrtc
172 #endif // WEBRTC_MODULES_PACING_PACED_SENDER_H_ 175 #endif // WEBRTC_MODULES_PACING_PACED_SENDER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698