| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2015 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 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 264 return; | 264 return; |
| 265 } | 265 } |
| 266 Packets::iterator it = queue_.begin(); | 266 Packets::iterator it = queue_.begin(); |
| 267 for (; it != queue_.end(); ++it) { | 267 for (; it != queue_.end(); ++it) { |
| 268 if ((*it)->send_time_us() > end_of_batch_time_us) { | 268 if ((*it)->send_time_us() > end_of_batch_time_us) { |
| 269 break; | 269 break; |
| 270 } | 270 } |
| 271 } | 271 } |
| 272 Packets to_transfer; | 272 Packets to_transfer; |
| 273 to_transfer.splice(to_transfer.begin(), queue_, queue_.begin(), it); | 273 to_transfer.splice(to_transfer.begin(), queue_, queue_.begin(), it); |
| 274 for (Packet* packet : to_transfer) |
| 275 packet->set_paced(true); |
| 274 bwe_->OnPacketsSent(to_transfer); | 276 bwe_->OnPacketsSent(to_transfer); |
| 275 batch->merge(to_transfer, DereferencingComparator<Packet>); | 277 batch->merge(to_transfer, DereferencingComparator<Packet>); |
| 276 } | 278 } |
| 277 | 279 |
| 278 bool PacedVideoSender::TimeToSendPacket(uint32_t ssrc, | 280 bool PacedVideoSender::TimeToSendPacket(uint32_t ssrc, |
| 279 uint16_t sequence_number, | 281 uint16_t sequence_number, |
| 280 int64_t capture_time_ms, | 282 int64_t capture_time_ms, |
| 281 bool retransmission) { | 283 bool retransmission) { |
| 282 for (Packets::iterator it = pacer_queue_.begin(); it != pacer_queue_.end(); | 284 for (Packets::iterator it = pacer_queue_.begin(); it != pacer_queue_.end(); |
| 283 ++it) { | 285 ++it) { |
| (...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 483 RecordBitrate(); | 485 RecordBitrate(); |
| 484 } | 486 } |
| 485 | 487 |
| 486 uint32_t TcpSender::TargetBitrateKbps() { | 488 uint32_t TcpSender::TargetBitrateKbps() { |
| 487 return bitrate_kbps_; | 489 return bitrate_kbps_; |
| 488 } | 490 } |
| 489 | 491 |
| 490 } // namespace bwe | 492 } // namespace bwe |
| 491 } // namespace testing | 493 } // namespace testing |
| 492 } // namespace webrtc | 494 } // namespace webrtc |
| OLD | NEW |