Chromium Code Reviews| 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 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 103 uint16_t sequence_number, | 103 uint16_t sequence_number, |
| 104 int64_t capture_time_ms, | 104 int64_t capture_time_ms, |
| 105 size_t bytes, | 105 size_t bytes, |
| 106 bool retransmission) override; | 106 bool retransmission) override; |
| 107 | 107 |
| 108 // Returns the time since the oldest queued packet was enqueued. | 108 // Returns the time since the oldest queued packet was enqueued. |
| 109 virtual int64_t QueueInMs() const; | 109 virtual int64_t QueueInMs() const; |
| 110 | 110 |
| 111 virtual size_t QueueSizePackets() const; | 111 virtual size_t QueueSizePackets() const; |
| 112 | 112 |
| 113 // Returns true if the PacedSender is not Paused | |
| 114 // and the expected time it will take to send the current packets in the | |
| 115 // queue is less than kMaxQueueLengthMs. | |
| 116 virtual bool CanSendMorePackets() const; | |
| 117 | |
| 113 // Returns the number of milliseconds it will take to send the current | 118 // Returns the number of milliseconds it will take to send the current |
| 114 // 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. |
| 115 virtual int64_t ExpectedQueueTimeMs() const; | 120 int64_t ExpectedQueueTimeMs() const; |
|
stefan-webrtc
2016/05/02 10:56:30
Can this be made private?
| |
| 116 | 121 |
| 117 // Returns the average time since being enqueued, in milliseconds, for all | 122 // Returns the average time since being enqueued, in milliseconds, for all |
| 118 // packets currently in the pacer queue, or 0 if queue is empty. | 123 // packets currently in the pacer queue, or 0 if queue is empty. |
| 119 virtual int64_t AverageQueueTimeMs(); | 124 virtual int64_t AverageQueueTimeMs(); |
| 120 | 125 |
| 121 // Returns the number of milliseconds until the module want a worker thread | 126 // Returns the number of milliseconds until the module want a worker thread |
| 122 // to call Process. | 127 // to call Process. |
| 123 int64_t TimeUntilNextProcess() override; | 128 int64_t TimeUntilNextProcess() override; |
| 124 | 129 |
| 125 // Process any pending packets in the queue(s). | 130 // Process any pending packets in the queue(s). |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 157 uint32_t min_send_bitrate_kbps_ GUARDED_BY(critsect_); | 162 uint32_t min_send_bitrate_kbps_ GUARDED_BY(critsect_); |
| 158 uint32_t target_bitrate_kbps_ GUARDED_BY(critsect_); | 163 uint32_t target_bitrate_kbps_ GUARDED_BY(critsect_); |
| 159 | 164 |
| 160 int64_t time_last_update_us_ GUARDED_BY(critsect_); | 165 int64_t time_last_update_us_ GUARDED_BY(critsect_); |
| 161 | 166 |
| 162 std::unique_ptr<paced_sender::PacketQueue> packets_ GUARDED_BY(critsect_); | 167 std::unique_ptr<paced_sender::PacketQueue> packets_ GUARDED_BY(critsect_); |
| 163 uint64_t packet_counter_; | 168 uint64_t packet_counter_; |
| 164 }; | 169 }; |
| 165 } // namespace webrtc | 170 } // namespace webrtc |
| 166 #endif // WEBRTC_MODULES_PACING_PACED_SENDER_H_ | 171 #endif // WEBRTC_MODULES_PACING_PACED_SENDER_H_ |
| OLD | NEW |