• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 MODULES_AUDIO_PROCESSING_AEC_DUMP_AEC_DUMP_FACTORY_H_
12 #define MODULES_AUDIO_PROCESSING_AEC_DUMP_AEC_DUMP_FACTORY_H_
13 
14 #include <memory>
15 #include <string>
16 
17 #include "modules/audio_processing/include/aec_dump.h"
18 #include "rtc_base/system/file_wrapper.h"
19 #include "rtc_base/system/rtc_export.h"
20 
21 namespace rtc {
22 class TaskQueue;
23 }  // namespace rtc
24 
25 namespace webrtc {
26 
27 class RTC_EXPORT AecDumpFactory {
28  public:
29   // The |worker_queue| may not be null and must outlive the created
30   // AecDump instance. |max_log_size_bytes == -1| means the log size
31   // will be unlimited. |handle| may not be null. The AecDump takes
32   // responsibility for |handle| and closes it in the destructor. A
33   // non-null return value indicates that the file has been
34   // sucessfully opened.
35   static std::unique_ptr<AecDump> Create(webrtc::FileWrapper file,
36                                          int64_t max_log_size_bytes,
37                                          rtc::TaskQueue* worker_queue);
38   static std::unique_ptr<AecDump> Create(std::string file_name,
39                                          int64_t max_log_size_bytes,
40                                          rtc::TaskQueue* worker_queue);
41   static std::unique_ptr<AecDump> Create(FILE* handle,
42                                          int64_t max_log_size_bytes,
43                                          rtc::TaskQueue* worker_queue);
44 };
45 
46 }  // namespace webrtc
47 
48 #endif  // MODULES_AUDIO_PROCESSING_AEC_DUMP_AEC_DUMP_FACTORY_H_
49