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/sink/bluetooth", 26 "../../../hdiadapter/sink/common", 27 "../../../hdiadapter/sink/file", 28 "../../../hdiadapter/sink/primary", 29 "../../../hdiadapter/sink/remote", 30 "../../../hdiadapter/sink/offload", 31 "../../../hdiadapter/source/common", 32 "../../../hdiadapter/source/file", 33 "../../../hdiadapter/source/primary", 34 "../../../hdiadapter/source/remote", 35 "../../../hdiadapter/source/multichannel", 36 "../../../audioeffect/include", 37 "../../../playbackcapturer/include", 38 "../../../../../interfaces/inner_api/native/audiocommon/include", 39 "../../../../../services/audio_service/common/include", 40 ] 41 42 include_dirs += [ multimedia_audio_framework_drivers ] 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 "hilog:libhilog", 86 "pulseaudio:pulse", 87 "pulseaudio:pulsecommon", 88 "pulseaudio:pulsecore", 89 ] 90 if (ressche_enable == true) { 91 external_deps += [ "resource_schedule_service:ressched_client" ] 92 } 93 94 subsystem_name = "multimedia" 95 part_name = "audio_framework" 96} 97 98ohos_shared_library("module-hdi-source") { 99 sanitize = { 100 cfi = true 101 cfi_cross_dso = true 102 cfi_vcall_icall_only = true 103 debug = false 104 } 105 sources = [ 106 "hdi_source.c", 107 "module_hdi_source.c", 108 ] 109 110 defines = [] 111 112 if (is_emulator) { 113 defines += [ "IS_EMULATOR" ] 114 } 115 116 configs = [ ":hdi_config" ] 117 118 cflags = [ "-DPA_MODULE_NAME=libmodule_hdi_source_z_so" ] 119 120 deps = [ 121 "../../../audioeffect:audio_effect", 122 "../../../audioschedule:audio_schedule", 123 "../../../audioutils:audio_utils", 124 "../../../hdiadapter/source:capturer_source_adapter", 125 ] 126 127 external_deps = [ 128 "bounds_checking_function:libsec_shared", 129 "hilog:libhilog", 130 "pulseaudio:pulse", 131 "pulseaudio:pulsecommon", 132 "pulseaudio:pulsecore", 133 ] 134 135 subsystem_name = "multimedia" 136 part_name = "audio_framework" 137} 138 139ohos_shared_library("module-split-stream-sink") { 140 sanitize = { 141 cfi = true 142 cfi_cross_dso = true 143 cfi_vcall_icall_only = true 144 debug = false 145 } 146 sources = [ "module_split_stream_sink.c" ] 147 148 configs = [ ":hdi_config" ] 149 150 cflags = [ "-DPA_MODULE_NAME=libmodule_split_stream_sink_z_so" ] 151 152 ldflags = [ 153 "-Wl", 154 "--no-undefined", 155 ] 156 157 deps = [ 158 "../../../../../services/audio_service:audio_common", 159 "../../../audioschedule:audio_schedule", 160 "../../../audioutils:audio_utils", 161 "../../../hdiadapter/sink:renderer_sink_adapter", 162 ] 163 164 external_deps = [ 165 "bounds_checking_function:libsec_shared", 166 "c_utils:utils", 167 "hilog:libhilog", 168 "pulseaudio:pulse", 169 "pulseaudio:pulsecommon", 170 "pulseaudio:pulsecore", 171 ] 172 173 if (ressche_enable == true) { 174 external_deps += [ "resource_schedule_service:ressched_client" ] 175 } 176 177 subsystem_name = "multimedia" 178 part_name = "audio_framework" 179} 180