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 451 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
462 const bool success = packet_sender_->TimeToSendPacket( | 462 const bool success = packet_sender_->TimeToSendPacket( |
463 packet.ssrc, packet.sequence_number, packet.capture_time_ms, | 463 packet.ssrc, packet.sequence_number, packet.capture_time_ms, |
464 packet.retransmission, pacing_info); | 464 packet.retransmission, pacing_info); |
465 critsect_.Enter(); | 465 critsect_.Enter(); |
466 | 466 |
467 if (success) { | 467 if (success) { |
468 // TODO(holmer): High priority packets should only be accounted for if we | 468 // TODO(holmer): High priority packets should only be accounted for if we |
469 // are allocating bandwidth for audio. | 469 // are allocating bandwidth for audio. |
470 if (packet.priority != kHighPriority) { | 470 if (packet.priority != kHighPriority) { |
471 // Update media bytes sent. | 471 // Update media bytes sent. |
| 472 // TODO(eladalon): TimeToSendPacket() can also return |true| in some |
| 473 // situations where nothing actually ended up being sent to the network, |
| 474 // and we probably don't want to update the budget in such cases. |
| 475 // https://bugs.chromium.org/p/webrtc/issues/detail?id=8052 |
472 UpdateBudgetWithBytesSent(packet.bytes); | 476 UpdateBudgetWithBytesSent(packet.bytes); |
473 } | 477 } |
474 } | 478 } |
475 | 479 |
476 return success; | 480 return success; |
477 } | 481 } |
478 | 482 |
479 size_t PacedSender::SendPadding(size_t padding_needed, | 483 size_t PacedSender::SendPadding(size_t padding_needed, |
480 const PacedPacketInfo& pacing_info) { | 484 const PacedPacketInfo& pacing_info) { |
481 critsect_.Leave(); | 485 critsect_.Leave(); |
(...skipping 21 matching lines...) Expand all Loading... |
503 rtc::CritScope cs(&critsect_); | 507 rtc::CritScope cs(&critsect_); |
504 pacing_factor_ = pacing_factor; | 508 pacing_factor_ = pacing_factor; |
505 } | 509 } |
506 | 510 |
507 void PacedSender::SetQueueTimeLimit(int limit_ms) { | 511 void PacedSender::SetQueueTimeLimit(int limit_ms) { |
508 rtc::CritScope cs(&critsect_); | 512 rtc::CritScope cs(&critsect_); |
509 queue_time_limit = limit_ms; | 513 queue_time_limit = limit_ms; |
510 } | 514 } |
511 | 515 |
512 } // namespace webrtc | 516 } // namespace webrtc |
OLD | NEW |