Sam Zackrisson | 74ed734 | 2018-08-16 10:54:07 +0200 | [diff] [blame^] | 1 | /* |
| 2 | * Copyright (c) 2018 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 MODULES_AUDIO_PROCESSING_ECHO_CONTROL_MOBILE_PROXY_H_ |
| 12 | #define MODULES_AUDIO_PROCESSING_ECHO_CONTROL_MOBILE_PROXY_H_ |
| 13 | |
| 14 | #include "modules/audio_processing/include/audio_processing.h" |
| 15 | #include "rtc_base/constructormagic.h" |
| 16 | #include "rtc_base/scoped_ref_ptr.h" |
| 17 | |
| 18 | namespace webrtc { |
| 19 | |
| 20 | // Class for temporarily redirecting AECM configuration to a new API. |
| 21 | class EchoControlMobileProxy : public EchoControlMobile { |
| 22 | public: |
| 23 | EchoControlMobileProxy(AudioProcessing* audio_processing, |
| 24 | EchoControlMobile* echo_control_mobile); |
| 25 | ~EchoControlMobileProxy() override; |
| 26 | |
| 27 | bool is_enabled() const override; |
| 28 | RoutingMode routing_mode() const override; |
| 29 | bool is_comfort_noise_enabled() const override; |
| 30 | int Enable(bool enable) override; |
| 31 | int set_routing_mode(RoutingMode mode) override; |
| 32 | int enable_comfort_noise(bool enable) override; |
| 33 | int SetEchoPath(const void* echo_path, size_t size_bytes) override; |
| 34 | int GetEchoPath(void* echo_path, size_t size_bytes) const override; |
| 35 | |
| 36 | private: |
| 37 | AudioProcessing* audio_processing_; |
| 38 | EchoControlMobile* echo_control_mobile_; |
| 39 | |
| 40 | RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(EchoControlMobileProxy); |
| 41 | }; |
| 42 | } // namespace webrtc |
| 43 | |
| 44 | #endif // MODULES_AUDIO_PROCESSING_ECHO_CONTROL_MOBILE_PROXY_H_ |