Index: webrtc/modules/audio_processing/audio_processing_impl.h |
diff --git a/webrtc/modules/audio_processing/audio_processing_impl.h b/webrtc/modules/audio_processing/audio_processing_impl.h |
index 37b15c28935f29cb6450f5f5cec3d53fe640f50f..55de6af5d387f183727bcda0da7b1c81e1183fae 100644 |
--- a/webrtc/modules/audio_processing/audio_processing_impl.h |
+++ b/webrtc/modules/audio_processing/audio_processing_impl.h |
@@ -23,6 +23,7 @@ |
#include "webrtc/base/swap_queue.h" |
#include "webrtc/base/thread_annotations.h" |
#include "webrtc/modules/audio_processing/audio_buffer.h" |
+#include "webrtc/modules/audio_processing/include/aec_dump.h" |
#include "webrtc/modules/audio_processing/include/audio_processing.h" |
#include "webrtc/modules/audio_processing/render_queue_item_verifier.h" |
#include "webrtc/modules/audio_processing/rms_level.h" |
@@ -66,6 +67,8 @@ class AudioProcessingImpl : public AudioProcessing { |
void ApplyConfig(const AudioProcessing::Config& config) override; |
void SetExtraOptions(const webrtc::Config& config) override; |
void UpdateHistogramsOnCallEnd() override; |
+ void AttachAecDump(std::unique_ptr<AecDump> aec_dump) override; |
+ void DetachAecDump() override; |
int StartDebugRecording(const char filename[kMaxFilenameSize], |
int64_t max_log_size_bytes) override; |
int StartDebugRecording(FILE* handle, int64_t max_log_size_bytes) override; |
@@ -275,6 +278,32 @@ class AudioProcessingImpl : public AudioProcessing { |
EXCLUSIVE_LOCKS_REQUIRED(crit_render_); |
int ProcessRenderStreamLocked() EXCLUSIVE_LOCKS_REQUIRED(crit_render_); |
+ // Collects configuration settings from public and private |
+ // submodules to be saved as an audioproc::Config message. |
+ InternalAPMConfig CollectApmConfig() const |
+ EXCLUSIVE_LOCKS_REQUIRED(crit_capture_) |
+ EXCLUSIVE_LOCKS_REQUIRED(crit_capture_); |
+ |
+ // Notifies attached AecDump of current configuration and capture data. |
+ void RecordUnprocessedCaptureStream(const float* const* capture_stream) |
+ EXCLUSIVE_LOCKS_REQUIRED(crit_capture_); |
+ |
+ void RecordUnprocessedCaptureStream(const AudioFrame& capture_frame) |
+ EXCLUSIVE_LOCKS_REQUIRED(crit_capture_); |
+ |
+ // Notifies attached AecDump of current configuration and |
+ // processed capture data and issues a capture stream recording |
+ // request. |
+ void RecordProcessedCaptureStream( |
+ const float* const* processed_capture_stream) |
+ EXCLUSIVE_LOCKS_REQUIRED(crit_capture_); |
+ |
+ void RecordProcessedCaptureStream(const AudioFrame& processed_capture_frame) |
+ EXCLUSIVE_LOCKS_REQUIRED(crit_capture_); |
+ |
+ // Notifies attached AecDump about current state (delay, drift, etc). |
+ void RecordAudioProcessingState() EXCLUSIVE_LOCKS_REQUIRED(crit_capture_); |
+ |
// Debug dump methods that are internal and called without locks. |
// TODO(peah): Make thread safe. |
#ifdef WEBRTC_AUDIOPROC_DEBUG_DUMP |
@@ -299,6 +328,10 @@ class AudioProcessingImpl : public AudioProcessing { |
ApmDebugDumpState debug_dump_; |
#endif |
+ // AecDump instance used for optionally logging APM config, input |
+ // and output to file in the AEC-dump format defined in debug.proto. |
+ std::unique_ptr<AecDump> aec_dump_; |
+ |
// Critical sections. |
rtc::CriticalSection crit_render_ ACQUIRED_BEFORE(crit_capture_); |
rtc::CriticalSection crit_capture_; |