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_ |