• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 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}/audioctrltransport/include",
39    "${audio_transport_path}/receiverengine/include",
40    "${audio_transport_path}/senderengine/include",
41    "${common_path}/dfx_utils/include",
42    "${common_path}/include",
43    "${innerkits_path}/native_cpp/audio_sink/include",
44    "${innerkits_path}/native_cpp/audio_source/include",
45    "${services_path}/audiomanager/managersink/include",
46    "${services_path}/common/audioeventcallback",
47    "${services_path}/common/audiodata/include",
48    "${services_path}/common/audioparam",
49  ]
50
51  sources = [
52    "${audio_client_path}/micclient/src/dmic_client.cpp",
53    "${audio_client_path}/spkclient/src/dspeaker_client.cpp",
54    "${audio_control_path}/controlsink/src/daudio_sink_dev_ctrl_manager.cpp",
55    "${audio_transport_path}/audioctrltransport/src/daudio_ctrl_channel_listener.cpp",
56    "${audio_transport_path}/audioctrltransport/src/daudio_sink_ctrl_trans.cpp",
57    "${innerkits_path}/native_cpp/audio_sink/src/daudio_sink_handler.cpp",
58    "${innerkits_path}/native_cpp/audio_sink/src/daudio_sink_load_callback.cpp",
59    "${innerkits_path}/native_cpp/audio_sink/src/daudio_sink_proxy.cpp",
60    "${innerkits_path}/native_cpp/audio_source/src/daudio_source_proxy.cpp",
61    "${services_path}/audiomanager/managersink/src/daudio_sink_dev.cpp",
62    "${services_path}/audiomanager/managersink/src/daudio_sink_manager.cpp",
63    "src/daudio_sink_hidumper.cpp",
64    "src/daudio_sink_ipc_callback_proxy.cpp",
65    "src/daudio_sink_service.cpp",
66    "src/daudio_sink_stub.cpp",
67  ]
68
69  ldflags = [
70    "-fpie",
71    "-Wl,-z,relro",
72    "-Wl,-z,now",
73  ]
74
75  deps = [
76    "${audio_transport_path}/receiverengine:distributed_audio_decode_transport",
77    "${audio_transport_path}/senderengine:distributed_audio_encode_transport",
78    "${innerkits_path}/native_cpp/audio_sink:distributed_audio_sink_sdk",
79    "${services_path}/common:distributed_audio_utils",
80  ]
81
82  external_deps = [
83    "access_token:libaccesstoken_sdk",
84    "access_token:libtokenid_sdk",
85    "audio_framework:audio_capturer",
86    "audio_framework:audio_client",
87    "audio_framework:audio_renderer",
88    "cJSON:cjson",
89    "c_utils:utils",
90    "device_manager:devicemanagersdk",
91    "distributed_hardware_fwk:distributed_av_receiver",
92    "distributed_hardware_fwk:distributed_av_sender",
93    "distributed_hardware_fwk:distributedhardwareutils",
94    "distributed_hardware_fwk:libdhfwk_sdk",
95    "dsoftbus:softbus_client",
96    "eventhandler:libeventhandler",
97    "hdf_core:libhdf_ipc_adapter",
98    "hdf_core:libhdi",
99    "hilog:libhilog",
100    "hisysevent:libhisysevent",
101    "hitrace:hitrace_meter",
102    "ipc:ipc_core",
103    "safwk:system_ability_fwk",
104    "samgr:samgr_proxy",
105  ]
106
107  defines = [
108    "HI_LOG_ENABLE",
109    "LOG_DOMAIN=0xD004130",
110  ]
111
112  if (device_security_level_control) {
113    external_deps += [ "device_security_level:dslm_sdk" ]
114    defines += [ "DEVICE_SECURITY_LEVEL_ENABLE" ]
115  }
116
117  subsystem_name = "distributedhardware"
118
119  part_name = "distributed_audio"
120}
121