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 22 matching lines...) Expand all Loading... | |
33 virtual std::vector<Controller*> GetControllers() const = 0; | 33 virtual std::vector<Controller*> GetControllers() const = 0; |
34 }; | 34 }; |
35 | 35 |
36 class ControllerManagerImpl final : public ControllerManager { | 36 class ControllerManagerImpl final : public ControllerManager { |
37 public: | 37 public: |
38 struct Config { | 38 struct Config { |
39 Config(int min_reordering_time_ms, | 39 Config(int min_reordering_time_ms, |
40 float min_reordering_squared_distance, | 40 float min_reordering_squared_distance, |
41 const Clock* clock); | 41 const Clock* clock); |
42 ~Config(); | 42 ~Config(); |
43 // Least time since last reordering for a new reordering to be made. | |
minyue-webrtc
2016/09/28 12:47:26
added together with the comments in config.proto
| |
43 int min_reordering_time_ms; | 44 int min_reordering_time_ms; |
45 // Least squared distance from last scoring point for a new reordering to be | |
46 // made. | |
44 float min_reordering_squared_distance; | 47 float min_reordering_squared_distance; |
45 const Clock* clock; | 48 const Clock* clock; |
46 }; | 49 }; |
47 | 50 |
51 static std::unique_ptr<ControllerManager> Create( | |
52 const std::string& config_string, | |
53 size_t num_encoder_channels, | |
54 rtc::ArrayView<const int> encoder_frame_lengths_ms, | |
55 size_t intial_channels_to_encode, | |
56 int initial_frame_length_ms, | |
57 int initial_bitrate_bps, | |
58 bool initial_fec_enabled, | |
59 bool initial_dtx_enabled, | |
60 const Clock* clock); | |
61 | |
48 explicit ControllerManagerImpl(const Config& config); | 62 explicit ControllerManagerImpl(const Config& config); |
49 | 63 |
50 // Dependency injection for testing. | 64 // Dependency injection for testing. |
51 ControllerManagerImpl( | 65 ControllerManagerImpl( |
52 const Config& config, | 66 const Config& config, |
53 std::vector<std::unique_ptr<Controller>>&& controllers, | 67 std::vector<std::unique_ptr<Controller>>&& controllers, |
54 const std::map<const Controller*, std::pair<int, float>>& | 68 const std::map<const Controller*, std::pair<int, float>>& |
55 chracteristic_points); | 69 chracteristic_points); |
56 | 70 |
57 ~ControllerManagerImpl() override; | 71 ~ControllerManagerImpl() override; |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
89 // |scoring_points_| saves the characteristic scoring points of various | 103 // |scoring_points_| saves the characteristic scoring points of various |
90 // controllers. | 104 // controllers. |
91 std::map<const Controller*, ScoringPoint> controller_scoring_points_; | 105 std::map<const Controller*, ScoringPoint> controller_scoring_points_; |
92 | 106 |
93 RTC_DISALLOW_COPY_AND_ASSIGN(ControllerManagerImpl); | 107 RTC_DISALLOW_COPY_AND_ASSIGN(ControllerManagerImpl); |
94 }; | 108 }; |
95 | 109 |
96 } // namespace webrtc | 110 } // namespace webrtc |
97 | 111 |
98 #endif // WEBRTC_MODULES_AUDIO_CODING_AUDIO_NETWORK_ADAPTOR_CONTROLLER_MANAGER_ H_ | 112 #endif // WEBRTC_MODULES_AUDIO_CODING_AUDIO_NETWORK_ADAPTOR_CONTROLLER_MANAGER_ H_ |
OLD | NEW |