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 16 matching lines...) Expand all Loading... |
27 Config(const std::vector<int>& encoder_frame_lengths_ms, | 27 Config(const std::vector<int>& encoder_frame_lengths_ms, |
28 int initial_frame_length_ms, | 28 int initial_frame_length_ms, |
29 float fl_increasing_packet_loss_fraction, | 29 float fl_increasing_packet_loss_fraction, |
30 float fl_decreasing_packet_loss_fraction, | 30 float fl_decreasing_packet_loss_fraction, |
31 int fl_20ms_to_60ms_bandwidth_bps, | 31 int fl_20ms_to_60ms_bandwidth_bps, |
32 int fl_60ms_to_20ms_bandwidth_bps); | 32 int fl_60ms_to_20ms_bandwidth_bps); |
33 Config(const Config& other); | 33 Config(const Config& other); |
34 ~Config(); | 34 ~Config(); |
35 std::vector<int> encoder_frame_lengths_ms; | 35 std::vector<int> encoder_frame_lengths_ms; |
36 int initial_frame_length_ms; | 36 int initial_frame_length_ms; |
| 37 // Uplink packet loss fraction below which frame length can increase. |
37 float fl_increasing_packet_loss_fraction; | 38 float fl_increasing_packet_loss_fraction; |
| 39 // Uplink packet loss fraction below which frame length should decrease. |
38 float fl_decreasing_packet_loss_fraction; | 40 float fl_decreasing_packet_loss_fraction; |
| 41 // Uplink bandwidth below which frame length can switch from 20ms to 60ms. |
39 int fl_20ms_to_60ms_bandwidth_bps; | 42 int fl_20ms_to_60ms_bandwidth_bps; |
| 43 // Uplink bandwidth above which frame length should switch from 60ms to |
| 44 // 20ms. |
40 int fl_60ms_to_20ms_bandwidth_bps; | 45 int fl_60ms_to_20ms_bandwidth_bps; |
41 }; | 46 }; |
42 | 47 |
43 explicit FrameLengthController(const Config& config); | 48 explicit FrameLengthController(const Config& config); |
44 | 49 |
45 ~FrameLengthController() override; | 50 ~FrameLengthController() override; |
46 | 51 |
47 void MakeDecision(const NetworkMetrics& metrics, | 52 void MakeDecision(const NetworkMetrics& metrics, |
48 AudioNetworkAdaptor::EncoderRuntimeConfig* config) override; | 53 AudioNetworkAdaptor::EncoderRuntimeConfig* config) override; |
49 | 54 |
(...skipping 28 matching lines...) Expand all Loading... |
78 std::vector<int>::iterator frame_length_ms_; | 83 std::vector<int>::iterator frame_length_ms_; |
79 | 84 |
80 std::map<FrameLengthChange, int> frame_length_change_criteria_; | 85 std::map<FrameLengthChange, int> frame_length_change_criteria_; |
81 | 86 |
82 RTC_DISALLOW_COPY_AND_ASSIGN(FrameLengthController); | 87 RTC_DISALLOW_COPY_AND_ASSIGN(FrameLengthController); |
83 }; | 88 }; |
84 | 89 |
85 } // namespace webrtc | 90 } // namespace webrtc |
86 | 91 |
87 #endif // WEBRTC_MODULES_AUDIO_CODING_AUDIO_NETWORK_ADAPTOR_FRAME_LENGTH_CONTRO
LLER_H_ | 92 #endif // WEBRTC_MODULES_AUDIO_CODING_AUDIO_NETWORK_ADAPTOR_FRAME_LENGTH_CONTRO
LLER_H_ |
OLD | NEW |