1# Copyright (c) 2021-2022 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("../../../../../config.gni") 16import("../../../../../ressche_part.gni") 17 18config("hdi_config") { 19 visibility = [ ":*" ] 20 21 include_dirs = [ 22 ".", 23 "../../../audioschedule/include", 24 "../../../hdiadapter/common/include", 25 "../../../hdiadapter/manager/include", 26 "../../../hdiadapter/sink/bluetooth", 27 "../../../hdiadapter/sink/common", 28 "../../../hdiadapter/sink/file", 29 "../../../hdiadapter/sink/primary", 30 "../../../hdiadapter/sink/remote", 31 "../../../hdiadapter/sink/offload", 32 "../../../hdiadapter/source/common", 33 "../../../hdiadapter/source/file", 34 "../../../hdiadapter/source/primary", 35 "../../../hdiadapter/source/remote", 36 "../../../hdiadapter/source/multichannel", 37 "../../../audioeffect/include", 38 "../../../playbackcapturer/include", 39 "../../../../../interfaces/inner_api/native/audiocommon/include", 40 "../../../../../services/audio_service/common/include", 41 ] 42 43 cflags = [ 44 "-Wall", 45 "-Werror", 46 "-DHAVE_CONFIG_H", 47 "-D_GNU_SOURCE", 48 "-D__INCLUDED_FROM_PULSE_AUDIO", 49 ] 50} 51 52ohos_shared_library("module-hdi-sink") { 53 sanitize = { 54 cfi = true 55 cfi_cross_dso = true 56 cfi_vcall_icall_only = true 57 debug = false 58 } 59 sources = [ 60 "hdi_sink.c", 61 "module_hdi_sink.c", 62 ] 63 64 configs = [ ":hdi_config" ] 65 66 cflags = [ "-DPA_MODULE_NAME=libmodule_hdi_sink_z_so" ] 67 68 ldflags = [ 69 "-Wl", 70 "--no-undefined", 71 ] 72 73 deps = [ 74 "../../../../../services/audio_service:audio_common", 75 "../../../audioeffect:audio_effect", 76 "../../../audioschedule:audio_schedule", 77 "../../../audioutils:audio_utils", 78 "../../../hdiadapter/sink:renderer_sink_adapter", 79 "../../../playbackcapturer:playback_capturer", 80 ] 81 82 external_deps = [ 83 "bounds_checking_function:libsec_shared", 84 "c_utils:utils", 85 "drivers_interface_audio:libaudio_proxy_4.0", 86 "hilog:libhilog", 87 "pulseaudio:pulse", 88 "pulseaudio:pulsecommon", 89 "pulseaudio:pulsecore", 90 ] 91 if (ressche_enable == true) { 92 external_deps += [ "resource_schedule_service:ressched_client" ] 93 } 94 95 subsystem_name = "multimedia" 96 part_name = "audio_framework" 97} 98 99ohos_shared_library("module-hdi-source") { 100 sanitize = { 101 cfi = true 102 cfi_cross_dso = true 103 cfi_vcall_icall_only = true 104 debug = false 105 } 106 sources = [ 107 "hdi_source.c", 108 "module_hdi_source.c", 109 ] 110 111 configs = [ ":hdi_config" ] 112 113 cflags = [ "-DPA_MODULE_NAME=libmodule_hdi_source_z_so" ] 114 115 deps = [ 116 "../../../audioeffect:audio_effect", 117 "../../../audioschedule:audio_schedule", 118 "../../../audioutils:audio_utils", 119 "../../../hdiadapter/manager:hdiadapter_manager", 120 "../../../hdiadapter/source:capturer_source_adapter", 121 ] 122 123 external_deps = [ 124 "bounds_checking_function:libsec_shared", 125 "drivers_interface_audio:libaudio_proxy_4.0", 126 "hdf_core:libhdf_utils", 127 "hilog:libhilog", 128 "pulseaudio:pulse", 129 "pulseaudio:pulsecommon", 130 "pulseaudio:pulsecore", 131 ] 132 133 subsystem_name = "multimedia" 134 part_name = "audio_framework" 135} 136 137ohos_shared_library("module-split-stream-sink") { 138 sanitize = { 139 cfi = true 140 cfi_cross_dso = true 141 cfi_vcall_icall_only = true 142 debug = false 143 } 144 sources = [ "module_split_stream_sink.c" ] 145 146 configs = [ ":hdi_config" ] 147 148 cflags = [ "-DPA_MODULE_NAME=libmodule_split_stream_sink_z_so" ] 149 150 ldflags = [ 151 "-Wl", 152 "--no-undefined", 153 ] 154 155 deps = [ 156 "../../../../../services/audio_service:audio_common", 157 "../../../audioschedule:audio_schedule", 158 "../../../audioutils:audio_utils", 159 "../../../hdiadapter/sink:renderer_sink_adapter", 160 ] 161 162 external_deps = [ 163 "bounds_checking_function:libsec_shared", 164 "c_utils:utils", 165 "hilog:libhilog", 166 "pulseaudio:pulse", 167 "pulseaudio:pulsecommon", 168 "pulseaudio:pulsecore", 169 ] 170 171 if (ressche_enable == true) { 172 external_deps += [ "resource_schedule_service:ressched_client" ] 173 } 174 175 subsystem_name = "multimedia" 176 part_name = "audio_framework" 177} 178