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

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: Changed parameter name from initial_level to the more correct initial_peak_level Created 4 years, 3 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/gtest_prod_util.h"
19 #include "webrtc/base/criticalsection.h" 20 #include "webrtc/base/criticalsection.h"
20 #include "webrtc/base/thread_annotations.h" 21 #include "webrtc/base/thread_annotations.h"
21 #include "webrtc/modules/audio_processing/audio_buffer.h" 22 #include "webrtc/modules/audio_processing/audio_buffer.h"
22 #include "webrtc/modules/audio_processing/include/audio_processing.h" 23 #include "webrtc/modules/audio_processing/include/audio_processing.h"
23 #include "webrtc/system_wrappers/include/file_wrapper.h" 24 #include "webrtc/system_wrappers/include/file_wrapper.h"
24 25
25 #ifdef WEBRTC_AUDIOPROC_DEBUG_DUMP 26 #ifdef WEBRTC_AUDIOPROC_DEBUG_DUMP
26 // Files generated at build-time by the protobuf compiler. 27 // Files generated at build-time by the protobuf compiler.
27 #ifdef WEBRTC_ANDROID_PLATFORM_BUILD 28 #ifdef WEBRTC_ANDROID_PLATFORM_BUILD
28 #include "external/webrtc/webrtc/modules/audio_processing/debug.pb.h" 29 #include "external/webrtc/webrtc/modules/audio_processing/debug.pb.h"
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 LevelEstimator* level_estimator() const override; 123 LevelEstimator* level_estimator() const override;
123 NoiseSuppression* noise_suppression() const override; 124 NoiseSuppression* noise_suppression() const override;
124 VoiceDetection* voice_detection() const override; 125 VoiceDetection* voice_detection() const override;
125 126
126 protected: 127 protected:
127 // Overridden in a mock. 128 // Overridden in a mock.
128 virtual int InitializeLocked() 129 virtual int InitializeLocked()
129 EXCLUSIVE_LOCKS_REQUIRED(crit_render_, crit_capture_); 130 EXCLUSIVE_LOCKS_REQUIRED(crit_render_, crit_capture_);
130 131
131 private: 132 private:
133 FRIEND_TEST_ALL_PREFIXES(ApmConfiguration, LevelController);
132 struct ApmPublicSubmodules; 134 struct ApmPublicSubmodules;
133 struct ApmPrivateSubmodules; 135 struct ApmPrivateSubmodules;
134 136
135 class ApmSubmoduleStates { 137 class ApmSubmoduleStates {
136 public: 138 public:
137 ApmSubmoduleStates(); 139 ApmSubmoduleStates();
138 // Updates the submodule state and returns true if it has changed. 140 // Updates the submodule state and returns true if it has changed.
139 bool Update(bool high_pass_filter_enabled, 141 bool Update(bool high_pass_filter_enabled,
140 bool echo_canceller_enabled, 142 bool echo_canceller_enabled,
141 bool mobile_echo_controller_enabled, 143 bool mobile_echo_controller_enabled,
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
275 rtc::CriticalSection crit_debug_; 277 rtc::CriticalSection crit_debug_;
276 278
277 // Debug dump state. 279 // Debug dump state.
278 ApmDebugDumpState debug_dump_; 280 ApmDebugDumpState debug_dump_;
279 #endif 281 #endif
280 282
281 // Critical sections. 283 // Critical sections.
282 rtc::CriticalSection crit_render_ ACQUIRED_BEFORE(crit_capture_); 284 rtc::CriticalSection crit_render_ ACQUIRED_BEFORE(crit_capture_);
283 rtc::CriticalSection crit_capture_; 285 rtc::CriticalSection crit_capture_;
284 286
287 // Struct containing the Config specifying the behavior of APM.
288 AudioProcessing::Config config_;
289
285 // Class containing information about what submodules are active. 290 // Class containing information about what submodules are active.
286 ApmSubmoduleStates submodule_states_; 291 ApmSubmoduleStates submodule_states_;
287 292
288 // Structs containing the pointers to the submodules. 293 // Structs containing the pointers to the submodules.
289 std::unique_ptr<ApmPublicSubmodules> public_submodules_; 294 std::unique_ptr<ApmPublicSubmodules> public_submodules_;
290 std::unique_ptr<ApmPrivateSubmodules> private_submodules_ 295 std::unique_ptr<ApmPrivateSubmodules> private_submodules_
291 GUARDED_BY(crit_capture_); 296 GUARDED_BY(crit_capture_);
292 297
293 // State that is written to while holding both the render and capture locks 298 // State that is written to while holding both the render and capture locks
294 // but can be read without any lock being held. 299 // but can be read without any lock being held.
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
364 ApmRenderState(); 369 ApmRenderState();
365 ~ApmRenderState(); 370 ~ApmRenderState();
366 std::unique_ptr<AudioConverter> render_converter; 371 std::unique_ptr<AudioConverter> render_converter;
367 std::unique_ptr<AudioBuffer> render_audio; 372 std::unique_ptr<AudioBuffer> render_audio;
368 } render_ GUARDED_BY(crit_render_); 373 } render_ GUARDED_BY(crit_render_);
369 }; 374 };
370 375
371 } // namespace webrtc 376 } // namespace webrtc
372 377
373 #endif // WEBRTC_MODULES_AUDIO_PROCESSING_AUDIO_PROCESSING_IMPL_H_ 378 #endif // WEBRTC_MODULES_AUDIO_PROCESSING_AUDIO_PROCESSING_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698