| 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 01b640fcfc0f36332790765fd530f267690cfc9a..24a56658b03ccf750c0af24bae931b834cf70efd 100644
|
| --- a/webrtc/modules/audio_processing/audio_processing_impl.h
|
| +++ b/webrtc/modules/audio_processing/audio_processing_impl.h
|
| @@ -23,22 +23,12 @@
|
| #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"
|
| #include "webrtc/system_wrappers/include/file_wrapper.h"
|
|
|
| -#ifdef WEBRTC_AUDIOPROC_DEBUG_DUMP
|
| -// Files generated at build-time by the protobuf compiler.
|
| -RTC_PUSH_IGNORING_WUNDEF()
|
| -#ifdef WEBRTC_ANDROID_PLATFORM_BUILD
|
| -#include "external/webrtc/webrtc/modules/audio_processing/debug.pb.h"
|
| -#else
|
| -#include "webrtc/modules/audio_processing/debug.pb.h"
|
| -#endif
|
| -RTC_POP_IGNORING_WUNDEF()
|
| -#endif // WEBRTC_AUDIOPROC_DEBUG_DUMP
|
| -
|
| namespace webrtc {
|
|
|
| class AgcManagerDirect;
|
| @@ -66,12 +56,8 @@ class AudioProcessingImpl : public AudioProcessing {
|
| void ApplyConfig(const AudioProcessing::Config& config) override;
|
| void SetExtraOptions(const webrtc::Config& config) override;
|
| void UpdateHistogramsOnCallEnd() 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;
|
| - int StartDebugRecording(FILE* handle) override;
|
| - int StartDebugRecordingForPlatformFile(rtc::PlatformFile handle) override;
|
| - int StopDebugRecording() override;
|
| + void StartDebugRecording(std::unique_ptr<AecDump> aec_dump) override;
|
| + void StopDebugRecording() override;
|
|
|
| // Capture-side exclusive methods possibly running APM in a
|
| // multi-threaded manner. Acquire the capture lock.
|
| @@ -275,29 +261,10 @@ class AudioProcessingImpl : public AudioProcessing {
|
| EXCLUSIVE_LOCKS_REQUIRED(crit_render_);
|
| int ProcessRenderStreamLocked() EXCLUSIVE_LOCKS_REQUIRED(crit_render_);
|
|
|
| -// Debug dump methods that are internal and called without locks.
|
| -// TODO(peah): Make thread safe.
|
| -#ifdef WEBRTC_AUDIOPROC_DEBUG_DUMP
|
| - // TODO(andrew): make this more graceful. Ideally we would split this stuff
|
| - // out into a separate class with an "enabled" and "disabled" implementation.
|
| - static int WriteMessageToDebugFile(FileWrapper* debug_file,
|
| - int64_t* filesize_limit_bytes,
|
| - rtc::CriticalSection* crit_debug,
|
| - ApmDebugDumpThreadState* debug_state);
|
| - int WriteInitMessage() EXCLUSIVE_LOCKS_REQUIRED(crit_render_, crit_capture_);
|
| -
|
| - // Writes Config message. If not |forced|, only writes the current config if
|
| - // it is different from the last saved one; if |forced|, writes the config
|
| - // regardless of the last saved.
|
| - int WriteConfigMessage(bool forced) EXCLUSIVE_LOCKS_REQUIRED(crit_capture_)
|
| - EXCLUSIVE_LOCKS_REQUIRED(crit_capture_);
|
| -
|
| - // Critical section.
|
| - rtc::CriticalSection crit_debug_;
|
| + int WriteConfigMessage(bool forced) EXCLUSIVE_LOCKS_REQUIRED(crit_capture_);
|
|
|
| - // Debug dump state.
|
| - ApmDebugDumpState debug_dump_;
|
| -#endif
|
| + // TODO(aleloi) doc.
|
| + std::unique_ptr<AecDump> aec_dump_;
|
|
|
| // Critical sections.
|
| rtc::CriticalSection crit_render_ ACQUIRED_BEFORE(crit_capture_);
|
|
|