| 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 |
| 11 #include "webrtc/modules/pacing/paced_sender.h" | 11 #include "webrtc/modules/pacing/paced_sender.h" |
| 12 | 12 |
| 13 #include <map> | 13 #include <map> |
| 14 #include <queue> | 14 #include <queue> |
| 15 #include <set> | 15 #include <set> |
| 16 | 16 |
| 17 #include "webrtc/base/checks.h" | 17 #include "webrtc/base/checks.h" |
| 18 #include "webrtc/base/logging.h" |
| 18 #include "webrtc/modules/include/module_common_types.h" | 19 #include "webrtc/modules/include/module_common_types.h" |
| 19 #include "webrtc/modules/pacing/bitrate_prober.h" | 20 #include "webrtc/modules/pacing/bitrate_prober.h" |
| 20 #include "webrtc/system_wrappers/include/clock.h" | 21 #include "webrtc/system_wrappers/include/clock.h" |
| 21 #include "webrtc/system_wrappers/include/critical_section_wrapper.h" | 22 #include "webrtc/system_wrappers/include/critical_section_wrapper.h" |
| 22 #include "webrtc/system_wrappers/include/field_trial.h" | 23 #include "webrtc/system_wrappers/include/field_trial.h" |
| 23 #include "webrtc/system_wrappers/include/logging.h" | |
| 24 | 24 |
| 25 namespace { | 25 namespace { |
| 26 // Time limit in milliseconds between packet bursts. | 26 // Time limit in milliseconds between packet bursts. |
| 27 const int64_t kMinPacketLimitMs = 5; | 27 const int64_t kMinPacketLimitMs = 5; |
| 28 | 28 |
| 29 // Upper cap on process interval, in case process has not been called in a long | 29 // Upper cap on process interval, in case process has not been called in a long |
| 30 // time. | 30 // time. |
| 31 const int64_t kMaxIntervalTimeMs = 30; | 31 const int64_t kMaxIntervalTimeMs = 30; |
| 32 | 32 |
| 33 } // namespace | 33 } // namespace |
| (...skipping 410 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 444 media_budget_->UseBudget(bytes_sent); | 444 media_budget_->UseBudget(bytes_sent); |
| 445 padding_budget_->UseBudget(bytes_sent); | 445 padding_budget_->UseBudget(bytes_sent); |
| 446 } | 446 } |
| 447 } | 447 } |
| 448 | 448 |
| 449 void PacedSender::UpdateBytesPerInterval(int64_t delta_time_ms) { | 449 void PacedSender::UpdateBytesPerInterval(int64_t delta_time_ms) { |
| 450 media_budget_->IncreaseBudget(delta_time_ms); | 450 media_budget_->IncreaseBudget(delta_time_ms); |
| 451 padding_budget_->IncreaseBudget(delta_time_ms); | 451 padding_budget_->IncreaseBudget(delta_time_ms); |
| 452 } | 452 } |
| 453 } // namespace webrtc | 453 } // namespace webrtc |
| OLD | NEW |