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 304 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 315 | 315 |
| 316 void PacedSender::InsertPacket(RtpPacketSender::Priority priority, | 316 void PacedSender::InsertPacket(RtpPacketSender::Priority priority, |
| 317 uint32_t ssrc, | 317 uint32_t ssrc, |
| 318 uint16_t sequence_number, | 318 uint16_t sequence_number, |
| 319 int64_t capture_time_ms, | 319 int64_t capture_time_ms, |
| 320 size_t bytes, | 320 size_t bytes, |
| 321 bool retransmission) { | 321 bool retransmission) { |
| 322 CriticalSectionScoped cs(critsect_.get()); | 322 CriticalSectionScoped cs(critsect_.get()); |
| 323 | 323 |
| 324 if (probing_enabled_ && !prober_->IsProbing()) | 324 if (probing_enabled_ && !prober_->IsProbing()) |
| 325 prober_->SetEnabled(true); | 325 prober_->SetEnabled(true); |
|
stefan-webrtc
2016/02/10 10:56:19
Wait until we have a packet large enough to probe
| |
| 326 prober_->MaybeInitializeProbe(bitrate_bps_); | 326 prober_->MaybeInitializeProbe(bitrate_bps_); |
| 327 int64_t now_ms = clock_->TimeInMilliseconds(); | |
|
stefan-webrtc
2016/02/10 10:56:19
Move down again
pbos-webrtc
2016/02/10 13:19:08
Needed in OnIncomingPacket, so added back up.
| |
| 327 | 328 |
| 328 int64_t now_ms = clock_->TimeInMilliseconds(); | |
| 329 if (capture_time_ms < 0) | 329 if (capture_time_ms < 0) |
| 330 capture_time_ms = now_ms; | 330 capture_time_ms = now_ms; |
| 331 | 331 |
| 332 packets_->Push(paced_sender::Packet(priority, ssrc, sequence_number, | 332 packets_->Push(paced_sender::Packet(priority, ssrc, sequence_number, |
| 333 capture_time_ms, now_ms, bytes, | 333 capture_time_ms, now_ms, bytes, |
| 334 retransmission, packet_counter_++)); | 334 retransmission, packet_counter_++)); |
| 335 } | 335 } |
| 336 | 336 |
| 337 int64_t PacedSender::ExpectedQueueTimeMs() const { | 337 int64_t PacedSender::ExpectedQueueTimeMs() const { |
| 338 CriticalSectionScoped cs(critsect_.get()); | 338 CriticalSectionScoped cs(critsect_.get()); |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 472 media_budget_->UseBudget(bytes_sent); | 472 media_budget_->UseBudget(bytes_sent); |
| 473 padding_budget_->UseBudget(bytes_sent); | 473 padding_budget_->UseBudget(bytes_sent); |
| 474 } | 474 } |
| 475 } | 475 } |
| 476 | 476 |
| 477 void PacedSender::UpdateBytesPerInterval(int64_t delta_time_ms) { | 477 void PacedSender::UpdateBytesPerInterval(int64_t delta_time_ms) { |
| 478 media_budget_->IncreaseBudget(delta_time_ms); | 478 media_budget_->IncreaseBudget(delta_time_ms); |
| 479 padding_budget_->IncreaseBudget(delta_time_ms); | 479 padding_budget_->IncreaseBudget(delta_time_ms); |
| 480 } | 480 } |
| 481 } // namespace webrtc | 481 } // namespace webrtc |
| OLD | NEW |