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

Side by Side Diff: webrtc/modules/audio_processing/echo_control_mobile_impl.h

Issue 1422013002: Preparational work for an upcoming addition of a threadchecking scheme for APM (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@bundling_of_state_CL
Patch Set: Changes in response to user comments Created 5 years, 1 month 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 unified diff | Download patch
OLDNEW
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 namespace { 22 namespace {
22 // Functor to use when supplying a verifier function for the queue item 23 // Functor to use when supplying a verifier function for the queue item
23 // verifcation. 24 // verifcation.
24 class AecmRenderQueueItemVerifier { 25 class AecmRenderQueueItemVerifier {
(...skipping 11 matching lines...) Expand all
36 37
37 } // namespace anonymous 38 } // namespace anonymous
38 39
39 class AudioBuffer; 40 class AudioBuffer;
40 class CriticalSectionWrapper; 41 class CriticalSectionWrapper;
41 42
42 class EchoControlMobileImpl : public EchoControlMobile, 43 class EchoControlMobileImpl : public EchoControlMobile,
43 public ProcessingComponent { 44 public ProcessingComponent {
44 public: 45 public:
45 EchoControlMobileImpl(const AudioProcessing* apm, 46 EchoControlMobileImpl(const AudioProcessing* apm,
46 CriticalSectionWrapper* crit); 47 CriticalSectionWrapper* crit,
48 rtc::ThreadChecker* render_thread_checker);
hlundin-webrtc 2015/11/05 13:08:55 const rtc::ThreadChecker*
peah-webrtc 2015/11/06 07:31:14 Done.
47 virtual ~EchoControlMobileImpl(); 49 virtual ~EchoControlMobileImpl();
48 50
49 int ProcessRenderAudio(const AudioBuffer* audio); 51 int ProcessRenderAudio(const AudioBuffer* audio);
50 int ProcessCaptureAudio(AudioBuffer* audio); 52 int ProcessCaptureAudio(AudioBuffer* audio);
51 53
52 // EchoControlMobile implementation. 54 // EchoControlMobile implementation.
53 bool is_enabled() const override; 55 bool is_enabled() const override;
54 RoutingMode routing_mode() const override; 56 RoutingMode routing_mode() const override;
55 bool is_comfort_noise_enabled() const override; 57 bool is_comfort_noise_enabled() const override;
56 58
(...skipping 22 matching lines...) Expand all
79 int InitializeHandle(void* handle) const override; 81 int InitializeHandle(void* handle) const override;
80 int ConfigureHandle(void* handle) const override; 82 int ConfigureHandle(void* handle) const override;
81 void DestroyHandle(void* handle) const override; 83 void DestroyHandle(void* handle) const override;
82 int num_handles_required() const override; 84 int num_handles_required() const override;
83 int GetHandleError(void* handle) const override; 85 int GetHandleError(void* handle) const override;
84 86
85 void AllocateRenderQueue(); 87 void AllocateRenderQueue();
86 88
87 const AudioProcessing* apm_; 89 const AudioProcessing* apm_;
88 CriticalSectionWrapper* crit_; 90 CriticalSectionWrapper* crit_;
91 const rtc::ThreadChecker* const render_thread_checker_;
89 RoutingMode routing_mode_; 92 RoutingMode routing_mode_;
90 bool comfort_noise_enabled_; 93 bool comfort_noise_enabled_;
91 unsigned char* external_echo_path_; 94 unsigned char* external_echo_path_;
92 95
93 size_t render_queue_element_max_size_; 96 size_t render_queue_element_max_size_;
94 std::vector<int16_t> render_queue_buffer_; 97 std::vector<int16_t> render_queue_buffer_;
95 std::vector<int16_t> capture_queue_buffer_; 98 std::vector<int16_t> capture_queue_buffer_;
96 rtc::scoped_ptr<SwapQueue<std::vector<int16_t>, AecmRenderQueueItemVerifier>> 99 rtc::scoped_ptr<SwapQueue<std::vector<int16_t>, AecmRenderQueueItemVerifier>>
97 render_signal_queue_; 100 render_signal_queue_;
98 }; 101 };
99 } // namespace webrtc 102 } // namespace webrtc
100 103
101 #endif // WEBRTC_MODULES_AUDIO_PROCESSING_ECHO_CONTROL_MOBILE_IMPL_H_ 104 #endif // WEBRTC_MODULES_AUDIO_PROCESSING_ECHO_CONTROL_MOBILE_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698