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

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

Issue 2838133003: Implementation of new AecDump interface. (Closed)
Patch Set: Changed CaptureStreamInfo behaviour. Created 3 years, 7 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
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after
279 int ProcessRenderStreamLocked() EXCLUSIVE_LOCKS_REQUIRED(crit_render_); 279 int ProcessRenderStreamLocked() EXCLUSIVE_LOCKS_REQUIRED(crit_render_);
280 280
281 // Collects configuration settings from public and private 281 // Collects configuration settings from public and private
282 // submodules to be saved as an audioproc::Config message. 282 // submodules to be saved as an audioproc::Config message.
283 InternalAPMConfig CollectApmConfig() const 283 InternalAPMConfig CollectApmConfig() const
284 EXCLUSIVE_LOCKS_REQUIRED(crit_capture_) 284 EXCLUSIVE_LOCKS_REQUIRED(crit_capture_)
285 EXCLUSIVE_LOCKS_REQUIRED(crit_capture_); 285 EXCLUSIVE_LOCKS_REQUIRED(crit_capture_);
286 286
287 // Creates and returns new CaptureStreamInfo filled with the capture 287 // Creates and returns new CaptureStreamInfo filled with the capture
288 // stream and data (delay, drift etc). 288 // stream and data (delay, drift etc).
289 std::unique_ptr<AecDump::CaptureStreamInfo> RecordUnprocessedCaptureStream( 289 AecDump::CaptureStreamInfo* RecordUnprocessedCaptureStream(
290 const float* const* capture_stream) const 290 const float* const* capture_stream) const
291 EXCLUSIVE_LOCKS_REQUIRED(crit_capture_); 291 EXCLUSIVE_LOCKS_REQUIRED(crit_capture_);
292 292
293 std::unique_ptr<AecDump::CaptureStreamInfo> RecordUnprocessedCaptureStream( 293 AecDump::CaptureStreamInfo* RecordUnprocessedCaptureStream(
294 const AudioFrame& capture_frame) const 294 const AudioFrame& capture_frame) const
295 EXCLUSIVE_LOCKS_REQUIRED(crit_capture_); 295 EXCLUSIVE_LOCKS_REQUIRED(crit_capture_);
296 296
297 // Fills the CaptureStreamInfo object with the processed capture 297 // Fills the CaptureStreamInfo object with the processed capture
298 // stream and sends it to be written with AecDump. 298 // stream and sends it to be written with AecDump.
299 void RecordProcessedCaptureStream( 299 void RecordProcessedCaptureStream(
300 const float* const* processed_capture_stream, 300 const float* const* processed_capture_stream,
301 std::unique_ptr<AecDump::CaptureStreamInfo> stream_info) const 301 AecDump::CaptureStreamInfo* stream_info) const
302 EXCLUSIVE_LOCKS_REQUIRED(crit_capture_); 302 EXCLUSIVE_LOCKS_REQUIRED(crit_capture_);
303 303
304 void RecordProcessedCaptureStream( 304 void RecordProcessedCaptureStream(const AudioFrame& processed_capture_frame,
305 const AudioFrame& processed_capture_frame, 305 AecDump::CaptureStreamInfo* stream_info)
306 std::unique_ptr<AecDump::CaptureStreamInfo> stream_info) const 306 const EXCLUSIVE_LOCKS_REQUIRED(crit_capture_);
307 EXCLUSIVE_LOCKS_REQUIRED(crit_capture_);
308 307
309 // Copies data (delay, drift, etc) into the |stream_info| object. 308 // Copies data (delay, drift, etc) into the |stream_info| object.
310 void PopulateStreamInfoWithState(AecDump::CaptureStreamInfo* stream_info) 309 void PopulateStreamInfoWithState(AecDump::CaptureStreamInfo* stream_info)
311 const EXCLUSIVE_LOCKS_REQUIRED(crit_capture_); 310 const EXCLUSIVE_LOCKS_REQUIRED(crit_capture_);
312 311
313 // Debug dump methods that are internal and called without locks. 312 // Debug dump methods that are internal and called without locks.
314 // TODO(peah): Make thread safe. 313 // TODO(peah): Make thread safe.
315 #ifdef WEBRTC_AUDIOPROC_DEBUG_DUMP 314 #ifdef WEBRTC_AUDIOPROC_DEBUG_DUMP
316 // TODO(andrew): make this more graceful. Ideally we would split this stuff 315 // TODO(andrew): make this more graceful. Ideally we would split this stuff
317 // out into a separate class with an "enabled" and "disabled" implementation. 316 // out into a separate class with an "enabled" and "disabled" implementation.
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
469 std::unique_ptr< 468 std::unique_ptr<
470 SwapQueue<std::vector<int16_t>, RenderQueueItemVerifier<int16_t>>> 469 SwapQueue<std::vector<int16_t>, RenderQueueItemVerifier<int16_t>>>
471 agc_render_signal_queue_; 470 agc_render_signal_queue_;
472 std::unique_ptr<SwapQueue<std::vector<float>, RenderQueueItemVerifier<float>>> 471 std::unique_ptr<SwapQueue<std::vector<float>, RenderQueueItemVerifier<float>>>
473 red_render_signal_queue_; 472 red_render_signal_queue_;
474 }; 473 };
475 474
476 } // namespace webrtc 475 } // namespace webrtc
477 476
478 #endif // WEBRTC_MODULES_AUDIO_PROCESSING_AUDIO_PROCESSING_IMPL_H_ 477 #endif // WEBRTC_MODULES_AUDIO_PROCESSING_AUDIO_PROCESSING_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698