| 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 433 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 444 int padding_needed = | 444 int padding_needed = |
| 445 static_cast<int>(is_probing ? (recommended_probe_size - bytes_sent) | 445 static_cast<int>(is_probing ? (recommended_probe_size - bytes_sent) |
| 446 : padding_budget_->bytes_remaining()); | 446 : padding_budget_->bytes_remaining()); |
| 447 | 447 |
| 448 if (padding_needed > 0) | 448 if (padding_needed > 0) |
| 449 bytes_sent += SendPadding(padding_needed, probe_cluster_id); | 449 bytes_sent += SendPadding(padding_needed, probe_cluster_id); |
| 450 } | 450 } |
| 451 } | 451 } |
| 452 if (is_probing && bytes_sent > 0) | 452 if (is_probing && bytes_sent > 0) |
| 453 prober_->ProbeSent(clock_->TimeInMilliseconds(), bytes_sent); | 453 prober_->ProbeSent(clock_->TimeInMilliseconds(), bytes_sent); |
| 454 alr_detector_->OnBytesSent(bytes_sent, elapsed_time_ms); | 454 alr_detector_->OnBytesSent(bytes_sent, now_us / 1000); |
| 455 } | 455 } |
| 456 | 456 |
| 457 bool PacedSender::SendPacket(const paced_sender::Packet& packet, | 457 bool PacedSender::SendPacket(const paced_sender::Packet& packet, |
| 458 int probe_cluster_id) { | 458 int probe_cluster_id) { |
| 459 // TODO(holmer): Because of this bug issue 5307 we have to send audio | 459 // TODO(holmer): Because of this bug issue 5307 we have to send audio |
| 460 // packets even when the pacer is paused. Here we assume audio packets are | 460 // packets even when the pacer is paused. Here we assume audio packets are |
| 461 // always high priority and that they are the only high priority packets. | 461 // always high priority and that they are the only high priority packets. |
| 462 if (packet.priority != kHighPriority) { | 462 if (packet.priority != kHighPriority) { |
| 463 if (paused_) | 463 if (paused_) |
| 464 return false; | 464 return false; |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 500 void PacedSender::UpdateBudgetWithElapsedTime(int64_t delta_time_ms) { | 500 void PacedSender::UpdateBudgetWithElapsedTime(int64_t delta_time_ms) { |
| 501 media_budget_->IncreaseBudget(delta_time_ms); | 501 media_budget_->IncreaseBudget(delta_time_ms); |
| 502 padding_budget_->IncreaseBudget(delta_time_ms); | 502 padding_budget_->IncreaseBudget(delta_time_ms); |
| 503 } | 503 } |
| 504 | 504 |
| 505 void PacedSender::UpdateBudgetWithBytesSent(size_t bytes_sent) { | 505 void PacedSender::UpdateBudgetWithBytesSent(size_t bytes_sent) { |
| 506 media_budget_->UseBudget(bytes_sent); | 506 media_budget_->UseBudget(bytes_sent); |
| 507 padding_budget_->UseBudget(bytes_sent); | 507 padding_budget_->UseBudget(bytes_sent); |
| 508 } | 508 } |
| 509 } // namespace webrtc | 509 } // namespace webrtc |
| OLD | NEW |