xref: /aosp_15_r20/external/webrtc/modules/audio_processing/aec_dump/BUILD.gn (revision d9f758449e529ab9291ac668be2861e7a55c2422)
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/system:file_wrapper",
18    "../../../rtc_base/system:rtc_export",
19  ]
20  absl_deps = [ "//third_party/abseil-cpp/absl/strings" ]
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      "//testing/gtest",
50    ]
51  }
52}
53
54if (rtc_enable_protobuf) {
55  rtc_library("aec_dump_impl") {
56    sources = [
57      "aec_dump_impl.cc",
58      "aec_dump_impl.h",
59      "capture_stream_info.cc",
60      "capture_stream_info.h",
61    ]
62
63    deps = [
64      ":aec_dump",
65      "..:aec_dump_interface",
66      "../../../api/audio:audio_frame_api",
67      "../../../api/task_queue",
68      "../../../rtc_base:checks",
69      "../../../rtc_base:ignore_wundef",
70      "../../../rtc_base:logging",
71      "../../../rtc_base:macromagic",
72      "../../../rtc_base:protobuf_utils",
73      "../../../rtc_base:race_checker",
74      "../../../rtc_base:rtc_event",
75      "../../../rtc_base:rtc_task_queue",
76      "../../../rtc_base/system:file_wrapper",
77      "../../../system_wrappers",
78    ]
79    absl_deps = [ "//third_party/abseil-cpp/absl/strings" ]
80
81    deps += [ "../:audioproc_debug_proto" ]
82  }
83
84  if (rtc_include_tests) {
85    rtc_library("aec_dump_unittests") {
86      testonly = true
87      defines = []
88      deps = [
89        ":aec_dump",
90        ":aec_dump_impl",
91        "..:audioproc_debug_proto",
92        "../",
93        "../../../rtc_base:task_queue_for_test",
94        "../../../test:fileutils",
95        "../../../test:test_support",
96        "//testing/gtest",
97      ]
98      sources = [ "aec_dump_unittest.cc" ]
99    }
100  }
101}
102
103rtc_library("null_aec_dump_factory") {
104  assert_no_deps = [ ":aec_dump_impl" ]
105  sources = [ "null_aec_dump_factory.cc" ]
106
107  deps = [
108    ":aec_dump",
109    "..:aec_dump_interface",
110  ]
111  absl_deps = [ "//third_party/abseil-cpp/absl/strings" ]
112}
113