• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2021-2022 Huawei Device Co., Ltd.
2# Licensed under the Apache License, Version 2.0 (the "License");
3# you may not use this file except in compliance with the License.
4# You may obtain a copy of the License at
5#
6#     http://www.apache.org/licenses/LICENSE-2.0
7#
8# Unless required by applicable law or agreed to in writing, software
9# distributed under the License is distributed on an "AS IS" BASIS,
10# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11# See the License for the specific language governing permissions and
12# limitations under the License.
13
14import("//build/ohos.gni")
15import("../../../audio_ohcore.gni")
16import("../../../config.gni")
17
18pulseaudio_dir = "//third_party/pulseaudio"
19
20config("audio_capturer_config") {
21  include_dirs = [
22    "include",
23    "../../../interfaces/inner_api/native/audiocommon/include",
24    "../../../interfaces/inner_api/native/audiocapturer/include",
25    "../../../frameworks/native/audiostream/include",
26    "../../../services/audio_service/client/include",
27    "$pulseaudio_dir/src",
28    "$pulseaudio_dir/confgure/src",
29  ]
30
31  cflags = [
32    "-Wall",
33    "-Werror",
34  ]
35}
36
37ohos_shared_library("audio_capturer") {
38  sanitize = {
39    cfi = true
40    cfi_cross_dso = true
41    debug = false
42    blocklist = "../../../cfi_blocklist.txt"
43  }
44  install_enable = true
45
46  configs = [ ":audio_capturer_config" ]
47
48  include_dirs = audio_gateway_include_dirs
49
50  include_dirs += [ multimedia_audio_framework_pulse_audio ]
51
52  sources = [
53    "src/audio_capturer.cpp",
54    "src/audio_capturer_proxy_obj.cpp",
55  ]
56
57  deps = [
58    "../../../services/audio_policy:audio_policy_client",
59    "../../../services/audio_service:audio_client",
60  ]
61
62  deps += audio_capturer_gateway_deps
63
64  public_configs = [ ":audio_external_library_config" ]
65
66  external_deps = [
67    "c_utils:utils",
68    "hilog:libhilog",
69    "ipc:ipc_single",
70  ]
71
72  version_script = "../../../audio_framework.versionscript"
73  innerapi_tags = [ "platformsdk" ]
74
75  part_name = "audio_framework"
76  subsystem_name = "multimedia"
77}
78
79config("audio_external_library_config") {
80  include_dirs =
81      [ "../../../interfaces/inner_api/native/audiocapturer/include" ]
82}
83
84group("audio_capturer_test_packages") {
85  deps = [ ":audio_capturer_test" ]
86}
87
88ohos_executable("audio_capturer_test") {
89  install_enable = false
90
91  sources = [ "test/example/audio_capturer_test.cpp" ]
92
93  configs = [ ":audio_capturer_config" ]
94
95  deps = [ ":audio_capturer" ]
96
97  external_deps = [ "hilog:libhilog" ]
98
99  part_name = "audio_framework"
100  subsystem_name = "multimedia"
101}
102