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_source") { 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 "${driver_audio_path}/include", 33 "${fwk_common_path}/utils/include", 34 "${mediastandardfwk_path}/audiocapturer/include", 35 "${mediastandardfwk_path}/audiocommon/include", 36 "${mediastandardfwk_path}/audiomanager/include", 37 ] 38 39 include_dirs += [ 40 "include", 41 "${audio_client_path}/micclient/include", 42 "${audio_client_path}/spkclient/include", 43 "${audio_control_path}/controlsource/include", 44 "${audio_hdi_proxy_path}/include", 45 "${audio_processor_path}/interface", 46 "${audio_transport_path}/interface", 47 "${audio_transport_path}/receiverengine/include", 48 "${audio_transport_path}/senderengine/include", 49 "${common_path}/dfx_utils/include", 50 "${common_path}/include", 51 "${distributedaudio_path}/audiohandler/include", 52 "${hdf_service_path}/hdi_service/common/include", 53 "${innerkits_path}/native_cpp/audio_sink/include", 54 "${innerkits_path}/native_cpp/audio_source/include", 55 "${interfaces_path}/inner_kits/native_cpp/audio_sink/include", 56 "${interfaces_path}/inner_kits/native_cpp/audio_source/include", 57 "${services_path}/audiomanager/managersource/include", 58 "${services_path}/common/audiodata/include", 59 "${services_path}/common/audioeventcallback", 60 "${services_path}/common/audioparam", 61 "${services_path}/hdfaudioclient/include", 62 "${services_path}/audiomanager/common/include", 63 ] 64 65 sources = [ 66 "${audio_control_path}/controlsource/src/daudio_source_dev_ctrl_manager.cpp", 67 "${audio_hdi_proxy_path}/src/daudio_hdf_operate.cpp", 68 "${audio_hdi_proxy_path}/src/daudio_hdi_handler.cpp", 69 "${audio_hdi_proxy_path}/src/daudio_manager_callback.cpp", 70 "${common_path}/dfx_utils/src/daudio_hidumper.cpp", 71 "${interfaces_path}/inner_kits/native_cpp/audio_sink/src/daudio_sink_proxy.cpp", 72 "${interfaces_path}/inner_kits/native_cpp/audio_source/src/daudio_source_proxy.cpp", 73 "${services_path}/audiomanager/managersource/src/daudio_source_dev.cpp", 74 "${services_path}/audiomanager/managersource/src/daudio_source_manager.cpp", 75 "${services_path}/audiomanager/managersource/src/daudio_source_mgr_callback.cpp", 76 "${services_path}/audiomanager/managersource/src/dmic_dev.cpp", 77 "${services_path}/audiomanager/managersource/src/dspeaker_dev.cpp", 78 "src/daudio_ipc_callback_proxy.cpp", 79 "src/daudio_source_service.cpp", 80 "src/daudio_source_stub.cpp", 81 ] 82 83 deps = [ 84 "${audio_transport_path}/receiverengine:distributed_audio_decode_transport", 85 "${audio_transport_path}/senderengine:distributed_audio_encode_transport", 86 "${distributedaudio_path}/audiohandler:distributed_audio_handler", 87 "${services_path}/common:distributed_audio_utils", 88 "${services_path}/hdfaudioclient:daudio_client", 89 "//third_party/cJSON:cjson", 90 ] 91 92 external_deps = [ 93 "access_token:libaccesstoken_sdk", 94 "access_token:libtokenid_sdk", 95 "c_utils:utils", 96 "distributed_hardware_fwk:distributed_av_receiver", 97 "distributed_hardware_fwk:distributed_av_sender", 98 "drivers_interface_distributed_audio:libdaudioext_proxy_1.0", 99 "dsoftbus:softbus_client", 100 "eventhandler:libeventhandler", 101 "hdf_core:libhdi", 102 "hicollie:libhicollie", 103 "hisysevent:libhisysevent", 104 "hitrace:hitrace_meter", 105 "ipc:ipc_core", 106 "ipc:ipc_single", 107 "safwk:system_ability_fwk", 108 "samgr:samgr_proxy", 109 ] 110 111 defines = [ 112 "HI_LOG_ENABLE", 113 "LOG_DOMAIN=0xD004130", 114 ] 115 116 if (build_variant == "root") { 117 defines += [ 118 "DUMP_DSPEAKERDEV_FILE", 119 "DUMP_DMICDEV_FILE", 120 ] 121 } 122 123 subsystem_name = "distributedhardware" 124 125 part_name = "distributed_audio" 126} 127