| 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 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 142 // Returns the number of milliseconds until the module want a worker thread | 142 // Returns the number of milliseconds until the module want a worker thread |
| 143 // to call Process. | 143 // to call Process. |
| 144 int64_t TimeUntilNextProcess() override; | 144 int64_t TimeUntilNextProcess() override; |
| 145 | 145 |
| 146 // Process any pending packets in the queue(s). | 146 // Process any pending packets in the queue(s). |
| 147 void Process() override; | 147 void Process() override; |
| 148 | 148 |
| 149 // Called when the prober is associated with a process thread. | 149 // Called when the prober is associated with a process thread. |
| 150 void ProcessThreadAttached(ProcessThread* process_thread) override; | 150 void ProcessThreadAttached(ProcessThread* process_thread) override; |
| 151 | 151 |
| 152 void SetPacingFactor(float pacing_factor); |
| 153 void SetQueueTimeLimit(int limit_ms); |
| 154 |
| 152 private: | 155 private: |
| 153 // Updates the number of bytes that can be sent for the next time interval. | 156 // Updates the number of bytes that can be sent for the next time interval. |
| 154 void UpdateBudgetWithElapsedTime(int64_t delta_time_in_ms) | 157 void UpdateBudgetWithElapsedTime(int64_t delta_time_in_ms) |
| 155 EXCLUSIVE_LOCKS_REQUIRED(critsect_); | 158 EXCLUSIVE_LOCKS_REQUIRED(critsect_); |
| 156 void UpdateBudgetWithBytesSent(size_t bytes) | 159 void UpdateBudgetWithBytesSent(size_t bytes) |
| 157 EXCLUSIVE_LOCKS_REQUIRED(critsect_); | 160 EXCLUSIVE_LOCKS_REQUIRED(critsect_); |
| 158 | 161 |
| 159 bool SendPacket(const paced_sender::Packet& packet, | 162 bool SendPacket(const paced_sender::Packet& packet, |
| 160 const PacedPacketInfo& cluster_info) | 163 const PacedPacketInfo& cluster_info) |
| 161 EXCLUSIVE_LOCKS_REQUIRED(critsect_); | 164 EXCLUSIVE_LOCKS_REQUIRED(critsect_); |
| (...skipping 24 matching lines...) Expand all Loading... |
| 186 uint32_t min_send_bitrate_kbps_ GUARDED_BY(critsect_); | 189 uint32_t min_send_bitrate_kbps_ GUARDED_BY(critsect_); |
| 187 uint32_t max_padding_bitrate_kbps_ GUARDED_BY(critsect_); | 190 uint32_t max_padding_bitrate_kbps_ GUARDED_BY(critsect_); |
| 188 uint32_t pacing_bitrate_kbps_ GUARDED_BY(critsect_); | 191 uint32_t pacing_bitrate_kbps_ GUARDED_BY(critsect_); |
| 189 | 192 |
| 190 int64_t time_last_update_us_ GUARDED_BY(critsect_); | 193 int64_t time_last_update_us_ GUARDED_BY(critsect_); |
| 191 int64_t first_sent_packet_ms_ GUARDED_BY(critsect_); | 194 int64_t first_sent_packet_ms_ GUARDED_BY(critsect_); |
| 192 | 195 |
| 193 std::unique_ptr<paced_sender::PacketQueue> packets_ GUARDED_BY(critsect_); | 196 std::unique_ptr<paced_sender::PacketQueue> packets_ GUARDED_BY(critsect_); |
| 194 uint64_t packet_counter_; | 197 uint64_t packet_counter_; |
| 195 ProcessThread* process_thread_ = nullptr; | 198 ProcessThread* process_thread_ = nullptr; |
| 199 |
| 200 float pacing_factor_ GUARDED_BY(critsect_); |
| 201 int64_t queue_time_limit GUARDED_BY(critsect_); |
| 196 }; | 202 }; |
| 197 } // namespace webrtc | 203 } // namespace webrtc |
| 198 #endif // WEBRTC_MODULES_PACING_PACED_SENDER_H_ | 204 #endif // WEBRTC_MODULES_PACING_PACED_SENDER_H_ |
| OLD | NEW |