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 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 // packets in the queue, given the current size and bitrate, ignoring prio. | 119 // packets in the queue, given the current size and bitrate, ignoring prio. |
120 virtual int64_t ExpectedQueueTimeMs() const; | 120 virtual int64_t ExpectedQueueTimeMs() const; |
121 | 121 |
122 // Returns the number of milliseconds until the module want a worker thread | 122 // Returns the number of milliseconds until the module want a worker thread |
123 // to call Process. | 123 // to call Process. |
124 int64_t TimeUntilNextProcess() override; | 124 int64_t TimeUntilNextProcess() override; |
125 | 125 |
126 // Process any pending packets in the queue(s). | 126 // Process any pending packets in the queue(s). |
127 int32_t Process() override; | 127 int32_t Process() override; |
128 | 128 |
129 protected: | |
130 virtual bool ProbingExperimentIsEnabled() const; | |
131 | |
132 private: | 129 private: |
133 // Updates the number of bytes that can be sent for the next time interval. | 130 // Updates the number of bytes that can be sent for the next time interval. |
134 void UpdateBytesPerInterval(int64_t delta_time_in_ms) | 131 void UpdateBytesPerInterval(int64_t delta_time_in_ms) |
135 EXCLUSIVE_LOCKS_REQUIRED(critsect_); | 132 EXCLUSIVE_LOCKS_REQUIRED(critsect_); |
136 | 133 |
137 bool SendPacket(const paced_sender::Packet& packet) | 134 bool SendPacket(const paced_sender::Packet& packet) |
138 EXCLUSIVE_LOCKS_REQUIRED(critsect_); | 135 EXCLUSIVE_LOCKS_REQUIRED(critsect_); |
139 void SendPadding(size_t padding_needed) EXCLUSIVE_LOCKS_REQUIRED(critsect_); | 136 void SendPadding(size_t padding_needed) EXCLUSIVE_LOCKS_REQUIRED(critsect_); |
140 | 137 |
141 Clock* const clock_; | 138 Clock* const clock_; |
(...skipping 16 matching lines...) Expand all Loading... |
158 rtc::scoped_ptr<BitrateProber> prober_ GUARDED_BY(critsect_); | 155 rtc::scoped_ptr<BitrateProber> prober_ GUARDED_BY(critsect_); |
159 int bitrate_bps_ GUARDED_BY(critsect_); | 156 int bitrate_bps_ GUARDED_BY(critsect_); |
160 | 157 |
161 int64_t time_last_update_us_ GUARDED_BY(critsect_); | 158 int64_t time_last_update_us_ GUARDED_BY(critsect_); |
162 | 159 |
163 rtc::scoped_ptr<paced_sender::PacketQueue> packets_ GUARDED_BY(critsect_); | 160 rtc::scoped_ptr<paced_sender::PacketQueue> packets_ GUARDED_BY(critsect_); |
164 uint64_t packet_counter_; | 161 uint64_t packet_counter_; |
165 }; | 162 }; |
166 } // namespace webrtc | 163 } // namespace webrtc |
167 #endif // WEBRTC_MODULES_PACING_INCLUDE_PACED_SENDER_H_ | 164 #endif // WEBRTC_MODULES_PACING_INCLUDE_PACED_SENDER_H_ |
OLD | NEW |