| 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 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 | 106 |
| 107 // Returns the time since the oldest queued packet was enqueued. | 107 // Returns the time since the oldest queued packet was enqueued. |
| 108 virtual int64_t QueueInMs() const; | 108 virtual int64_t QueueInMs() const; |
| 109 | 109 |
| 110 virtual size_t QueueSizePackets() const; | 110 virtual size_t QueueSizePackets() const; |
| 111 | 111 |
| 112 // Returns the number of milliseconds it will take to send the current | 112 // Returns the number of milliseconds it will take to send the current |
| 113 // packets in the queue, given the current size and bitrate, ignoring prio. | 113 // packets in the queue, given the current size and bitrate, ignoring prio. |
| 114 virtual int64_t ExpectedQueueTimeMs() const; | 114 virtual int64_t ExpectedQueueTimeMs() const; |
| 115 | 115 |
| 116 // Returns the average time since being enqueued, in milliseconds, for all |
| 117 // packets currently in the pacer queue, or 0 if queue is empty. |
| 118 virtual int64_t AverageQueueTimeMs(); |
| 119 |
| 116 // Returns the number of milliseconds until the module want a worker thread | 120 // Returns the number of milliseconds until the module want a worker thread |
| 117 // to call Process. | 121 // to call Process. |
| 118 int64_t TimeUntilNextProcess() override; | 122 int64_t TimeUntilNextProcess() override; |
| 119 | 123 |
| 120 // Process any pending packets in the queue(s). | 124 // Process any pending packets in the queue(s). |
| 121 int32_t Process() override; | 125 int32_t Process() override; |
| 122 | 126 |
| 123 private: | 127 private: |
| 124 // Updates the number of bytes that can be sent for the next time interval. | 128 // Updates the number of bytes that can be sent for the next time interval. |
| 125 void UpdateBytesPerInterval(int64_t delta_time_in_ms) | 129 void UpdateBytesPerInterval(int64_t delta_time_in_ms) |
| (...skipping 25 matching lines...) Expand all Loading... |
| 151 int bitrate_bps_ GUARDED_BY(critsect_); | 155 int bitrate_bps_ GUARDED_BY(critsect_); |
| 152 int max_bitrate_kbps_ GUARDED_BY(critsect_); | 156 int max_bitrate_kbps_ GUARDED_BY(critsect_); |
| 153 | 157 |
| 154 int64_t time_last_update_us_ GUARDED_BY(critsect_); | 158 int64_t time_last_update_us_ GUARDED_BY(critsect_); |
| 155 | 159 |
| 156 rtc::scoped_ptr<paced_sender::PacketQueue> packets_ GUARDED_BY(critsect_); | 160 rtc::scoped_ptr<paced_sender::PacketQueue> packets_ GUARDED_BY(critsect_); |
| 157 uint64_t packet_counter_; | 161 uint64_t packet_counter_; |
| 158 }; | 162 }; |
| 159 } // namespace webrtc | 163 } // namespace webrtc |
| 160 #endif // WEBRTC_MODULES_PACING_PACED_SENDER_H_ | 164 #endif // WEBRTC_MODULES_PACING_PACED_SENDER_H_ |
| OLD | NEW |