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 |
11 #ifndef WEBRTC_MODULES_AUDIO_CODING_AUDIO_NETWORK_ADAPTOR_FEC_CONTROLLER_RPLR_BA
SED_H_ | 11 #ifndef WEBRTC_MODULES_AUDIO_CODING_AUDIO_NETWORK_ADAPTOR_FEC_CONTROLLER_RPLR_BA
SED_H_ |
12 #define WEBRTC_MODULES_AUDIO_CODING_AUDIO_NETWORK_ADAPTOR_FEC_CONTROLLER_RPLR_BA
SED_H_ | 12 #define WEBRTC_MODULES_AUDIO_CODING_AUDIO_NETWORK_ADAPTOR_FEC_CONTROLLER_RPLR_BA
SED_H_ |
13 | 13 |
14 #include <memory> | 14 #include <memory> |
15 | 15 |
16 #include "webrtc/base/constructormagic.h" | 16 #include "webrtc/base/constructormagic.h" |
17 #include "webrtc/modules/audio_coding/audio_network_adaptor/controller.h" | 17 #include "webrtc/modules/audio_coding/audio_network_adaptor/controller.h" |
18 #include "webrtc/system_wrappers/include/clock.h" | |
19 | 18 |
20 namespace webrtc { | 19 namespace webrtc { |
21 | 20 |
22 class FecControllerRplrBased final : public Controller { | 21 class FecControllerRplrBased final : public Controller { |
23 public: | 22 public: |
24 struct Config { | 23 struct Config { |
25 struct Threshold { | 24 struct Threshold { |
26 // Threshold defines a curve in the bandwidth/packet-loss domain. The | 25 // Threshold defines a curve in the bandwidth/packet-loss domain. The |
27 // curve is characterized by the two conjunction points: A and B. | 26 // curve is characterized by the two conjunction points: A and B. |
28 // | 27 // |
(...skipping 22 matching lines...) Expand all Loading... |
51 // | 50 // |
52 // recoverable | 51 // recoverable |
53 // packet-loss ^ | | | 52 // packet-loss ^ | | |
54 // | | | FEC | 53 // | | | FEC |
55 // | \ \ ON | 54 // | \ \ ON |
56 // | FEC \ \_______ fec_enabling_threshold | 55 // | FEC \ \_______ fec_enabling_threshold |
57 // | OFF \_________ fec_disabling_threshold | 56 // | OFF \_________ fec_disabling_threshold |
58 // |-----------------> bandwidth | 57 // |-----------------> bandwidth |
59 Config(bool initial_fec_enabled, | 58 Config(bool initial_fec_enabled, |
60 const Threshold& fec_enabling_threshold, | 59 const Threshold& fec_enabling_threshold, |
61 const Threshold& fec_disabling_threshold, | 60 const Threshold& fec_disabling_threshold); |
62 int time_constant_ms, | |
63 const Clock* clock); | |
64 bool initial_fec_enabled; | 61 bool initial_fec_enabled; |
65 Threshold fec_enabling_threshold; | 62 Threshold fec_enabling_threshold; |
66 Threshold fec_disabling_threshold; | 63 Threshold fec_disabling_threshold; |
67 int time_constant_ms; | |
68 const Clock* clock; | |
69 }; | 64 }; |
70 | 65 |
71 explicit FecControllerRplrBased(const Config& config); | 66 explicit FecControllerRplrBased(const Config& config); |
72 | 67 |
73 ~FecControllerRplrBased() override; | 68 ~FecControllerRplrBased() override; |
74 | 69 |
75 void UpdateNetworkMetrics(const NetworkMetrics& network_metrics) override; | 70 void UpdateNetworkMetrics(const NetworkMetrics& network_metrics) override; |
76 | 71 |
77 void MakeDecision(AudioNetworkAdaptor::EncoderRuntimeConfig* config) override; | 72 void MakeDecision(AudioNetworkAdaptor::EncoderRuntimeConfig* config) override; |
78 | 73 |
(...skipping 20 matching lines...) Expand all Loading... |
99 | 94 |
100 const ThresholdInfo fec_enabling_threshold_info_; | 95 const ThresholdInfo fec_enabling_threshold_info_; |
101 const ThresholdInfo fec_disabling_threshold_info_; | 96 const ThresholdInfo fec_disabling_threshold_info_; |
102 | 97 |
103 RTC_DISALLOW_COPY_AND_ASSIGN(FecControllerRplrBased); | 98 RTC_DISALLOW_COPY_AND_ASSIGN(FecControllerRplrBased); |
104 }; | 99 }; |
105 | 100 |
106 } // namespace webrtc | 101 } // namespace webrtc |
107 | 102 |
108 #endif // WEBRTC_MODULES_AUDIO_CODING_AUDIO_NETWORK_ADAPTOR_FEC_CONTROLLER_RPLR
_BASED_H_ | 103 #endif // WEBRTC_MODULES_AUDIO_CODING_AUDIO_NETWORK_ADAPTOR_FEC_CONTROLLER_RPLR
_BASED_H_ |
OLD | NEW |