| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license | 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 | 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 | 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 */ | 9 */ |
| 10 | 10 |
| 11 #ifndef WEBRTC_MODULES_AUDIO_PROCESSING_ECHO_CONTROL_MOBILE_IMPL_H_ | 11 #ifndef WEBRTC_MODULES_AUDIO_PROCESSING_ECHO_CONTROL_MOBILE_IMPL_H_ |
| 12 #define WEBRTC_MODULES_AUDIO_PROCESSING_ECHO_CONTROL_MOBILE_IMPL_H_ | 12 #define WEBRTC_MODULES_AUDIO_PROCESSING_ECHO_CONTROL_MOBILE_IMPL_H_ |
| 13 | 13 |
| 14 #include "webrtc/base/scoped_ptr.h" | 14 #include "webrtc/base/scoped_ptr.h" |
| 15 #include "webrtc/base/thread_checker.h" |
| 15 #include "webrtc/common_audio/swap_queue.h" | 16 #include "webrtc/common_audio/swap_queue.h" |
| 16 #include "webrtc/modules/audio_processing/include/audio_processing.h" | 17 #include "webrtc/modules/audio_processing/include/audio_processing.h" |
| 17 #include "webrtc/modules/audio_processing/processing_component.h" | 18 #include "webrtc/modules/audio_processing/processing_component.h" |
| 18 | 19 |
| 19 namespace webrtc { | 20 namespace webrtc { |
| 20 | 21 |
| 21 class AudioBuffer; | 22 class AudioBuffer; |
| 22 class CriticalSectionWrapper; | 23 class CriticalSectionWrapper; |
| 23 | 24 |
| 24 class EchoControlMobileImpl : public EchoControlMobile, | 25 class EchoControlMobileImpl : public EchoControlMobile, |
| 25 public ProcessingComponent { | 26 public ProcessingComponent { |
| 26 public: | 27 public: |
| 27 EchoControlMobileImpl(const AudioProcessing* apm, | 28 EchoControlMobileImpl(const AudioProcessing* apm, |
| 28 CriticalSectionWrapper* crit); | 29 CriticalSectionWrapper* crit, |
| 30 const rtc::ThreadChecker* render_thread_checker); |
| 29 virtual ~EchoControlMobileImpl(); | 31 virtual ~EchoControlMobileImpl(); |
| 30 | 32 |
| 31 int ProcessRenderAudio(const AudioBuffer* audio); | 33 int ProcessRenderAudio(const AudioBuffer* audio); |
| 32 int ProcessCaptureAudio(AudioBuffer* audio); | 34 int ProcessCaptureAudio(AudioBuffer* audio); |
| 33 | 35 |
| 34 // EchoControlMobile implementation. | 36 // EchoControlMobile implementation. |
| 35 bool is_enabled() const override; | 37 bool is_enabled() const override; |
| 36 RoutingMode routing_mode() const override; | 38 RoutingMode routing_mode() const override; |
| 37 bool is_comfort_noise_enabled() const override; | 39 bool is_comfort_noise_enabled() const override; |
| 38 | 40 |
| (...skipping 16 matching lines...) Expand all Loading... |
| 55 int InitializeHandle(void* handle) const override; | 57 int InitializeHandle(void* handle) const override; |
| 56 int ConfigureHandle(void* handle) const override; | 58 int ConfigureHandle(void* handle) const override; |
| 57 void DestroyHandle(void* handle) const override; | 59 void DestroyHandle(void* handle) const override; |
| 58 int num_handles_required() const override; | 60 int num_handles_required() const override; |
| 59 int GetHandleError(void* handle) const override; | 61 int GetHandleError(void* handle) const override; |
| 60 | 62 |
| 61 void AllocateRenderQueue(); | 63 void AllocateRenderQueue(); |
| 62 | 64 |
| 63 const AudioProcessing* apm_; | 65 const AudioProcessing* apm_; |
| 64 CriticalSectionWrapper* crit_; | 66 CriticalSectionWrapper* crit_; |
| 67 const rtc::ThreadChecker* const render_thread_checker_; |
| 65 RoutingMode routing_mode_; | 68 RoutingMode routing_mode_; |
| 66 bool comfort_noise_enabled_; | 69 bool comfort_noise_enabled_; |
| 67 unsigned char* external_echo_path_; | 70 unsigned char* external_echo_path_; |
| 68 | 71 |
| 69 size_t render_queue_element_max_size_; | 72 size_t render_queue_element_max_size_; |
| 70 std::vector<int16_t> render_queue_buffer_; | 73 std::vector<int16_t> render_queue_buffer_; |
| 71 std::vector<int16_t> capture_queue_buffer_; | 74 std::vector<int16_t> capture_queue_buffer_; |
| 72 rtc::scoped_ptr< | 75 rtc::scoped_ptr< |
| 73 SwapQueue<std::vector<int16_t>, RenderQueueItemVerifier<int16_t>>> | 76 SwapQueue<std::vector<int16_t>, RenderQueueItemVerifier<int16_t>>> |
| 74 render_signal_queue_; | 77 render_signal_queue_; |
| 75 }; | 78 }; |
| 76 } // namespace webrtc | 79 } // namespace webrtc |
| 77 | 80 |
| 78 #endif // WEBRTC_MODULES_AUDIO_PROCESSING_ECHO_CONTROL_MOBILE_IMPL_H_ | 81 #endif // WEBRTC_MODULES_AUDIO_PROCESSING_ECHO_CONTROL_MOBILE_IMPL_H_ |
| OLD | NEW |