• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2022-2023 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("../../../../config.gni")
16
17ohos_shared_library("audio_capturer_source") {
18  sanitize = {
19    cfi = true
20    cfi_cross_dso = true
21    debug = false
22    blocklist = "../../../../cfi_blocklist.txt"
23  }
24  install_enable = true
25  sources = [ "primary/audio_capturer_source.cpp" ]
26  cflags = [ "-fPIC" ]
27  cflags += [ "-Wall" ]
28  cflags_cc = cflags
29
30  include_dirs = [
31    "common",
32    "../common/include",
33    "../../audioutils/include",
34    "../../../../interfaces/inner_api/native/audiocommon/include",
35  ]
36
37  deps = [ "../../audioutils:audio_utils" ]
38
39  external_deps = [
40    "c_utils:utils",
41    "drivers_interface_audio:audio_idl_headers",
42    "drivers_interface_audio:libaudio_proxy_2.0",
43    "hilog:libhilog",
44    "init:libbegetutil",
45  ]
46  defines = []
47  if (audio_framework_feature_power_manager) {
48    external_deps += [ "power_manager:powermgr_client" ]
49    defines += [ "FEATURE_POWER_MANAGER" ]
50  }
51
52  part_name = "audio_framework"
53  subsystem_name = "multimedia"
54}
55
56ohos_shared_library("fast_audio_capturer_source") {
57  sanitize = {
58    cfi = true
59    cfi_cross_dso = true
60    debug = false
61    blocklist = "../../../../cfi_blocklist.txt"
62  }
63  install_enable = true
64  sources = [ "fast/fast_audio_capturer_source.cpp" ]
65  cflags = [ "-fPIC" ]
66  cflags += [ "-Wall" ]
67  cflags_cc = cflags
68
69  include_dirs = [
70    "../common/include",
71    "../../../../interfaces/inner_api/native/audiocommon/include",
72    "../../audioutils/include",
73    "common",
74  ]
75
76  deps = [ "../../audioutils:audio_utils" ]
77
78  external_deps = [
79    "drivers_interface_audio:audio_idl_headers",
80    "drivers_interface_audio:libaudio_proxy_2.0",
81    "hilog:libhilog",
82  ]
83  defines = []
84  if (audio_framework_feature_power_manager) {
85    external_deps += [ "power_manager:powermgr_client" ]
86    defines += [ "FEATURE_POWER_MANAGER" ]
87  }
88
89  part_name = "audio_framework"
90  subsystem_name = "multimedia"
91}
92
93ohos_shared_library("remote_audio_capturer_source") {
94  sanitize = {
95    cfi = true
96    cfi_cross_dso = true
97    debug = false
98    blocklist = "../../../../cfi_blocklist.txt"
99  }
100  install_enable = true
101  sources = [ "remote/remote_audio_capturer_source.cpp" ]
102  cflags = [ "-fPIC" ]
103  cflags += [ "-Wall" ]
104  cflags_cc = cflags
105
106  include_dirs = [
107    "common",
108    "../common/include",
109    "../devicemanager/interface",
110    "../../audioutils/include",
111    "../../../../interfaces/inner_api/native/audiocommon/include",
112  ]
113  include_dirs += [ multimedia_audio_framework_drivers ]
114
115  deps = [
116    "../../audioutils:audio_utils",
117    "../devicemanager:audio_device_manager",
118  ]
119
120  external_deps = [ "hilog:libhilog" ]
121  defines = []
122  if (audio_framework_feature_daudio_enable) {
123    defines += [ "FEATURE_DISTRIBUTE_AUDIO" ]
124    external_deps += [ "distributed_audio:daudio_client" ]
125  }
126
127  part_name = "audio_framework"
128  subsystem_name = "multimedia"
129}
130
131ohos_shared_library("remote_fast_audio_capturer_source") {
132  sanitize = {
133    cfi = true
134    cfi_cross_dso = true
135    debug = false
136    blocklist = "../../../../cfi_blocklist.txt"
137  }
138  install_enable = true
139  sources = [ "remote_fast/remote_fast_audio_capturer_source.cpp" ]
140  cflags = [ "-fPIC" ]
141  cflags += [ "-Wall" ]
142  cflags_cc = cflags
143
144  include_dirs = [
145    "common",
146    "../devicemanager/interface",
147    "../common/include",
148    "../../audioutils/include",
149    "../../../../interfaces/inner_api/native/audiocommon/include",
150  ]
151
152  include_dirs += [ multimedia_audio_framework_drivers ]
153
154  deps = [
155    "../../audioutils:audio_utils",
156    "../devicemanager:audio_device_manager",
157  ]
158
159  external_deps = [
160    "c_utils:utils",
161    "hilog:libhilog",
162  ]
163  defines = []
164  if (audio_framework_feature_daudio_enable) {
165    defines += [ "FEATURE_DISTRIBUTE_AUDIO" ]
166    external_deps += [ "distributed_audio:daudio_client" ]
167  }
168
169  part_name = "audio_framework"
170  subsystem_name = "multimedia"
171}
172
173ohos_shared_library("audio_capturer_file_source") {
174  sanitize = {
175    cfi = true
176    cfi_cross_dso = true
177    debug = false
178    blocklist = "../../../../cfi_blocklist.txt"
179  }
180  install_enable = true
181
182  sources = [ "file/audio_capturer_file_source.cpp" ]
183
184  cflags = [ "-fPIC" ]
185  cflags += [ "-Wall" ]
186
187  cflags_cc = cflags
188
189  include_dirs = [
190    "common",
191    "../common/include",
192    "../../../../interfaces/inner_api/native/audiocommon/include",
193  ]
194
195  include_dirs += [ multimedia_audio_framework_drivers ]
196
197  external_deps = [ "hilog:libhilog" ]
198
199  part_name = "audio_framework"
200  subsystem_name = "multimedia"
201}
202
203ohos_shared_library("capturer_source_adapter") {
204  sanitize = {
205    cfi = true
206    cfi_cross_dso = true
207    debug = false
208    blocklist = "../../../../cfi_blocklist.txt"
209  }
210  install_enable = true
211
212  sources = [
213    "common/capturer_source_adapter.c",
214    "common/i_audio_capturer_source.cpp",
215  ]
216
217  cflags = [ "-fPIC" ]
218  cflags += [ "-Wall" ]
219
220  cflags_cc = cflags
221
222  include_dirs = [
223    "common",
224    "file",
225    "primary",
226    "remote",
227    "../common/include",
228    "../devicemanager/interface",
229    "../../../../interfaces/inner_api/native/audiocommon/include",
230  ]
231
232  include_dirs += [ multimedia_audio_framework_drivers ]
233
234  deps = [
235    ":audio_capturer_file_source",
236    ":audio_capturer_source",
237    ":remote_audio_capturer_source",
238    ":remote_fast_audio_capturer_source",
239  ]
240
241  external_deps = [ "hilog:libhilog" ]
242
243  part_name = "audio_framework"
244  subsystem_name = "multimedia"
245}
246