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

Unified Diff: webrtc/modules/audio_processing/aec_dump/aec_dump_factory.h

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/aec_dump/aec_dump_factory.h
diff --git a/webrtc/modules/audio_processing/aec_dump/aec_dump_factory.h b/webrtc/modules/audio_processing/aec_dump/aec_dump_factory.h
new file mode 100644
index 0000000000000000000000000000000000000000..a33ae528e060b603f390cd0c1f13065261c4a065
--- /dev/null
+++ b/webrtc/modules/audio_processing/aec_dump/aec_dump_factory.h
@@ -0,0 +1,48 @@
+/*
+ * Copyright (c) 2017 The WebRTC project authors. All Rights Reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree. An additional intellectual property rights grant can be found
+ * in the file PATENTS. All contributing project authors may
+ * be found in the AUTHORS file in the root of the source tree.
+ */
+
+#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_AEC_DUMP_AEC_DUMP_FACTORY_H_
+#define WEBRTC_MODULES_AUDIO_PROCESSING_AEC_DUMP_AEC_DUMP_FACTORY_H_
+
+#include <memory>
+#include <string>
+
+#include "webrtc/modules/audio_processing/include/aec_dump.h"
+
+namespace rtc {
+class TaskQueue;
+} // namespace rtc
+
+namespace webrtc {
+
+class AecDumpFactory {
+ public:
+ // TODO(aleloi): update comments to new creation scheme.
+ // If called when a recording is active, that file is closed, and a
+ // new file is opened. Messages waiting to be written asynchronously
+ // to the old file may be lost. Returns true iff opening file for
+ // writing succeeded.
+
+ // Closes associated file. Messages waiting to be written to file
+ // asynchronously may be lost. This method is safe to call when no
+ // recording is active. A recording does not have to be closed
+ // manually with this method; instead the AecDump instance may be
+ // destroyed.
+ static std::unique_ptr<AecDump> Create(std::string file_name,
+ int64_t max_log_size_bytes,
+ rtc::TaskQueue* worker_queue);
+ static std::unique_ptr<AecDump> Create(FILE* handle,
+ int64_t max_log_size_bytes,
+ rtc::TaskQueue* worker_queue);
+};
+
+} // namespace webrtc
+
+#endif // WEBRTC_MODULES_AUDIO_PROCESSING_AEC_DUMP_AEC_DUMP_FACTORY_H_
« no previous file with comments | « webrtc/modules/audio_processing/aec_dump/BUILD.gn ('k') | webrtc/modules/audio_processing/aec_dump/aec_dump_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698