OLD | NEW |
(Empty) | |
| 1 /* |
| 2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. |
| 3 * |
| 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 |
| 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 */ |
| 10 |
| 11 #include <utility> |
| 12 |
| 13 #include "webrtc/modules/audio_coding/audio_network_adaptor/controller_manager.h
" |
| 14 |
| 15 namespace webrtc { |
| 16 |
| 17 ControllerManager::Config::Config() = default; |
| 18 |
| 19 ControllerManager::Config::~Config() = default; |
| 20 |
| 21 ControllerManager::ControllerManager(const Config& config) : config_(config) {} |
| 22 |
| 23 ControllerManager::ControllerManager( |
| 24 const Config& config, |
| 25 std::vector<std::unique_ptr<Controller>> controllers) |
| 26 : config_(config), controllers_(std::move(controllers)) { |
| 27 for (auto& controller : controllers_) { |
| 28 default_sorted_controllers_.push_back(controller.get()); |
| 29 } |
| 30 } |
| 31 |
| 32 ControllerManager::~ControllerManager() = default; |
| 33 |
| 34 std::vector<Controller*> ControllerManager::GetSortedControllers( |
| 35 const Controller::NetworkMetrics& metrics) { |
| 36 // TODO(minyue): Reorder controllers according to their significance. |
| 37 return default_sorted_controllers_; |
| 38 } |
| 39 |
| 40 std::vector<Controller*> ControllerManager::GetControllers() const { |
| 41 return default_sorted_controllers_; |
| 42 } |
| 43 |
| 44 } // namespace webrtc |
OLD | NEW |