| 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 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 | 107 |
| 108 // Returns true if we send the packet now, else it will add the packet | 108 // Returns true if we send the packet now, else it will add the packet |
| 109 // information to the queue and call TimeToSendPacket when it's time to send. | 109 // information to the queue and call TimeToSendPacket when it's time to send. |
| 110 void InsertPacket(RtpPacketSender::Priority priority, | 110 void InsertPacket(RtpPacketSender::Priority priority, |
| 111 uint32_t ssrc, | 111 uint32_t ssrc, |
| 112 uint16_t sequence_number, | 112 uint16_t sequence_number, |
| 113 int64_t capture_time_ms, | 113 int64_t capture_time_ms, |
| 114 size_t bytes, | 114 size_t bytes, |
| 115 bool retransmission) override; | 115 bool retransmission) override; |
| 116 | 116 |
| 117 // Currently audio traffic is not accounted by pacer and passed through. |
| 118 // With the introduction of audio BWE audio traffic will be accounted for |
| 119 // the pacer budget calculation. The audio traffic still will be injected |
| 120 // at high priority. |
| 121 void SetAccountForAudioPackets(bool account_for_audio) override; |
| 122 |
| 117 // Returns the time since the oldest queued packet was enqueued. | 123 // Returns the time since the oldest queued packet was enqueued. |
| 118 virtual int64_t QueueInMs() const; | 124 virtual int64_t QueueInMs() const; |
| 119 | 125 |
| 120 virtual size_t QueueSizePackets() const; | 126 virtual size_t QueueSizePackets() const; |
| 121 | 127 |
| 122 // Returns the time when the first packet was sent, or -1 if no packet is | 128 // Returns the time when the first packet was sent, or -1 if no packet is |
| 123 // sent. | 129 // sent. |
| 124 virtual int64_t FirstSentPacketTimeMs() const; | 130 virtual int64_t FirstSentPacketTimeMs() const; |
| 125 | 131 |
| 126 // Returns the number of milliseconds it will take to send the current | 132 // Returns the number of milliseconds it will take to send the current |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 191 | 197 |
| 192 int64_t time_last_update_us_ GUARDED_BY(critsect_); | 198 int64_t time_last_update_us_ GUARDED_BY(critsect_); |
| 193 int64_t first_sent_packet_ms_ GUARDED_BY(critsect_); | 199 int64_t first_sent_packet_ms_ GUARDED_BY(critsect_); |
| 194 | 200 |
| 195 std::unique_ptr<paced_sender::PacketQueue> packets_ GUARDED_BY(critsect_); | 201 std::unique_ptr<paced_sender::PacketQueue> packets_ GUARDED_BY(critsect_); |
| 196 uint64_t packet_counter_; | 202 uint64_t packet_counter_; |
| 197 ProcessThread* process_thread_ = nullptr; | 203 ProcessThread* process_thread_ = nullptr; |
| 198 | 204 |
| 199 float pacing_factor_ GUARDED_BY(critsect_); | 205 float pacing_factor_ GUARDED_BY(critsect_); |
| 200 int64_t queue_time_limit GUARDED_BY(critsect_); | 206 int64_t queue_time_limit GUARDED_BY(critsect_); |
| 207 bool account_for_audio_ GUARDED_BY(critsect_); |
| 201 }; | 208 }; |
| 202 } // namespace webrtc | 209 } // namespace webrtc |
| 203 #endif // WEBRTC_MODULES_PACING_PACED_SENDER_H_ | 210 #endif // WEBRTC_MODULES_PACING_PACED_SENDER_H_ |
| OLD | NEW |