Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(236)

Side by Side Diff: webrtc/modules/audio_coding/audio_network_adaptor/fec_controller_rplr_based.cc

Issue 2684773002: Experiment-driven configuration of PLR/RPLR-based FecController (Closed)
Patch Set: Remove Clock from RplrBasedFecController Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698