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 include_dirs = [ 20 "//third_party/json/include", 21 "${fwk_common_path}/utils/include", 22 ] 23 24 include_dirs += [ 25 "include", 26 "${audio_client_path}/interface", 27 "${audio_client_path}/micclient/include", 28 "${audio_client_path}/spkclient/include", 29 "${audio_control_path}/controlsink/include", 30 "${audio_processor_path}/encodeprocessor/include", 31 "${audio_processor_path}/decodeprocessor/include", 32 "${audio_processor_path}/interface", 33 "${audio_transport_path}/audiochannel/audiodatachannel/include", 34 "${audio_transport_path}/audiochannel/interface", 35 "${audio_transport_path}/audioctrltransport/include", 36 "${audio_transport_path}/audioctrltransport/interface", 37 "${audio_transport_path}/audiotransportstatus/include", 38 "${audio_transport_path}/audiotransportstatus/interface", 39 "${audio_transport_path}/decodetransport/include", 40 "${audio_transport_path}/encodetransport/include", 41 "${audio_transport_path}/interface", 42 "${audio_transport_path}/receiverengine/include", 43 "${audio_transport_path}/senderengine/include", 44 "${common_path}/dfx_utils/include", 45 "${common_path}/include", 46 "${innerkits_path}/native_cpp/audio_sink/include", 47 "${innerkits_path}/native_cpp/audio_source/include", 48 "${services_path}/audiomanager/managersink/include", 49 "${services_path}/common/audioeventcallback", 50 "${services_path}/common/audiodata/include", 51 "${services_path}/common/audioparam", 52 "${services_path}/common/taskProcessor/include", 53 "${softbusadapter_path}/include", 54 ] 55 56 if (distributed_audio_extension) { 57 include_dirs += [ 58 "${distributedaudio_ext_path}/services/audioclient/directmicclient/include", 59 "${distributedaudio_ext_path}/services/audioclient/directspkclient/include", 60 ] 61 } 62 63 sources = [ 64 "${audio_client_path}/micclient/src/dmic_client.cpp", 65 "${audio_client_path}/spkclient/src/dspeaker_client.cpp", 66 "${audio_control_path}/controlsink/src/daudio_sink_dev_ctrl_manager.cpp", 67 "${innerkits_path}/native_cpp/audio_sink/src/daudio_sink_handler.cpp", 68 "${innerkits_path}/native_cpp/audio_sink/src/daudio_sink_load_callback.cpp", 69 "${innerkits_path}/native_cpp/audio_sink/src/daudio_sink_proxy.cpp", 70 "${innerkits_path}/native_cpp/audio_source/src/daudio_source_proxy.cpp", 71 "${services_path}/audiomanager/managersink/src/daudio_sink_dev.cpp", 72 "${services_path}/audiomanager/managersink/src/daudio_sink_manager.cpp", 73 "src/daudio_sink_service.cpp", 74 "src/daudio_sink_stub.cpp", 75 ] 76 77 if (distributed_audio_extension) { 78 sources += [ 79 "${distributedaudio_ext_path}/services/audioclient/directmicclient/src/direct_dmic_client.cpp", 80 "${distributedaudio_ext_path}/services/audioclient/directspkclient/src/direct_dspeaker_client.cpp", 81 ] 82 } 83 84 deps = [ 85 "${audio_transport_path}/audioctrltransport:distributed_audio_control", 86 "${audio_transport_path}/decodetransport:distributed_audio_decode_transport", 87 "${audio_transport_path}/encodetransport:distributed_audio_encode_transport", 88 "${services_path}/common:distributed_audio_utils", 89 ] 90 91 external_deps = [ 92 "audio_framework:audio_capturer", 93 "audio_framework:audio_client", 94 "audio_framework:audio_renderer", 95 "c_utils:utils", 96 "distributed_hardware_fwk:distributed_av_receiver", 97 "distributed_hardware_fwk:distributed_av_sender", 98 "distributed_hardware_fwk:libdhfwk_sdk", 99 "drivers_interface_audio:libaudio_proxy_1.0", 100 "dsoftbus:softbus_client", 101 "eventhandler:libeventhandler", 102 "hdf_core:libhdf_ipc_adapter", 103 "hdf_core:libhdi", 104 "hisysevent:libhisysevent", 105 "hitrace:hitrace_meter", 106 "ipc:ipc_core", 107 "safwk:system_ability_fwk", 108 "samgr:samgr_proxy", 109 ] 110 111 if (distributed_audio_extension) { 112 cflags = [ "-DDAUDIO_SUPPORT_DIRECT" ] 113 } 114 115 defines = [ 116 "HI_LOG_ENABLE", 117 "LOG_DOMAIN=0xD004100", 118 ] 119 120 subsystem_name = "distributedhardware" 121 122 part_name = "distributed_audio" 123} 124