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 13 matching lines...) Expand all Loading... | |
24 #include "webrtc/system_wrappers/include/critical_section_wrapper.h" | 24 #include "webrtc/system_wrappers/include/critical_section_wrapper.h" |
25 #include "webrtc/system_wrappers/include/field_trial.h" | 25 #include "webrtc/system_wrappers/include/field_trial.h" |
26 | 26 |
27 namespace { | 27 namespace { |
28 // Time limit in milliseconds between packet bursts. | 28 // Time limit in milliseconds between packet bursts. |
29 const int64_t kMinPacketLimitMs = 5; | 29 const int64_t kMinPacketLimitMs = 5; |
30 | 30 |
31 // Upper cap on process interval, in case process has not been called in a long | 31 // Upper cap on process interval, in case process has not been called in a long |
32 // time. | 32 // time. |
33 const int64_t kMaxIntervalTimeMs = 30; | 33 const int64_t kMaxIntervalTimeMs = 30; |
34 | |
danilchap
2016/06/28 14:26:18
may be revert this change to make CL slightly smal
sprang_webrtc
2016/07/04 09:33:03
Done.
| |
35 } // namespace | 34 } // namespace |
36 | 35 |
37 // TODO(sprang): Move at least PacketQueue and MediaBudget out to separate | 36 // TODO(sprang): Move at least PacketQueue and MediaBudget out to separate |
38 // files, so that we can more easily test them. | 37 // files, so that we can more easily test them. |
39 | 38 |
40 namespace webrtc { | 39 namespace webrtc { |
41 namespace paced_sender { | 40 namespace paced_sender { |
42 struct Packet { | 41 struct Packet { |
43 Packet(RtpPacketSender::Priority priority, | 42 Packet(RtpPacketSender::Priority priority, |
44 uint32_t ssrc, | 43 uint32_t ssrc, |
(...skipping 426 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
471 media_budget_->UseBudget(bytes_sent); | 470 media_budget_->UseBudget(bytes_sent); |
472 padding_budget_->UseBudget(bytes_sent); | 471 padding_budget_->UseBudget(bytes_sent); |
473 } | 472 } |
474 } | 473 } |
475 | 474 |
476 void PacedSender::UpdateBytesPerInterval(int64_t delta_time_ms) { | 475 void PacedSender::UpdateBytesPerInterval(int64_t delta_time_ms) { |
477 media_budget_->IncreaseBudget(delta_time_ms); | 476 media_budget_->IncreaseBudget(delta_time_ms); |
478 padding_budget_->IncreaseBudget(delta_time_ms); | 477 padding_budget_->IncreaseBudget(delta_time_ms); |
479 } | 478 } |
480 } // namespace webrtc | 479 } // namespace webrtc |
OLD | NEW |