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

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

Issue 2735423002: Mark |Clock*| as |const Clock*| (for some CongestionController and BWE related modules) (Closed)
Patch Set: Rebased Created 3 years, 9 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
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 // encoding them). Bitrate sent may temporarily exceed target set by 61 // encoding them). Bitrate sent may temporarily exceed target set by
62 // UpdateBitrate() so that this limit will be upheld. 62 // UpdateBitrate() so that this limit will be upheld.
63 static const int64_t kMaxQueueLengthMs; 63 static const int64_t kMaxQueueLengthMs;
64 // Pacing-rate relative to our target send rate. 64 // Pacing-rate relative to our target send rate.
65 // Multiplicative factor that is applied to the target bitrate to calculate 65 // Multiplicative factor that is applied to the target bitrate to calculate
66 // the number of bytes that can be transmitted per interval. 66 // the number of bytes that can be transmitted per interval.
67 // Increasing this factor will result in lower delays in cases of bitrate 67 // Increasing this factor will result in lower delays in cases of bitrate
68 // overshoots from the encoder. 68 // overshoots from the encoder.
69 static const float kDefaultPaceMultiplier; 69 static const float kDefaultPaceMultiplier;
70 70
71 PacedSender(Clock* clock, PacketSender* packet_sender); 71 PacedSender(const Clock* clock, PacketSender* packet_sender);
72 72
73 virtual ~PacedSender(); 73 virtual ~PacedSender();
74 74
75 virtual void CreateProbeCluster(int bitrate_bps); 75 virtual void CreateProbeCluster(int bitrate_bps);
76 76
77 // Temporarily pause all sending. 77 // Temporarily pause all sending.
78 void Pause(); 78 void Pause();
79 79
80 // Resume sending packets. 80 // Resume sending packets.
81 void Resume(); 81 void Resume();
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 EXCLUSIVE_LOCKS_REQUIRED(critsect_); 145 EXCLUSIVE_LOCKS_REQUIRED(critsect_);
146 void UpdateBudgetWithBytesSent(size_t bytes) 146 void UpdateBudgetWithBytesSent(size_t bytes)
147 EXCLUSIVE_LOCKS_REQUIRED(critsect_); 147 EXCLUSIVE_LOCKS_REQUIRED(critsect_);
148 148
149 bool SendPacket(const paced_sender::Packet& packet, 149 bool SendPacket(const paced_sender::Packet& packet,
150 const PacedPacketInfo& cluster_info) 150 const PacedPacketInfo& cluster_info)
151 EXCLUSIVE_LOCKS_REQUIRED(critsect_); 151 EXCLUSIVE_LOCKS_REQUIRED(critsect_);
152 size_t SendPadding(size_t padding_needed, const PacedPacketInfo& cluster_info) 152 size_t SendPadding(size_t padding_needed, const PacedPacketInfo& cluster_info)
153 EXCLUSIVE_LOCKS_REQUIRED(critsect_); 153 EXCLUSIVE_LOCKS_REQUIRED(critsect_);
154 154
155 Clock* const clock_; 155 const Clock* const clock_;
156 PacketSender* const packet_sender_; 156 PacketSender* const packet_sender_;
157 std::unique_ptr<AlrDetector> alr_detector_ GUARDED_BY(critsect_); 157 std::unique_ptr<AlrDetector> alr_detector_ GUARDED_BY(critsect_);
158 158
159 std::unique_ptr<CriticalSectionWrapper> critsect_; 159 std::unique_ptr<CriticalSectionWrapper> critsect_;
160 bool paused_ GUARDED_BY(critsect_); 160 bool paused_ GUARDED_BY(critsect_);
161 // This is the media budget, keeping track of how many bits of media 161 // This is the media budget, keeping track of how many bits of media
162 // we can pace out during the current interval. 162 // we can pace out during the current interval.
163 std::unique_ptr<paced_sender::IntervalBudget> media_budget_ 163 std::unique_ptr<paced_sender::IntervalBudget> media_budget_
164 GUARDED_BY(critsect_); 164 GUARDED_BY(critsect_);
165 // This is the padding budget, keeping track of how many bits of padding we're 165 // This is the padding budget, keeping track of how many bits of padding we're
(...skipping 11 matching lines...) Expand all
177 uint32_t max_padding_bitrate_kbps_ GUARDED_BY(critsect_); 177 uint32_t max_padding_bitrate_kbps_ GUARDED_BY(critsect_);
178 uint32_t pacing_bitrate_kbps_ GUARDED_BY(critsect_); 178 uint32_t pacing_bitrate_kbps_ GUARDED_BY(critsect_);
179 179
180 int64_t time_last_update_us_ GUARDED_BY(critsect_); 180 int64_t time_last_update_us_ GUARDED_BY(critsect_);
181 181
182 std::unique_ptr<paced_sender::PacketQueue> packets_ GUARDED_BY(critsect_); 182 std::unique_ptr<paced_sender::PacketQueue> packets_ GUARDED_BY(critsect_);
183 uint64_t packet_counter_; 183 uint64_t packet_counter_;
184 }; 184 };
185 } // namespace webrtc 185 } // namespace webrtc
186 #endif // WEBRTC_MODULES_PACING_PACED_SENDER_H_ 186 #endif // WEBRTC_MODULES_PACING_PACED_SENDER_H_
OLDNEW
« no previous file with comments | « webrtc/modules/congestion_controller/transport_feedback_adapter.cc ('k') | webrtc/modules/pacing/paced_sender.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698