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 |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 FecController::Config::Threshold( | 62 FecController::Config::Threshold( |
63 fec_enabling_threshold.low_bandwidth_bps(), | 63 fec_enabling_threshold.low_bandwidth_bps(), |
64 fec_enabling_threshold.low_bandwidth_packet_loss(), | 64 fec_enabling_threshold.low_bandwidth_packet_loss(), |
65 fec_enabling_threshold.high_bandwidth_bps(), | 65 fec_enabling_threshold.high_bandwidth_bps(), |
66 fec_enabling_threshold.high_bandwidth_packet_loss()), | 66 fec_enabling_threshold.high_bandwidth_packet_loss()), |
67 FecController::Config::Threshold( | 67 FecController::Config::Threshold( |
68 fec_disabling_threshold.low_bandwidth_bps(), | 68 fec_disabling_threshold.low_bandwidth_bps(), |
69 fec_disabling_threshold.low_bandwidth_packet_loss(), | 69 fec_disabling_threshold.low_bandwidth_packet_loss(), |
70 fec_disabling_threshold.high_bandwidth_bps(), | 70 fec_disabling_threshold.high_bandwidth_bps(), |
71 fec_disabling_threshold.high_bandwidth_packet_loss()), | 71 fec_disabling_threshold.high_bandwidth_packet_loss()), |
72 config.has_time_constant_ms(), clock))); | 72 config.time_constant_ms(), clock))); |
73 } | 73 } |
74 | 74 |
75 std::unique_ptr<FrameLengthController> CreateFrameLengthController( | 75 std::unique_ptr<FrameLengthController> CreateFrameLengthController( |
76 const audio_network_adaptor::config::FrameLengthController& config, | 76 const audio_network_adaptor::config::FrameLengthController& config, |
77 rtc::ArrayView<const int> encoder_frame_lengths_ms, | 77 rtc::ArrayView<const int> encoder_frame_lengths_ms, |
78 int initial_frame_length_ms) { | 78 int initial_frame_length_ms) { |
79 RTC_CHECK(config.has_fl_increasing_packet_loss_fraction()); | 79 RTC_CHECK(config.has_fl_increasing_packet_loss_fraction()); |
80 RTC_CHECK(config.has_fl_decreasing_packet_loss_fraction()); | 80 RTC_CHECK(config.has_fl_decreasing_packet_loss_fraction()); |
81 RTC_CHECK(config.has_fl_20ms_to_60ms_bandwidth_bps()); | 81 RTC_CHECK(config.has_fl_20ms_to_60ms_bandwidth_bps()); |
82 RTC_CHECK(config.has_fl_60ms_to_20ms_bandwidth_bps()); | 82 RTC_CHECK(config.has_fl_60ms_to_20ms_bandwidth_bps()); |
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
325 NormalizeUplinkBandwidth(scoring_point.uplink_bandwidth_bps) - | 325 NormalizeUplinkBandwidth(scoring_point.uplink_bandwidth_bps) - |
326 NormalizeUplinkBandwidth(uplink_bandwidth_bps); | 326 NormalizeUplinkBandwidth(uplink_bandwidth_bps); |
327 float diff_normalized_packet_loss = | 327 float diff_normalized_packet_loss = |
328 NormalizePacketLossFraction(scoring_point.uplink_packet_loss_fraction) - | 328 NormalizePacketLossFraction(scoring_point.uplink_packet_loss_fraction) - |
329 NormalizePacketLossFraction(uplink_packet_loss_fraction); | 329 NormalizePacketLossFraction(uplink_packet_loss_fraction); |
330 return std::pow(diff_normalized_bitrate_bps, 2) + | 330 return std::pow(diff_normalized_bitrate_bps, 2) + |
331 std::pow(diff_normalized_packet_loss, 2); | 331 std::pow(diff_normalized_packet_loss, 2); |
332 } | 332 } |
333 | 333 |
334 } // namespace webrtc | 334 } // namespace webrtc |
OLD | NEW |