| 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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 // Sort controllers based on their significance. | 74 // Sort controllers based on their significance. |
| 75 std::vector<Controller*> GetSortedControllers( | 75 std::vector<Controller*> GetSortedControllers( |
| 76 const Controller::NetworkMetrics& metrics) override; | 76 const Controller::NetworkMetrics& metrics) override; |
| 77 | 77 |
| 78 std::vector<Controller*> GetControllers() const override; | 78 std::vector<Controller*> GetControllers() const override; |
| 79 | 79 |
| 80 private: | 80 private: |
| 81 // Scoring point is a subset of NetworkMetrics that is used for comparing the | 81 // Scoring point is a subset of NetworkMetrics that is used for comparing the |
| 82 // significance of controllers. | 82 // significance of controllers. |
| 83 struct ScoringPoint { | 83 struct ScoringPoint { |
| 84 // TODO(elad.alon): Do we want to experiment with RPLR-based scoring? |
| 84 ScoringPoint(int uplink_bandwidth_bps, float uplink_packet_loss_fraction); | 85 ScoringPoint(int uplink_bandwidth_bps, float uplink_packet_loss_fraction); |
| 85 | 86 |
| 86 // Calculate the normalized [0,1] distance between two scoring points. | 87 // Calculate the normalized [0,1] distance between two scoring points. |
| 87 float SquaredDistanceTo(const ScoringPoint& scoring_point) const; | 88 float SquaredDistanceTo(const ScoringPoint& scoring_point) const; |
| 88 | 89 |
| 89 int uplink_bandwidth_bps; | 90 int uplink_bandwidth_bps; |
| 90 float uplink_packet_loss_fraction; | 91 float uplink_packet_loss_fraction; |
| 91 }; | 92 }; |
| 92 | 93 |
| 93 const Config config_; | 94 const Config config_; |
| (...skipping 10 matching lines...) Expand all Loading... |
| 104 // |scoring_points_| saves the characteristic scoring points of various | 105 // |scoring_points_| saves the characteristic scoring points of various |
| 105 // controllers. | 106 // controllers. |
| 106 std::map<const Controller*, ScoringPoint> controller_scoring_points_; | 107 std::map<const Controller*, ScoringPoint> controller_scoring_points_; |
| 107 | 108 |
| 108 RTC_DISALLOW_COPY_AND_ASSIGN(ControllerManagerImpl); | 109 RTC_DISALLOW_COPY_AND_ASSIGN(ControllerManagerImpl); |
| 109 }; | 110 }; |
| 110 | 111 |
| 111 } // namespace webrtc | 112 } // namespace webrtc |
| 112 | 113 |
| 113 #endif // WEBRTC_MODULES_AUDIO_CODING_AUDIO_NETWORK_ADAPTOR_CONTROLLER_MANAGER_
H_ | 114 #endif // WEBRTC_MODULES_AUDIO_CODING_AUDIO_NETWORK_ADAPTOR_CONTROLLER_MANAGER_
H_ |
| OLD | NEW |