OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2016 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/audio_coding/audio_network_adaptor/fec_controller_plr_b
ased.h" | 11 #include "webrtc/modules/audio_coding/audio_network_adaptor/fec_controller_plr_b
ased.h" |
12 | 12 |
13 #include <limits> | 13 #include <limits> |
14 #include <utility> | 14 #include <utility> |
15 | 15 |
16 #include "webrtc/rtc_base/checks.h" | 16 #include "webrtc/base/checks.h" |
17 #include "webrtc/system_wrappers/include/field_trial.h" | 17 #include "webrtc/system_wrappers/include/field_trial.h" |
18 | 18 |
19 namespace webrtc { | 19 namespace webrtc { |
20 | 20 |
21 namespace { | 21 namespace { |
22 class NullSmoothingFilter final : public SmoothingFilter { | 22 class NullSmoothingFilter final : public SmoothingFilter { |
23 public: | 23 public: |
24 void AddSample(float sample) override { | 24 void AddSample(float sample) override { |
25 last_sample_ = rtc::Optional<float>(sample); | 25 last_sample_ = rtc::Optional<float>(sample); |
26 } | 26 } |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 if (!uplink_bandwidth_bps_ || !packet_loss) { | 107 if (!uplink_bandwidth_bps_ || !packet_loss) { |
108 return false; | 108 return false; |
109 } else { | 109 } else { |
110 // Disable when below the curve. | 110 // Disable when below the curve. |
111 return config_.fec_disabling_threshold.IsBelowCurve( | 111 return config_.fec_disabling_threshold.IsBelowCurve( |
112 {static_cast<float>(*uplink_bandwidth_bps_), *packet_loss}); | 112 {static_cast<float>(*uplink_bandwidth_bps_), *packet_loss}); |
113 } | 113 } |
114 } | 114 } |
115 | 115 |
116 } // namespace webrtc | 116 } // namespace webrtc |
OLD | NEW |