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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
49 // packet-loss ^ | | | 49 // packet-loss ^ | | |
50 // | | | FEC | 50 // | | | FEC |
51 // | \ \ ON | 51 // | \ \ ON |
52 // | FEC \ \_______ fec_enabling_threshold | 52 // | FEC \ \_______ fec_enabling_threshold |
53 // | OFF \_________ fec_disabling_threshold | 53 // | OFF \_________ fec_disabling_threshold |
54 // |-----------------> bandwidth | 54 // |-----------------> bandwidth |
55 Config(bool initial_fec_enabled, | 55 Config(bool initial_fec_enabled, |
56 const Threshold& fec_enabling_threshold, | 56 const Threshold& fec_enabling_threshold, |
57 const Threshold& fec_disabling_threshold, | 57 const Threshold& fec_disabling_threshold, |
58 int time_constant_ms, | 58 int time_constant_ms, |
59 Clock* clock); | 59 const Clock* clock); |
minyue-webrtc
2016/09/27 14:45:18
fixing an old error (dependent on this CL)
| |
60 bool initial_fec_enabled; | 60 bool initial_fec_enabled; |
61 Threshold fec_enabling_threshold; | 61 Threshold fec_enabling_threshold; |
62 Threshold fec_disabling_threshold; | 62 Threshold fec_disabling_threshold; |
63 int time_constant_ms; | 63 int time_constant_ms; |
64 Clock* clock; | 64 const Clock* clock; |
hlundin-webrtc
2016/09/27 20:21:16
double const, right?
minyue-webrtc
2016/09/27 20:50:20
not sure. since Config as a struct can allow peopl
hlundin-webrtc
2016/09/29 09:31:52
Yes, it's a struct. Now I see.
| |
65 }; | 65 }; |
66 | 66 |
67 explicit FecController(const Config& config); | 67 explicit FecController(const Config& config); |
68 | 68 |
69 // Dependency injection for testing. | 69 // Dependency injection for testing. |
70 FecController(const Config& config, | 70 FecController(const Config& config, |
71 std::unique_ptr<SmoothingFilter> smoothing_filter); | 71 std::unique_ptr<SmoothingFilter> smoothing_filter); |
72 | 72 |
73 ~FecController() override; | 73 ~FecController() override; |
74 | 74 |
(...skipping 10 matching lines...) Expand all Loading... | |
85 | 85 |
86 float GetPacketLossThreshold(int bandwidth_bps, | 86 float GetPacketLossThreshold(int bandwidth_bps, |
87 const Config::Threshold& threshold, | 87 const Config::Threshold& threshold, |
88 const ThresholdInfo& threshold_info) const; | 88 const ThresholdInfo& threshold_info) const; |
89 | 89 |
90 bool FecEnablingDecision(const NetworkMetrics& metrics) const; | 90 bool FecEnablingDecision(const NetworkMetrics& metrics) const; |
91 bool FecDisablingDecision(const NetworkMetrics& metrics) const; | 91 bool FecDisablingDecision(const NetworkMetrics& metrics) const; |
92 | 92 |
93 const Config config_; | 93 const Config config_; |
94 bool fec_enabled_; | 94 bool fec_enabled_; |
95 std::unique_ptr<SmoothingFilter> packet_loss_smoothed_; | 95 std::unique_ptr<SmoothingFilter> packet_loss_smoothed_; |
michaelt
2016/09/27 15:51:26
Completely unrelated to this diff.
But we should m
minyue-webrtc
2016/09/27 19:44:00
ok. will consider in a separate CL.
| |
96 | 96 |
97 const ThresholdInfo fec_enabling_threshold_info_; | 97 const ThresholdInfo fec_enabling_threshold_info_; |
98 const ThresholdInfo fec_disabling_threshold_info_; | 98 const ThresholdInfo fec_disabling_threshold_info_; |
99 | 99 |
100 RTC_DISALLOW_COPY_AND_ASSIGN(FecController); | 100 RTC_DISALLOW_COPY_AND_ASSIGN(FecController); |
101 }; | 101 }; |
102 | 102 |
103 } // namespace webrtc | 103 } // namespace webrtc |
104 | 104 |
105 #endif // WEBRTC_MODULES_AUDIO_CODING_AUDIO_NETWORK_ADAPTOR_FEC_CONTROLLER_H_ | 105 #endif // WEBRTC_MODULES_AUDIO_CODING_AUDIO_NETWORK_ADAPTOR_FEC_CONTROLLER_H_ |
OLD | NEW |