1# Copyright (c) 2017 The WebRTC project authors. All Rights Reserved.
2#
3# Use of this source code is governed by a BSD-style license
4# that can be found in the LICENSE file in the root of the source
5# tree. An additional intellectual property rights grant can be found
6# in the file PATENTS.  All contributing project authors may
7# be found in the AUTHORS file in the root of the source tree.
8
9import("../../../webrtc.gni")  # This contains def of 'rtc_enable_protobuf'
10
11rtc_source_set("aec_dump") {
12  visibility = [ "*" ]
13  sources = [ "aec_dump_factory.h" ]
14
15  deps = [
16    "..:aec_dump_interface",
17    "../../../rtc_base:rtc_base_approved",
18    "../../../rtc_base/system:file_wrapper",
19    "../../../rtc_base/system:rtc_export",
20  ]
21}
22
23if (rtc_include_tests) {
24  rtc_library("mock_aec_dump") {
25    testonly = true
26    sources = [
27      "mock_aec_dump.cc",
28      "mock_aec_dump.h",
29    ]
30
31    deps = [
32      "..:aec_dump_interface",
33      "..:audioproc_test_utils",
34      "../",
35      "../../../test:test_support",
36    ]
37  }
38
39  rtc_library("mock_aec_dump_unittests") {
40    testonly = true
41    configs += [ "..:apm_debug_dump" ]
42    sources = [ "aec_dump_integration_test.cc" ]
43
44    deps = [
45      ":mock_aec_dump",
46      "..:api",
47      "..:audioproc_test_utils",
48      "../",
49      "../../../rtc_base:rtc_base_approved",
50      "//testing/gtest",
51    ]
52  }
53}
54
55if (rtc_enable_protobuf) {
56  rtc_library("aec_dump_impl") {
57    sources = [
58      "aec_dump_impl.cc",
59      "aec_dump_impl.h",
60      "capture_stream_info.cc",
61      "capture_stream_info.h",
62      "write_to_file_task.cc",
63      "write_to_file_task.h",
64    ]
65
66    deps = [
67      ":aec_dump",
68      "..:aec_dump_interface",
69      "../../../api/audio:audio_frame_api",
70      "../../../api/task_queue",
71      "../../../rtc_base:checks",
72      "../../../rtc_base:ignore_wundef",
73      "../../../rtc_base:protobuf_utils",
74      "../../../rtc_base:rtc_base_approved",
75      "../../../rtc_base:rtc_task_queue",
76      "../../../rtc_base/system:file_wrapper",
77      "../../../system_wrappers",
78    ]
79
80    deps += [ "../:audioproc_debug_proto" ]
81  }
82
83  if (rtc_include_tests) {
84    rtc_library("aec_dump_unittests") {
85      testonly = true
86      defines = []
87      deps = [
88        ":aec_dump",
89        ":aec_dump_impl",
90        "..:audioproc_debug_proto",
91        "../",
92        "../../../rtc_base:task_queue_for_test",
93        "../../../test:fileutils",
94        "../../../test:test_support",
95        "//testing/gtest",
96      ]
97      sources = [ "aec_dump_unittest.cc" ]
98    }
99  }
100}
101
102rtc_library("null_aec_dump_factory") {
103  assert_no_deps = [ ":aec_dump_impl" ]
104  sources = [ "null_aec_dump_factory.cc" ]
105
106  deps = [
107    ":aec_dump",
108    "..:aec_dump_interface",
109  ]
110}
111