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 |
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
201 void InitializeGainController() | 201 void InitializeGainController() |
202 EXCLUSIVE_LOCKS_REQUIRED(crit_render_, crit_capture_); | 202 EXCLUSIVE_LOCKS_REQUIRED(crit_render_, crit_capture_); |
203 void InitializeEchoControlMobile() | 203 void InitializeEchoControlMobile() |
204 EXCLUSIVE_LOCKS_REQUIRED(crit_render_, crit_capture_); | 204 EXCLUSIVE_LOCKS_REQUIRED(crit_render_, crit_capture_); |
205 int InitializeLocked(const ProcessingConfig& config) | 205 int InitializeLocked(const ProcessingConfig& config) |
206 EXCLUSIVE_LOCKS_REQUIRED(crit_render_, crit_capture_); | 206 EXCLUSIVE_LOCKS_REQUIRED(crit_render_, crit_capture_); |
207 | 207 |
208 // Capture-side exclusive methods possibly running APM in a multi-threaded | 208 // Capture-side exclusive methods possibly running APM in a multi-threaded |
209 // manner that are called with the render lock already acquired. | 209 // manner that are called with the render lock already acquired. |
210 int ProcessStreamLocked() EXCLUSIVE_LOCKS_REQUIRED(crit_capture_); | 210 int ProcessStreamLocked() EXCLUSIVE_LOCKS_REQUIRED(crit_capture_); |
211 bool output_copy_needed(bool is_data_processed) const | 211 bool output_copy_needed() const EXCLUSIVE_LOCKS_REQUIRED(crit_capture_); |
212 EXCLUSIVE_LOCKS_REQUIRED(crit_capture_); | |
213 bool is_data_processed() const EXCLUSIVE_LOCKS_REQUIRED(crit_capture_); | 212 bool is_data_processed() const EXCLUSIVE_LOCKS_REQUIRED(crit_capture_); |
214 bool synthesis_needed(bool is_data_processed) const | 213 bool fwd_synthesis_needed() const EXCLUSIVE_LOCKS_REQUIRED(crit_capture_); |
215 EXCLUSIVE_LOCKS_REQUIRED(crit_capture_); | 214 bool fwd_analysis_needed() const EXCLUSIVE_LOCKS_REQUIRED(crit_capture_); |
216 bool analysis_needed(bool is_data_processed) const | |
217 EXCLUSIVE_LOCKS_REQUIRED(crit_capture_); | |
218 void MaybeUpdateHistograms() EXCLUSIVE_LOCKS_REQUIRED(crit_capture_); | 215 void MaybeUpdateHistograms() EXCLUSIVE_LOCKS_REQUIRED(crit_capture_); |
219 | 216 |
220 // Render-side exclusive methods possibly running APM in a multi-threaded | 217 // Render-side exclusive methods possibly running APM in a multi-threaded |
221 // manner that are called with the render lock already acquired. | 218 // manner that are called with the render lock already acquired. |
222 // TODO(ekm): Remove once all clients updated to new interface. | 219 // TODO(ekm): Remove once all clients updated to new interface. |
223 int AnalyzeReverseStreamLocked(const float* const* src, | 220 int AnalyzeReverseStreamLocked(const float* const* src, |
224 const StreamConfig& input_config, | 221 const StreamConfig& input_config, |
225 const StreamConfig& output_config) | 222 const StreamConfig& output_config) |
226 EXCLUSIVE_LOCKS_REQUIRED(crit_render_); | 223 EXCLUSIVE_LOCKS_REQUIRED(crit_render_); |
227 bool is_rev_processed() const EXCLUSIVE_LOCKS_REQUIRED(crit_render_); | 224 bool is_rev_processed() const EXCLUSIVE_LOCKS_REQUIRED(crit_render_); |
| 225 bool rev_synthesis_needed() const EXCLUSIVE_LOCKS_REQUIRED(crit_render_); |
| 226 bool rev_analysis_needed() const EXCLUSIVE_LOCKS_REQUIRED(crit_render_); |
228 int ProcessReverseStreamLocked() EXCLUSIVE_LOCKS_REQUIRED(crit_render_); | 227 int ProcessReverseStreamLocked() EXCLUSIVE_LOCKS_REQUIRED(crit_render_); |
229 | 228 |
230 // Debug dump methods that are internal and called without locks. | 229 // Debug dump methods that are internal and called without locks. |
231 // TODO(peah): Make thread safe. | 230 // TODO(peah): Make thread safe. |
232 #ifdef WEBRTC_AUDIOPROC_DEBUG_DUMP | 231 #ifdef WEBRTC_AUDIOPROC_DEBUG_DUMP |
233 // TODO(andrew): make this more graceful. Ideally we would split this stuff | 232 // TODO(andrew): make this more graceful. Ideally we would split this stuff |
234 // out into a separate class with an "enabled" and "disabled" implementation. | 233 // out into a separate class with an "enabled" and "disabled" implementation. |
235 static int WriteMessageToDebugFile(FileWrapper* debug_file, | 234 static int WriteMessageToDebugFile(FileWrapper* debug_file, |
236 int64_t* filesize_limit_bytes, | 235 int64_t* filesize_limit_bytes, |
237 rtc::CriticalSection* crit_debug, | 236 rtc::CriticalSection* crit_debug, |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
344 | 343 |
345 struct ApmRenderState { | 344 struct ApmRenderState { |
346 std::unique_ptr<AudioConverter> render_converter; | 345 std::unique_ptr<AudioConverter> render_converter; |
347 std::unique_ptr<AudioBuffer> render_audio; | 346 std::unique_ptr<AudioBuffer> render_audio; |
348 } render_ GUARDED_BY(crit_render_); | 347 } render_ GUARDED_BY(crit_render_); |
349 }; | 348 }; |
350 | 349 |
351 } // namespace webrtc | 350 } // namespace webrtc |
352 | 351 |
353 #endif // WEBRTC_MODULES_AUDIO_PROCESSING_AUDIO_PROCESSING_IMPL_H_ | 352 #endif // WEBRTC_MODULES_AUDIO_PROCESSING_AUDIO_PROCESSING_IMPL_H_ |
OLD | NEW |