Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 /* | |
| 2 * Copyright (c) 2017 The WebRTC project authors. All Rights Reserved. | |
| 3 * | |
| 4 * Use of this source code is governed by a BSD-style license | |
| 5 * that can be found in the LICENSE file in the root of the source | |
| 6 * tree. An additional intellectual property rights grant can be found | |
| 7 * in the file PATENTS. All contributing project authors may | |
| 8 * be found in the AUTHORS file in the root of the source tree. | |
| 9 */ | |
| 10 | |
| 11 #ifndef WEBRTC_MODULES_AUDIO_PROCESSING_AEC_DUMP_AEC_DUMP_FACTORY_H_ | |
| 12 #define WEBRTC_MODULES_AUDIO_PROCESSING_AEC_DUMP_AEC_DUMP_FACTORY_H_ | |
| 13 | |
| 14 #include <memory> | |
| 15 #include <string> | |
| 16 | |
| 17 #include "webrtc/base/platform_file.h" | |
| 18 #include "webrtc/modules/audio_processing/include/aec_dump.h" | |
| 19 | |
| 20 namespace rtc { | |
| 21 class TaskQueue; | |
| 22 } // namespace rtc | |
| 23 | |
| 24 namespace webrtc { | |
| 25 | |
| 26 class AecDumpFactory { | |
| 27 public: | |
| 28 // TODO(aleloi): update comments to new creation scheme. | |
| 29 // If called when a recording is active, that file is closed, and a | |
| 30 // new file is opened. Messages waiting to be written asynchronously | |
| 31 // to the old file may be lost. Returns true iff opening file for | |
| 32 // writing succeeded. | |
| 33 | |
| 34 // Closes associated file. Messages waiting to be written to file | |
|
peah-webrtc
2017/05/16 06:30:37
What does this comment refer to?
aleloi
2017/05/16 20:10:16
Now updated. I've went through the other comments
| |
| 35 // asynchronously may be lost. This method is safe to call when no | |
| 36 // recording is active. A recording does not have to be closed | |
| 37 // manually with this method; instead the AecDump instance may be | |
| 38 // destroyed. | |
| 39 | |
| 40 static std::unique_ptr<AecDump> Create(rtc::PlatformFile file, | |
| 41 int64_t max_log_size_bytes, | |
| 42 rtc::TaskQueue* worker_queue); | |
| 43 static std::unique_ptr<AecDump> Create(std::string file_name, | |
| 44 int64_t max_log_size_bytes, | |
| 45 rtc::TaskQueue* worker_queue); | |
| 46 static std::unique_ptr<AecDump> Create(FILE* handle, | |
| 47 int64_t max_log_size_bytes, | |
| 48 rtc::TaskQueue* worker_queue); | |
| 49 }; | |
| 50 | |
| 51 } // namespace webrtc | |
| 52 | |
| 53 #endif // WEBRTC_MODULES_AUDIO_PROCESSING_AEC_DUMP_AEC_DUMP_FACTORY_H_ | |
| OLD | NEW |