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