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

Unified Diff: webrtc/modules/audio_processing/audio_processing_impl.h.orig

Issue 2747123007: Test submission of complete AEC-dump refactoring. (Closed)
Patch Set: Changed interface and build structure after reviewer comments. Created 3 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: webrtc/modules/audio_processing/audio_processing_impl.h.orig
diff --git a/webrtc/modules/audio_processing/audio_processing_impl.h b/webrtc/modules/audio_processing/audio_processing_impl.h.orig
similarity index 93%
copy from webrtc/modules/audio_processing/audio_processing_impl.h
copy to webrtc/modules/audio_processing/audio_processing_impl.h.orig
index 01b640fcfc0f36332790765fd530f267690cfc9a..3df1fd6bd915e45d126f33664f03dfc3e169aa81 100644
--- a/webrtc/modules/audio_processing/audio_processing_impl.h
+++ b/webrtc/modules/audio_processing/audio_processing_impl.h.orig
@@ -22,12 +22,14 @@
#include "webrtc/base/ignore_wundef.h"
#include "webrtc/base/swap_queue.h"
#include "webrtc/base/thread_annotations.h"
+#include "webrtc/modules/audio_processing/aec_dumper/aec_dumper.h"
#include "webrtc/modules/audio_processing/audio_buffer.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"
+<<<<<<< HEAD
#ifdef WEBRTC_AUDIOPROC_DEBUG_DUMP
// Files generated at build-time by the protobuf compiler.
RTC_PUSH_IGNORING_WUNDEF()
@@ -39,6 +41,20 @@ RTC_PUSH_IGNORING_WUNDEF()
RTC_POP_IGNORING_WUNDEF()
#endif // WEBRTC_AUDIOPROC_DEBUG_DUMP
+||||||| parent of 6d4e36d05... aec-dumper and null-aec-dumper. Most parts are implemented.
+#ifdef WEBRTC_AUDIOPROC_DEBUG_DUMP
+// *.pb.h files are 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
+
+=======
+>>>>>>> 6d4e36d05... aec-dumper and null-aec-dumper. Most parts are implemented.
namespace webrtc {
class AgcManagerDirect;
@@ -67,10 +83,14 @@ class AudioProcessingImpl : public AudioProcessing {
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;
+ int64_t max_log_size_bytes,
+ rtc::TaskQueue* worker_queue) override;
+ int StartDebugRecording(FILE* handle,
+ int64_t max_log_size_bytes,
+ rtc::TaskQueue* worker_queue) override;
+ int StartDebugRecording(FILE* handle, rtc::TaskQueue* worker_queue) override;
+ int StartDebugRecordingForPlatformFile(rtc::PlatformFile handle,
+ rtc::TaskQueue* worker_queue) override;
int StopDebugRecording() override;
// Capture-side exclusive methods possibly running APM in a
@@ -275,29 +295,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<AecDumper> aec_dumper_;
// Critical sections.
rtc::CriticalSection crit_render_ ACQUIRED_BEFORE(crit_capture_);

Powered by Google App Engine
This is Rietveld 408576698