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_renderer_sink") { 18 branch_protector_ret = "pac_ret" 19 sanitize = { 20 cfi = true 21 cfi_cross_dso = true 22 cfi_vcall_icall_only = true 23 debug = false 24 } 25 install_enable = true 26 27 sources = [ "primary/audio_renderer_sink.cpp" ] 28 29 cflags = [ "-fPIC" ] 30 cflags += [ "-Wall" ] 31 cflags_cc = cflags 32 33 include_dirs = [ 34 "common", 35 "../common/include", 36 "../../audioutils/include", 37 "../../../../interfaces/inner_api/native/audiocommon/include", 38 "../../../../services/audio_service/common/include/", 39 ] 40 41 deps = [ 42 "../../../../services/audio_service:audio_common", 43 "../../audioutils:audio_utils", 44 ] 45 46 external_deps = [ 47 "c_utils:utils", 48 "drivers_interface_audio:libaudio_proxy_4.0", 49 "hdf_core:libhdf_ipc_adapter", 50 "hilog:libhilog", 51 "init:libbegetutil", 52 "media_foundation:media_monitor_client", 53 ] 54 defines = [] 55 if (audio_framework_feature_power_manager) { 56 external_deps += [ "power_manager:powermgr_client" ] 57 defines += [ "FEATURE_POWER_MANAGER" ] 58 } 59 60 part_name = "audio_framework" 61 subsystem_name = "multimedia" 62} 63 64ohos_shared_library("fast_audio_renderer_sink") { 65 branch_protector_ret = "pac_ret" 66 sanitize = { 67 cfi = true 68 cfi_cross_dso = true 69 cfi_vcall_icall_only = true 70 debug = false 71 } 72 install_enable = true 73 74 sources = [ "fast/fast_audio_renderer_sink.cpp" ] 75 76 include_dirs = [ 77 "common", 78 "../common/include", 79 "../../audioutils/include", 80 "../../../../interfaces/inner_api/native/audiocommon/include", 81 ] 82 83 deps = [ "../../audioutils:audio_utils" ] 84 85 external_deps = [ 86 "bounds_checking_function:libsec_shared", 87 "c_utils:utils", 88 "drivers_interface_audio:libaudio_proxy_4.0", 89 "hilog:libhilog", 90 ] 91 defines = [] 92 if (audio_framework_feature_power_manager) { 93 external_deps += [ "power_manager:powermgr_client" ] 94 defines += [ "FEATURE_POWER_MANAGER" ] 95 } 96 97 part_name = "audio_framework" 98 subsystem_name = "multimedia" 99} 100 101ohos_shared_library("bluetooth_renderer_sink") { 102 branch_protector_ret = "pac_ret" 103 sanitize = { 104 cfi = true 105 cfi_cross_dso = true 106 cfi_vcall_icall_only = true 107 debug = false 108 } 109 install_enable = true 110 111 sources = [ "bluetooth/bluetooth_renderer_sink.cpp" ] 112 113 cflags = [ "-fPIC" ] 114 cflags += [ "-Wall" ] 115 116 cflags_cc = cflags 117 118 include_dirs = [ 119 "common", 120 "../common/include", 121 "../../audioutils/include", 122 "../../../../interfaces/inner_api/native/audiocommon/include", 123 "../../../../services/audio_service/common/include/", 124 ] 125 126 deps = [ 127 "../../../../services/audio_service:audio_common", 128 "../../audioutils:audio_utils", 129 ] 130 131 external_deps = [ 132 "bounds_checking_function:libsec_shared", 133 "drivers_peripheral_bluetooth:hdi_audio_bluetooth_header", 134 "hdf_core:libhdf_ipc_adapter", 135 "hdf_core:libhdi", 136 "hdf_core:libpub_utils", 137 "hilog:libhilog", 138 "init:libbegetutil", 139 "media_foundation:media_monitor_client", 140 ] 141 defines = [] 142 if (audio_framework_feature_power_manager) { 143 external_deps += [ "power_manager:powermgr_client" ] 144 defines += [ "FEATURE_POWER_MANAGER" ] 145 } 146 147 if (use_libfuzzer || use_clang_coverage) { 148 defines += [ "TEST_COVERAGE" ] 149 } 150 151 part_name = "audio_framework" 152 subsystem_name = "multimedia" 153} 154 155ohos_shared_library("remote_audio_renderer_sink") { 156 branch_protector_ret = "pac_ret" 157 sanitize = { 158 cfi = true 159 cfi_cross_dso = true 160 cfi_vcall_icall_only = true 161 debug = false 162 } 163 install_enable = true 164 165 sources = [ "remote/remote_audio_renderer_sink.cpp" ] 166 167 cflags = [ "-fPIC" ] 168 cflags += [ "-Wall" ] 169 cflags_cc = cflags 170 171 include_dirs = [ 172 "common", 173 "../common/include", 174 "../devicemanager/interface", 175 "../../audioutils/include", 176 "../../../../interfaces/inner_api/native/audiocommon/include", 177 "../../../../services/audio_service/common/include/", 178 ] 179 180 deps = [ 181 "../../../../services/audio_service:audio_common", 182 "../../audioutils:audio_utils", 183 "../devicemanager:audio_device_manager", 184 ] 185 186 external_deps = [ 187 "bounds_checking_function:libsec_shared", 188 "c_utils:utils", 189 "drivers_interface_distributed_audio:libdaudio_proxy_1.0", 190 "hilog:libhilog", 191 ] 192 defines = [] 193 if (audio_framework_feature_daudio_enable) { 194 defines += [ "FEATURE_DISTRIBUTE_AUDIO" ] 195 } 196 197 part_name = "audio_framework" 198 subsystem_name = "multimedia" 199} 200 201ohos_shared_library("remote_fast_audio_renderer_sink") { 202 branch_protector_ret = "pac_ret" 203 sanitize = { 204 cfi = true 205 cfi_cross_dso = true 206 cfi_vcall_icall_only = true 207 debug = false 208 } 209 install_enable = true 210 211 sources = [ "remote_fast/remote_fast_audio_renderer_sink.cpp" ] 212 213 cflags = [ "-fPIC" ] 214 cflags += [ "-Wall" ] 215 cflags_cc = cflags 216 217 include_dirs = [ 218 "common", 219 "fast", 220 "remote_fast", 221 "../common/include", 222 "../devicemanager/interface", 223 "../../audioutils/include", 224 "../../../../interfaces/inner_api/native/audiocommon/include", 225 ] 226 227 deps = [ 228 "../../audioutils:audio_utils", 229 "../devicemanager:audio_device_manager", 230 ] 231 232 external_deps = [ 233 "bounds_checking_function:libsec_shared", 234 "c_utils:utils", 235 "drivers_interface_distributed_audio:libdaudio_proxy_1.0", 236 "hilog:libhilog", 237 ] 238 defines = [] 239 if (audio_framework_feature_daudio_enable) { 240 defines += [ "FEATURE_DISTRIBUTE_AUDIO" ] 241 } 242 243 part_name = "audio_framework" 244 subsystem_name = "multimedia" 245} 246 247ohos_shared_library("audio_renderer_file_sink") { 248 branch_protector_ret = "pac_ret" 249 sanitize = { 250 cfi = true 251 cfi_cross_dso = true 252 cfi_vcall_icall_only = true 253 debug = false 254 } 255 install_enable = true 256 257 sources = [ "file/audio_renderer_file_sink.cpp" ] 258 259 cflags = [ "-fPIC" ] 260 cflags += [ "-Wall" ] 261 262 cflags_cc = cflags 263 264 include_dirs = [ 265 "common", 266 "../common/include", 267 "../../../../interfaces/inner_api/native/audiocommon/include", 268 ] 269 270 external_deps = [ "hilog:libhilog" ] 271 272 part_name = "audio_framework" 273 subsystem_name = "multimedia" 274} 275 276ohos_shared_library("offload_audio_renderer_sink") { 277 branch_protector_ret = "pac_ret" 278 sanitize = { 279 cfi = true 280 cfi_cross_dso = true 281 cfi_vcall_icall_only = true 282 debug = false 283 } 284 install_enable = true 285 286 sources = [ "offload/offload_audio_renderer_sink.cpp" ] 287 288 cflags = [ "-fPIC" ] 289 cflags += [ "-Wall" ] 290 291 cflags_cc = cflags 292 293 include_dirs = [ 294 "common", 295 "../common/include", 296 "../../audioutils/include", 297 "../../../../interfaces/inner_api/native/audiocommon/include", 298 "../../../../services/audio_service/common/include/", 299 ] 300 301 deps = [ 302 "../../../../services/audio_service:audio_common", 303 "../../audioutils:audio_utils", 304 ] 305 306 external_deps = [ 307 "drivers_interface_audio:libaudio_proxy_4.0", 308 "hilog:libhilog", 309 "media_foundation:media_monitor_client", 310 ] 311 312 defines = [] 313 if (audio_framework_feature_power_manager) { 314 external_deps += [ "power_manager:powermgr_client" ] 315 defines += [ "FEATURE_POWER_MANAGER" ] 316 } 317 318 part_name = "audio_framework" 319 subsystem_name = "multimedia" 320} 321 322ohos_shared_library("multichannel_audio_renderer_sink") { 323 branch_protector_ret = "pac_ret" 324 sanitize = { 325 cfi = true 326 cfi_cross_dso = true 327 cfi_vcall_icall_only = true 328 debug = false 329 } 330 install_enable = true 331 332 sources = [ "multichannel/multichannel_audio_renderer_sink.cpp" ] 333 334 cflags = [ "-fPIC" ] 335 cflags += [ "-Wall" ] 336 cflags_cc = cflags 337 338 include_dirs = [ 339 "common", 340 "../common/include", 341 "../../audioutils/include", 342 "../../../../interfaces/inner_api/native/audiocommon/include", 343 "../../../../services/audio_service/common/include/", 344 ] 345 346 deps = [ 347 "../../../../services/audio_service:audio_common", 348 "../../audioutils:audio_utils", 349 ] 350 351 external_deps = [ 352 "c_utils:utils", 353 "drivers_interface_audio:libaudio_proxy_4.0", 354 "hilog:libhilog", 355 "init:libbegetutil", 356 ] 357 defines = [] 358 if (audio_framework_feature_power_manager) { 359 external_deps += [ "power_manager:powermgr_client" ] 360 defines += [ "FEATURE_POWER_MANAGER" ] 361 } 362 363 part_name = "audio_framework" 364 subsystem_name = "multimedia" 365} 366 367ohos_shared_library("renderer_sink_adapter") { 368 branch_protector_ret = "pac_ret" 369 sanitize = { 370 cfi = true 371 cfi_cross_dso = true 372 cfi_vcall_icall_only = true 373 debug = false 374 } 375 install_enable = true 376 377 sources = [ 378 "common/i_audio_renderer_sink.cpp", 379 "common/renderer_sink_adapter.c", 380 ] 381 382 cflags = [ "-fPIC" ] 383 cflags += [ "-Wall" ] 384 385 include_dirs = [ 386 "common", 387 "primary", 388 "file", 389 "bluetooth", 390 "remote", 391 "offload", 392 "multichannel", 393 "../common/include", 394 "../devicemanager/interface", 395 "../../../../interfaces/inner_api/native/audiocommon/include", 396 ] 397 398 deps = [ 399 ":audio_renderer_file_sink", 400 ":audio_renderer_sink", 401 ":bluetooth_renderer_sink", 402 ":fast_audio_renderer_sink", 403 ":multichannel_audio_renderer_sink", 404 ":offload_audio_renderer_sink", 405 ] 406 407 if (audio_framework_feature_daudio_enable == true) { 408 deps += [ 409 ":remote_audio_renderer_sink", 410 ":remote_fast_audio_renderer_sink", 411 ] 412 cflags += [ "-DDAUDIO_ENABLE" ] 413 } 414 415 cflags_cc = cflags 416 417 external_deps = [ "hilog:libhilog" ] 418 419 part_name = "audio_framework" 420 subsystem_name = "multimedia" 421} 422