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

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

Issue 2337083002: Reland of added functionality for specifying the initial signal level to use for the gain estimation (Closed)
Patch Set: Fixed type conversion error Created 4 years, 2 months 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_AUDIO_PROCESSING_IMPL_H_ 11 #ifndef WEBRTC_MODULES_AUDIO_PROCESSING_AUDIO_PROCESSING_IMPL_H_
12 #define WEBRTC_MODULES_AUDIO_PROCESSING_AUDIO_PROCESSING_IMPL_H_ 12 #define WEBRTC_MODULES_AUDIO_PROCESSING_AUDIO_PROCESSING_IMPL_H_
13 13
14 #include <list> 14 #include <list>
15 #include <memory> 15 #include <memory>
16 #include <string> 16 #include <string>
17 #include <vector> 17 #include <vector>
18 18
19 #include "webrtc/base/criticalsection.h" 19 #include "webrtc/base/criticalsection.h"
20 #include "webrtc/base/gtest_prod_util.h"
20 #include "webrtc/base/ignore_wundef.h" 21 #include "webrtc/base/ignore_wundef.h"
21 #include "webrtc/base/thread_annotations.h" 22 #include "webrtc/base/thread_annotations.h"
22 #include "webrtc/modules/audio_processing/audio_buffer.h" 23 #include "webrtc/modules/audio_processing/audio_buffer.h"
23 #include "webrtc/modules/audio_processing/include/audio_processing.h" 24 #include "webrtc/modules/audio_processing/include/audio_processing.h"
24 #include "webrtc/system_wrappers/include/file_wrapper.h" 25 #include "webrtc/system_wrappers/include/file_wrapper.h"
25 26
26 #ifdef WEBRTC_AUDIOPROC_DEBUG_DUMP 27 #ifdef WEBRTC_AUDIOPROC_DEBUG_DUMP
27 // Files generated at build-time by the protobuf compiler. 28 // Files generated at build-time by the protobuf compiler.
28 RTC_PUSH_IGNORING_WUNDEF() 29 RTC_PUSH_IGNORING_WUNDEF()
29 #ifdef WEBRTC_ANDROID_PLATFORM_BUILD 30 #ifdef WEBRTC_ANDROID_PLATFORM_BUILD
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 LevelEstimator* level_estimator() const override; 126 LevelEstimator* level_estimator() const override;
126 NoiseSuppression* noise_suppression() const override; 127 NoiseSuppression* noise_suppression() const override;
127 VoiceDetection* voice_detection() const override; 128 VoiceDetection* voice_detection() const override;
128 129
129 protected: 130 protected:
130 // Overridden in a mock. 131 // Overridden in a mock.
131 virtual int InitializeLocked() 132 virtual int InitializeLocked()
132 EXCLUSIVE_LOCKS_REQUIRED(crit_render_, crit_capture_); 133 EXCLUSIVE_LOCKS_REQUIRED(crit_render_, crit_capture_);
133 134
134 private: 135 private:
136 // TODO(peah): These friend classes should be removed as soon as the new
137 // parameter setting scheme allows.
138 FRIEND_TEST_ALL_PREFIXES(ApmConfiguration, DefaultBehavior);
139 FRIEND_TEST_ALL_PREFIXES(ApmConfiguration, ValidConfigBehavior);
140 FRIEND_TEST_ALL_PREFIXES(ApmConfiguration, InValidConfigBehavior);
135 struct ApmPublicSubmodules; 141 struct ApmPublicSubmodules;
136 struct ApmPrivateSubmodules; 142 struct ApmPrivateSubmodules;
137 143
138 class ApmSubmoduleStates { 144 class ApmSubmoduleStates {
139 public: 145 public:
140 ApmSubmoduleStates(); 146 ApmSubmoduleStates();
141 // Updates the submodule state and returns true if it has changed. 147 // Updates the submodule state and returns true if it has changed.
142 bool Update(bool high_pass_filter_enabled, 148 bool Update(bool high_pass_filter_enabled,
143 bool echo_canceller_enabled, 149 bool echo_canceller_enabled,
144 bool mobile_echo_controller_enabled, 150 bool mobile_echo_controller_enabled,
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 rtc::CriticalSection crit_debug_; 268 rtc::CriticalSection crit_debug_;
263 269
264 // Debug dump state. 270 // Debug dump state.
265 ApmDebugDumpState debug_dump_; 271 ApmDebugDumpState debug_dump_;
266 #endif 272 #endif
267 273
268 // Critical sections. 274 // Critical sections.
269 rtc::CriticalSection crit_render_ ACQUIRED_BEFORE(crit_capture_); 275 rtc::CriticalSection crit_render_ ACQUIRED_BEFORE(crit_capture_);
270 rtc::CriticalSection crit_capture_; 276 rtc::CriticalSection crit_capture_;
271 277
278 // Struct containing the Config specifying the behavior of APM.
279 AudioProcessing::Config config_;
280
272 // Class containing information about what submodules are active. 281 // Class containing information about what submodules are active.
273 ApmSubmoduleStates submodule_states_; 282 ApmSubmoduleStates submodule_states_;
274 283
275 // Structs containing the pointers to the submodules. 284 // Structs containing the pointers to the submodules.
276 std::unique_ptr<ApmPublicSubmodules> public_submodules_; 285 std::unique_ptr<ApmPublicSubmodules> public_submodules_;
277 std::unique_ptr<ApmPrivateSubmodules> private_submodules_ 286 std::unique_ptr<ApmPrivateSubmodules> private_submodules_
278 GUARDED_BY(crit_capture_); 287 GUARDED_BY(crit_capture_);
279 288
280 // State that is written to while holding both the render and capture locks 289 // State that is written to while holding both the render and capture locks
281 // but can be read without any lock being held. 290 // but can be read without any lock being held.
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
351 ApmRenderState(); 360 ApmRenderState();
352 ~ApmRenderState(); 361 ~ApmRenderState();
353 std::unique_ptr<AudioConverter> render_converter; 362 std::unique_ptr<AudioConverter> render_converter;
354 std::unique_ptr<AudioBuffer> render_audio; 363 std::unique_ptr<AudioBuffer> render_audio;
355 } render_ GUARDED_BY(crit_render_); 364 } render_ GUARDED_BY(crit_render_);
356 }; 365 };
357 366
358 } // namespace webrtc 367 } // namespace webrtc
359 368
360 #endif // WEBRTC_MODULES_AUDIO_PROCESSING_AUDIO_PROCESSING_IMPL_H_ 369 #endif // WEBRTC_MODULES_AUDIO_PROCESSING_AUDIO_PROCESSING_IMPL_H_
OLDNEW
« no previous file with comments | « webrtc/modules/audio_processing/audio_processing.gypi ('k') | webrtc/modules/audio_processing/audio_processing_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698