OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2017 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2017 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 float high_bandwidth_recoverable_packet_loss) | 24 float high_bandwidth_recoverable_packet_loss) |
25 : low_bandwidth_bps(low_bandwidth_bps), | 25 : low_bandwidth_bps(low_bandwidth_bps), |
26 low_bandwidth_recoverable_packet_loss( | 26 low_bandwidth_recoverable_packet_loss( |
27 low_bandwidth_recoverable_packet_loss), | 27 low_bandwidth_recoverable_packet_loss), |
28 high_bandwidth_bps(high_bandwidth_bps), | 28 high_bandwidth_bps(high_bandwidth_bps), |
29 high_bandwidth_recoverable_packet_loss( | 29 high_bandwidth_recoverable_packet_loss( |
30 high_bandwidth_recoverable_packet_loss) {} | 30 high_bandwidth_recoverable_packet_loss) {} |
31 | 31 |
32 FecControllerRplrBased::Config::Config(bool initial_fec_enabled, | 32 FecControllerRplrBased::Config::Config(bool initial_fec_enabled, |
33 const Threshold& fec_enabling_threshold, | 33 const Threshold& fec_enabling_threshold, |
34 const Threshold& fec_disabling_threshold, | 34 const Threshold& fec_disabling_threshold) |
35 int time_constant_ms, | |
36 const Clock* clock) | |
37 : initial_fec_enabled(initial_fec_enabled), | 35 : initial_fec_enabled(initial_fec_enabled), |
38 fec_enabling_threshold(fec_enabling_threshold), | 36 fec_enabling_threshold(fec_enabling_threshold), |
39 fec_disabling_threshold(fec_disabling_threshold), | 37 fec_disabling_threshold(fec_disabling_threshold) {} |
40 time_constant_ms(time_constant_ms), | |
41 clock(clock) {} | |
42 | 38 |
43 FecControllerRplrBased::FecControllerRplrBased(const Config& config) | 39 FecControllerRplrBased::FecControllerRplrBased(const Config& config) |
44 : config_(config), | 40 : config_(config), |
45 fec_enabled_(config.initial_fec_enabled), | 41 fec_enabled_(config.initial_fec_enabled), |
46 fec_enabling_threshold_info_(config_.fec_enabling_threshold), | 42 fec_enabling_threshold_info_(config_.fec_enabling_threshold), |
47 fec_disabling_threshold_info_(config_.fec_disabling_threshold) { | 43 fec_disabling_threshold_info_(config_.fec_disabling_threshold) { |
48 RTC_DCHECK_LE(fec_enabling_threshold_info_.slope, 0); | 44 RTC_DCHECK_LE(fec_enabling_threshold_info_.slope, 0); |
49 RTC_DCHECK_LE(fec_enabling_threshold_info_.slope, 0); | 45 RTC_DCHECK_LE(fec_enabling_threshold_info_.slope, 0); |
50 RTC_DCHECK_LE( | 46 RTC_DCHECK_LE( |
51 GetPacketLossThreshold(config_.fec_enabling_threshold.low_bandwidth_bps, | 47 GetPacketLossThreshold(config_.fec_enabling_threshold.low_bandwidth_bps, |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
129 return false; | 125 return false; |
130 } else { | 126 } else { |
131 return *uplink_recoverable_packet_loss_ <= | 127 return *uplink_recoverable_packet_loss_ <= |
132 GetPacketLossThreshold(*uplink_bandwidth_bps_, | 128 GetPacketLossThreshold(*uplink_bandwidth_bps_, |
133 config_.fec_disabling_threshold, | 129 config_.fec_disabling_threshold, |
134 fec_disabling_threshold_info_); | 130 fec_disabling_threshold_info_); |
135 } | 131 } |
136 } | 132 } |
137 | 133 |
138 } // namespace webrtc | 134 } // namespace webrtc |
OLD | NEW |