tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

custom_neteq_controller_factory.cc (1356B)


      1 /*
      2 *  Copyright (c) 2019 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 "api/neteq/custom_neteq_controller_factory.h"
     12 
     13 #include <memory>
     14 #include <utility>
     15 
     16 #include "api/environment/environment.h"
     17 #include "api/neteq/delay_manager_factory.h"
     18 #include "api/neteq/neteq_controller.h"
     19 #include "modules/audio_coding/neteq/decision_logic.h"
     20 #include "rtc_base/checks.h"
     21 
     22 namespace webrtc {
     23 
     24 CustomNetEqControllerFactory::CustomNetEqControllerFactory(
     25    std::unique_ptr<DelayManagerFactory> delay_manager_factory)
     26    : delay_manager_factory_(std::move(delay_manager_factory)) {}
     27 CustomNetEqControllerFactory::~CustomNetEqControllerFactory() = default;
     28 
     29 std::unique_ptr<NetEqController> CustomNetEqControllerFactory::Create(
     30    const Environment& env,
     31    const NetEqController::Config& config) const {
     32  RTC_DCHECK(delay_manager_factory_);
     33  return std::make_unique<DecisionLogic>(
     34      env, config,
     35      delay_manager_factory_->Create(env.field_trials(), config.tick_timer));
     36 }
     37 
     38 }  // namespace webrtc