custom_neteq_controller_factory.h (1546B)
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 #ifndef API_NETEQ_CUSTOM_NETEQ_CONTROLLER_FACTORY_H_ 12 #define API_NETEQ_CUSTOM_NETEQ_CONTROLLER_FACTORY_H_ 13 14 #include <memory> 15 16 #include "api/environment/environment.h" 17 #include "api/neteq/delay_manager_factory.h" 18 #include "api/neteq/neteq_controller.h" 19 #include "api/neteq/neteq_controller_factory.h" 20 namespace webrtc { 21 22 // This factory can be used to generate NetEqController instances that make 23 // use of a custom DelayManagerFactory. 24 class CustomNetEqControllerFactory : public NetEqControllerFactory { 25 public: 26 explicit CustomNetEqControllerFactory( 27 std::unique_ptr<DelayManagerFactory> delay_manager_factory); 28 ~CustomNetEqControllerFactory() override; 29 CustomNetEqControllerFactory(const CustomNetEqControllerFactory&) = delete; 30 CustomNetEqControllerFactory& operator=(const CustomNetEqControllerFactory&) = 31 delete; 32 33 std::unique_ptr<NetEqController> Create( 34 const Environment& env, 35 const NetEqController::Config& config) const override; 36 37 private: 38 std::unique_ptr<DelayManagerFactory> delay_manager_factory_; 39 }; 40 41 } // namespace webrtc 42 43 #endif // API_NETEQ_CUSTOM_NETEQ_CONTROLLER_FACTORY_H_