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 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
202 // happens if the prober wants to probe, but there's no packet to send. | 202 // happens if the prober wants to probe, but there's no packet to send. |
203 if (time_until_next_event_ms == 0 && last_run_time_ms == 0) | 203 if (time_until_next_event_ms == 0 && last_run_time_ms == 0) |
204 time_until_next_event_ms = 1; | 204 time_until_next_event_ms = 1; |
205 last_run_time_ms = time_until_next_event_ms; | 205 last_run_time_ms = time_until_next_event_ms; |
206 | 206 |
207 Packets generated_packets; | 207 Packets generated_packets; |
208 source_->RunFor(time_until_next_event_ms, &generated_packets); | 208 source_->RunFor(time_until_next_event_ms, &generated_packets); |
209 if (!generated_packets.empty()) { | 209 if (!generated_packets.empty()) { |
210 for (Packet* packet : generated_packets) { | 210 for (Packet* packet : generated_packets) { |
211 MediaPacket* media_packet = static_cast<MediaPacket*>(packet); | 211 MediaPacket* media_packet = static_cast<MediaPacket*>(packet); |
212 pacer_.SendPacket( | 212 pacer_.InsertPacket( |
213 PacedSender::kNormalPriority, media_packet->header().ssrc, | 213 PacedSender::kNormalPriority, media_packet->header().ssrc, |
214 media_packet->header().sequenceNumber, media_packet->send_time_ms(), | 214 media_packet->header().sequenceNumber, media_packet->send_time_ms(), |
215 media_packet->payload_size(), false); | 215 media_packet->payload_size(), false); |
216 pacer_queue_.push_back(packet); | 216 pacer_queue_.push_back(packet); |
217 assert(pacer_queue_.size() < 10000); | 217 assert(pacer_queue_.size() < 10000); |
218 } | 218 } |
219 } | 219 } |
220 | 220 |
221 clock_.AdvanceTimeMilliseconds(time_until_next_event_ms); | 221 clock_.AdvanceTimeMilliseconds(time_until_next_event_ms); |
222 | 222 |
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
485 RecordBitrate(); | 485 RecordBitrate(); |
486 } | 486 } |
487 | 487 |
488 uint32_t TcpSender::TargetBitrateKbps() { | 488 uint32_t TcpSender::TargetBitrateKbps() { |
489 return bitrate_kbps_; | 489 return bitrate_kbps_; |
490 } | 490 } |
491 | 491 |
492 } // namespace bwe | 492 } // namespace bwe |
493 } // namespace testing | 493 } // namespace testing |
494 } // namespace webrtc | 494 } // namespace webrtc |
OLD | NEW |