• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2022-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("//drivers/hdf_core/adapter/uhdf2/uhdf.gni")
16import("//foundation/multimedia/audio_framework/config.gni")
17
18ohos_shared_library("audio_renderer_sink") {
19  sanitize = {
20    cfi = true
21    debug = false
22    blocklist = "//foundation/multimedia/audio_framework/cfi_blocklist.txt"
23  }
24  install_enable = true
25
26  sources = [ "primary/audio_renderer_sink.cpp" ]
27
28  cflags = [ "-fPIC" ]
29  cflags += [ "-Wall" ]
30  cflags_cc = cflags
31
32  include_dirs = [
33    "//foundation/multimedia/audio_framework/interfaces/inner_api/native/audiocommon/include",
34    "//foundation/multimedia/audio_framework/frameworks/native/audioutils/include",
35    "//foundation/multimedia/audio_framework/frameworks/native/hdiadapter/sink/common",
36    "//drivers/peripheral/audio/interfaces/include",
37  ]
38
39  deps = [ "//foundation/multimedia/audio_framework/frameworks/native/audioutils:audio_utils" ]
40
41  deps += [ multimedia_audio_framework_hdi_audio_client ]
42
43  external_deps = [
44    "hiviewdfx_hilog_native:libhilog",
45    "power_manager:powermgr_client",
46  ]
47
48  part_name = "multimedia_audio_framework"
49  subsystem_name = "multimedia"
50}
51
52ohos_shared_library("fast_audio_renderer_sink") {
53  sanitize = {
54    cfi = true
55    debug = false
56    blocklist = "//foundation/multimedia/audio_framework/cfi_blocklist.txt"
57  }
58  install_enable = true
59
60  sources = [ "fast/fast_audio_renderer_sink.cpp" ]
61
62  include_dirs = [
63    "//foundation/multimedia/audio_framework/interfaces/inner_api/native/audiocommon/include",
64    "//foundation/multimedia/audio_framework/frameworks/native/audioutils/include",
65    "//foundation/multimedia/audio_framework/frameworks/native/hdiadapter/sink/common",
66    "//commonlibrary/c_utils/base/include",
67    "//drivers/peripheral/audio/interfaces/include",
68  ]
69
70  deps = [
71    "//foundation/multimedia/audio_framework/frameworks/native/audioutils:audio_utils",
72    "//third_party/bounds_checking_function:libsec_shared",
73  ]
74
75  deps += [ multimedia_audio_framework_hdi_audio_client ]
76
77  external_deps = [
78    "c_utils:utils",
79    "hiviewdfx_hilog_native:libhilog",
80  ]
81
82  part_name = "multimedia_audio_framework"
83  subsystem_name = "multimedia"
84}
85
86ohos_shared_library("bluetooth_renderer_sink") {
87  sanitize = {
88    cfi = true
89    debug = false
90    blocklist = "//foundation/multimedia/audio_framework/cfi_blocklist.txt"
91  }
92  install_enable = true
93
94  sources = [ "bluetooth/bluetooth_renderer_sink.cpp" ]
95
96  cflags = [ "-fPIC" ]
97  cflags += [ "-Wall" ]
98
99  cflags_cc = cflags
100
101  include_dirs = [
102    "//foundation/multimedia/audio_framework/interfaces/inner_api/native/audiocommon/include",
103    "//foundation/multimedia/audio_framework/frameworks/native/audioutils/include",
104    "//foundation/multimedia/audio_framework/frameworks/native/hdiadapter/sink/common",
105    "//drivers/peripheral/bluetooth/audio/interfaces/include",
106    "//drivers/peripheral/bluetooth/audio/hal/hdi_binder/proxy/include",
107  ]
108
109  deps = [
110    "$hdf_uhdf_path/hdi:libhdi",
111    "//foundation/multimedia/audio_framework/frameworks/native/audioutils:audio_utils",
112    "//third_party/bounds_checking_function:libsec_shared",
113  ]
114
115  external_deps = [
116    "hiviewdfx_hilog_native:libhilog",
117    "power_manager:powermgr_client",
118  ]
119
120  part_name = "multimedia_audio_framework"
121  subsystem_name = "multimedia"
122}
123
124ohos_shared_library("remote_audio_renderer_sink") {
125  sanitize = {
126    cfi = true
127    debug = false
128    blocklist = "//foundation/multimedia/audio_framework/cfi_blocklist.txt"
129  }
130  install_enable = true
131
132  sources = [ "remote/remote_audio_renderer_sink.cpp" ]
133
134  cflags = [ "-fPIC" ]
135  cflags += [ "-Wall" ]
136  cflags_cc = cflags
137  if ("${product_name}" == "m40") {
138    cflags += [ "-DPRODUCT_M40" ]
139  }
140
141  include_dirs = [
142    "//foundation/multimedia/audio_framework/interfaces/inner_api/native/audiocommon/include",
143    "//foundation/multimedia/audio_framework/frameworks/native/audioutils/include",
144    "//foundation/multimedia/audio_framework/frameworks/native/hdiadapter/sink/common",
145    "//drivers/peripheral/audio/interfaces/include",
146  ]
147
148  deps = [
149    "//foundation/multimedia/audio_framework/frameworks/native/audioutils:audio_utils",
150    "//third_party/bounds_checking_function:libsec_shared",
151  ]
152
153  if ("${product_name}" == "m40") {
154    deps += [ "//foundation/distributedhardware/distributed_audio/hdf_service/distributed_audio/audio_client:daudio_client" ]
155  } else {
156    deps +=
157        [ "//drivers/peripheral/audio/hal/hdi_binder/proxy:hdi_audio_client" ]
158  }
159
160  external_deps = [ "hiviewdfx_hilog_native:libhilog" ]
161
162  part_name = "multimedia_audio_framework"
163  subsystem_name = "multimedia"
164}
165
166ohos_shared_library("audio_renderer_file_sink") {
167  sanitize = {
168    cfi = true
169    debug = false
170    blocklist = "//foundation/multimedia/audio_framework/cfi_blocklist.txt"
171  }
172  install_enable = true
173
174  sources = [ "file/audio_renderer_file_sink.cpp" ]
175
176  cflags = [ "-fPIC" ]
177  cflags += [ "-Wall" ]
178
179  cflags_cc = cflags
180
181  include_dirs = [ "//foundation/multimedia/audio_framework/interfaces/inner_api/native/audiocommon/include" ]
182
183  external_deps = [ "hiviewdfx_hilog_native:libhilog" ]
184
185  part_name = "multimedia_audio_framework"
186  subsystem_name = "multimedia"
187}
188
189ohos_shared_library("renderer_sink_adapter") {
190  sanitize = {
191    cfi = true
192    debug = false
193    blocklist = "//foundation/multimedia/audio_framework/cfi_blocklist.txt"
194  }
195  install_enable = true
196
197  sources = [ "common/renderer_sink_adapter.c" ]
198
199  cflags = [ "-fPIC" ]
200  cflags += [ "-Wall" ]
201
202  cflags_cc = cflags
203
204  include_dirs = [
205    "common",
206    "primary",
207    "file",
208    "bluetooth",
209    "remote",
210    "//foundation/multimedia/audio_framework/interfaces/inner_api/native/audiocommon/include",
211    "//drivers/peripheral/audio/interfaces/include",
212  ]
213
214  deps = [
215    ":audio_renderer_file_sink",
216    ":audio_renderer_sink",
217    ":bluetooth_renderer_sink",
218    ":fast_audio_renderer_sink",
219    ":remote_audio_renderer_sink",
220  ]
221
222  external_deps = [ "hiviewdfx_hilog_native:libhilog" ]
223
224  part_name = "multimedia_audio_framework"
225  subsystem_name = "multimedia"
226}
227