1# Copyright (c) 2022-2024 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("//build/ohos_var.gni")
16import("../../../distributedaudio.gni")
17
18ohos_shared_library("distributed_audio_sink") {
19  branch_protector_ret = "pac_ret"
20  sanitize = {
21    boundary_sanitize = true
22    cfi = true
23    cfi_cross_dso = true
24    debug = false
25    integer_overflow = true
26    ubsan = true
27  }
28  stack_protector_ret = true
29
30  include_dirs = [
31    "include",
32    "${audio_client_path}/interface",
33    "${audio_client_path}/micclient/include",
34    "${audio_client_path}/spkclient/include",
35    "${audio_control_path}/controlsink/include",
36    "${audio_processor_path}/interface",
37    "${audio_transport_path}/interface",
38    "${audio_transport_path}/receiverengine/include",
39    "${audio_transport_path}/senderengine/include",
40    "${common_path}/dfx_utils/include",
41    "${common_path}/include",
42    "${innerkits_path}/native_cpp/audio_sink/include",
43    "${innerkits_path}/native_cpp/audio_source/include",
44    "${services_path}/audiomanager/managersink/include",
45    "${services_path}/common/audioeventcallback",
46    "${services_path}/common/audiodata/include",
47    "${services_path}/common/audioparam",
48  ]
49
50  sources = [
51    "${audio_client_path}/micclient/src/dmic_client.cpp",
52    "${audio_client_path}/spkclient/src/dspeaker_client.cpp",
53    "${audio_control_path}/controlsink/src/daudio_sink_dev_ctrl_manager.cpp",
54    "${innerkits_path}/native_cpp/audio_sink/src/daudio_sink_handler.cpp",
55    "${innerkits_path}/native_cpp/audio_sink/src/daudio_sink_load_callback.cpp",
56    "${innerkits_path}/native_cpp/audio_sink/src/daudio_sink_proxy.cpp",
57    "${innerkits_path}/native_cpp/audio_source/src/daudio_source_proxy.cpp",
58    "${services_path}/audiomanager/managersink/src/daudio_sink_dev.cpp",
59    "${services_path}/audiomanager/managersink/src/daudio_sink_manager.cpp",
60    "src/daudio_sink_hidumper.cpp",
61    "src/daudio_sink_ipc_callback_proxy.cpp",
62    "src/daudio_sink_service.cpp",
63    "src/daudio_sink_stub.cpp",
64  ]
65
66  deps = [
67    "${audio_transport_path}/receiverengine:distributed_audio_decode_transport",
68    "${audio_transport_path}/senderengine:distributed_audio_encode_transport",
69    "${innerkits_path}/native_cpp/audio_sink:distributed_audio_sink_sdk",
70    "${services_path}/common:distributed_audio_utils",
71  ]
72
73  external_deps = [
74    "access_token:libaccesstoken_sdk",
75    "access_token:libtokenid_sdk",
76    "audio_framework:audio_capturer",
77    "audio_framework:audio_client",
78    "audio_framework:audio_renderer",
79    "cJSON:cjson",
80    "c_utils:utils",
81    "device_manager:devicemanagersdk",
82    "device_security_level:dslm_sdk",
83    "distributed_hardware_fwk:distributed_av_receiver",
84    "distributed_hardware_fwk:distributed_av_sender",
85    "distributed_hardware_fwk:distributedhardwareutils",
86    "distributed_hardware_fwk:libdhfwk_sdk",
87    "dsoftbus:softbus_client",
88    "eventhandler:libeventhandler",
89    "hdf_core:libhdf_ipc_adapter",
90    "hdf_core:libhdi",
91    "hilog:libhilog",
92    "hisysevent:libhisysevent",
93    "hitrace:hitrace_meter",
94    "ipc:ipc_core",
95    "safwk:system_ability_fwk",
96    "samgr:samgr_proxy",
97  ]
98
99  defines = [
100    "HI_LOG_ENABLE",
101    "LOG_DOMAIN=0xD004130",
102  ]
103
104  subsystem_name = "distributedhardware"
105
106  part_name = "distributed_audio"
107}
108