| 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 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 // packets currently in the pacer queue, or 0 if queue is empty. | 132 // packets currently in the pacer queue, or 0 if queue is empty. |
| 133 virtual int64_t AverageQueueTimeMs(); | 133 virtual int64_t AverageQueueTimeMs(); |
| 134 | 134 |
| 135 // Returns the number of milliseconds until the module want a worker thread | 135 // Returns the number of milliseconds until the module want a worker thread |
| 136 // to call Process. | 136 // to call Process. |
| 137 int64_t TimeUntilNextProcess() override; | 137 int64_t TimeUntilNextProcess() override; |
| 138 | 138 |
| 139 // Process any pending packets in the queue(s). | 139 // Process any pending packets in the queue(s). |
| 140 void Process() override; | 140 void Process() override; |
| 141 | 141 |
| 142 // Called when the prober is associated with a process thread. |
| 143 void ProcessThreadAttached(ProcessThread* process_thread) override; |
| 144 |
| 142 private: | 145 private: |
| 143 // Updates the number of bytes that can be sent for the next time interval. | 146 // Updates the number of bytes that can be sent for the next time interval. |
| 144 void UpdateBudgetWithElapsedTime(int64_t delta_time_in_ms) | 147 void UpdateBudgetWithElapsedTime(int64_t delta_time_in_ms) |
| 145 EXCLUSIVE_LOCKS_REQUIRED(critsect_); | 148 EXCLUSIVE_LOCKS_REQUIRED(critsect_); |
| 146 void UpdateBudgetWithBytesSent(size_t bytes) | 149 void UpdateBudgetWithBytesSent(size_t bytes) |
| 147 EXCLUSIVE_LOCKS_REQUIRED(critsect_); | 150 EXCLUSIVE_LOCKS_REQUIRED(critsect_); |
| 148 | 151 |
| 149 bool SendPacket(const paced_sender::Packet& packet, | 152 bool SendPacket(const paced_sender::Packet& packet, |
| 150 const PacedPacketInfo& cluster_info) | 153 const PacedPacketInfo& cluster_info) |
| 151 EXCLUSIVE_LOCKS_REQUIRED(critsect_); | 154 EXCLUSIVE_LOCKS_REQUIRED(critsect_); |
| (...skipping 22 matching lines...) Expand all Loading... |
| 174 // order to meet pace time constraint). | 177 // order to meet pace time constraint). |
| 175 uint32_t estimated_bitrate_bps_ GUARDED_BY(critsect_); | 178 uint32_t estimated_bitrate_bps_ GUARDED_BY(critsect_); |
| 176 uint32_t min_send_bitrate_kbps_ GUARDED_BY(critsect_); | 179 uint32_t min_send_bitrate_kbps_ GUARDED_BY(critsect_); |
| 177 uint32_t max_padding_bitrate_kbps_ GUARDED_BY(critsect_); | 180 uint32_t max_padding_bitrate_kbps_ GUARDED_BY(critsect_); |
| 178 uint32_t pacing_bitrate_kbps_ GUARDED_BY(critsect_); | 181 uint32_t pacing_bitrate_kbps_ GUARDED_BY(critsect_); |
| 179 | 182 |
| 180 int64_t time_last_update_us_ GUARDED_BY(critsect_); | 183 int64_t time_last_update_us_ GUARDED_BY(critsect_); |
| 181 | 184 |
| 182 std::unique_ptr<paced_sender::PacketQueue> packets_ GUARDED_BY(critsect_); | 185 std::unique_ptr<paced_sender::PacketQueue> packets_ GUARDED_BY(critsect_); |
| 183 uint64_t packet_counter_; | 186 uint64_t packet_counter_; |
| 187 ProcessThread* process_thread_ = nullptr; |
| 184 }; | 188 }; |
| 185 } // namespace webrtc | 189 } // namespace webrtc |
| 186 #endif // WEBRTC_MODULES_PACING_PACED_SENDER_H_ | 190 #endif // WEBRTC_MODULES_PACING_PACED_SENDER_H_ |
| OLD | NEW |