Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(35)

Unified Diff: webrtc/modules/audio_coding/audio_network_adaptor/controller_manager.cc

Issue 2306083002: Adding basic implementation of AudioNetworkAdaptor. (Closed)
Patch Set: more polish Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: webrtc/modules/audio_coding/audio_network_adaptor/controller_manager.cc
diff --git a/webrtc/modules/audio_coding/audio_network_adaptor/controller_manager.cc b/webrtc/modules/audio_coding/audio_network_adaptor/controller_manager.cc
new file mode 100644
index 0000000000000000000000000000000000000000..80079d73b3037809bb8bb4ea8fc057647a043107
--- /dev/null
+++ b/webrtc/modules/audio_coding/audio_network_adaptor/controller_manager.cc
@@ -0,0 +1,45 @@
+/*
+ * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree. An additional intellectual property rights grant can be found
+ * in the file PATENTS. All contributing project authors may
+ * be found in the AUTHORS file in the root of the source tree.
+ */
+
+#include <utility>
+
+#include "webrtc/modules/audio_coding/audio_network_adaptor/controller_manager.h"
+
+namespace webrtc {
+
+ControllerManagerImpl::Config::Config() = default;
+
+ControllerManagerImpl::Config::~Config() = default;
+
+ControllerManagerImpl::ControllerManagerImpl(const Config& config)
+ : config_(config) {}
+
+ControllerManagerImpl::ControllerManagerImpl(
+ const Config& config,
+ std::vector<std::unique_ptr<Controller>> controllers)
+ : config_(config), controllers_(std::move(controllers)) {
+ for (auto& controller : controllers_) {
+ default_sorted_controllers_.push_back(controller.get());
+ }
+}
+
+ControllerManagerImpl::~ControllerManagerImpl() = default;
+
+std::vector<Controller*> ControllerManagerImpl::GetSortedControllers(
+ const Controller::NetworkMetrics& metrics) {
+ // TODO(minyue): Reorder controllers according to their significance.
+ return default_sorted_controllers_;
+}
+
+std::vector<Controller*> ControllerManagerImpl::GetControllers() const {
+ return default_sorted_controllers_;
+}
+
+} // namespace webrtc

Powered by Google App Engine
This is Rietveld 408576698