| 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 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 115 | 115 |
| 116 // Returns the average time since being enqueued, in milliseconds, for all | 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. | 117 // packets currently in the pacer queue, or 0 if queue is empty. |
| 118 virtual int64_t AverageQueueTimeMs(); | 118 virtual int64_t AverageQueueTimeMs(); |
| 119 | 119 |
| 120 // 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 |
| 121 // to call Process. | 121 // to call Process. |
| 122 int64_t TimeUntilNextProcess() override; | 122 int64_t TimeUntilNextProcess() override; |
| 123 | 123 |
| 124 // Process any pending packets in the queue(s). | 124 // Process any pending packets in the queue(s). |
| 125 int32_t Process() override; | 125 void Process() override; |
| 126 | 126 |
| 127 private: | 127 private: |
| 128 // 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. |
| 129 void UpdateBytesPerInterval(int64_t delta_time_in_ms) | 129 void UpdateBytesPerInterval(int64_t delta_time_in_ms) |
| 130 EXCLUSIVE_LOCKS_REQUIRED(critsect_); | 130 EXCLUSIVE_LOCKS_REQUIRED(critsect_); |
| 131 | 131 |
| 132 bool SendPacket(const paced_sender::Packet& packet) | 132 bool SendPacket(const paced_sender::Packet& packet) |
| 133 EXCLUSIVE_LOCKS_REQUIRED(critsect_); | 133 EXCLUSIVE_LOCKS_REQUIRED(critsect_); |
| 134 void SendPadding(size_t padding_needed) EXCLUSIVE_LOCKS_REQUIRED(critsect_); | 134 void SendPadding(size_t padding_needed) EXCLUSIVE_LOCKS_REQUIRED(critsect_); |
| 135 | 135 |
| (...skipping 19 matching lines...) Expand all Loading... |
| 155 int bitrate_bps_ GUARDED_BY(critsect_); | 155 int bitrate_bps_ GUARDED_BY(critsect_); |
| 156 int max_bitrate_kbps_ GUARDED_BY(critsect_); | 156 int max_bitrate_kbps_ GUARDED_BY(critsect_); |
| 157 | 157 |
| 158 int64_t time_last_update_us_ GUARDED_BY(critsect_); | 158 int64_t time_last_update_us_ GUARDED_BY(critsect_); |
| 159 | 159 |
| 160 rtc::scoped_ptr<paced_sender::PacketQueue> packets_ GUARDED_BY(critsect_); | 160 rtc::scoped_ptr<paced_sender::PacketQueue> packets_ GUARDED_BY(critsect_); |
| 161 uint64_t packet_counter_; | 161 uint64_t packet_counter_; |
| 162 }; | 162 }; |
| 163 } // namespace webrtc | 163 } // namespace webrtc |
| 164 #endif // WEBRTC_MODULES_PACING_PACED_SENDER_H_ | 164 #endif // WEBRTC_MODULES_PACING_PACED_SENDER_H_ |
| OLD | NEW |