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 18pulseaudio_dir = "//third_party/pulseaudio" 19pulseaudio_build_path = "//third_party/pulseaudio/ohosbuild" 20 21config("hdi_config") { 22 visibility = [ ":*" ] 23 24 include_dirs = [ 25 "$pulseaudio_dir/include", 26 "$pulseaudio_dir/src", 27 "$pulseaudio_dir", 28 "$pulseaudio_build_path/src", 29 "$pulseaudio_build_path/include", 30 "../../../audioschedule/include", 31 "../../../hdiadapter/common/include", 32 "../../../hdiadapter/sink/bluetooth", 33 "../../../hdiadapter/sink/common", 34 "../../../hdiadapter/sink/file", 35 "../../../hdiadapter/sink/primary", 36 "../../../hdiadapter/sink/remote", 37 "../../../hdiadapter/sink/offload", 38 "../../../hdiadapter/source/common", 39 "../../../hdiadapter/source/file", 40 "../../../hdiadapter/source/primary", 41 "../../../hdiadapter/source/remote", 42 "../../../hdiadapter/source/multichannel", 43 "../../../audioeffect/include", 44 "../../../playbackcapturer/include", 45 "../../../../../interfaces/inner_api/native/audiocommon/include", 46 ] 47 48 include_dirs += [ multimedia_audio_framework_drivers ] 49 50 cflags = [ 51 "-Wall", 52 "-Werror", 53 "-DHAVE_CONFIG_H", 54 "-D_GNU_SOURCE", 55 "-D__INCLUDED_FROM_PULSE_AUDIO", 56 ] 57} 58 59ohos_shared_library("module-hdi-sink") { 60 sanitize = { 61 cfi = true 62 cfi_cross_dso = true 63 debug = false 64 blocklist = "../../../../../cfi_blocklist.txt" 65 } 66 sources = [ 67 "hdi_sink.c", 68 "module_hdi_sink.c", 69 ] 70 71 configs = [ ":hdi_config" ] 72 73 cflags = [ "-DPA_MODULE_NAME=libmodule_hdi_sink_z_so" ] 74 75 ldflags = [ 76 "-Wl", 77 "--no-undefined", 78 ] 79 80 deps = [ 81 "$pulseaudio_build_path/src:pulsecommon", 82 "$pulseaudio_build_path/src/pulse:pulse", 83 "$pulseaudio_build_path/src/pulsecore:pulsecore", 84 "${third_party_path}/bounds_checking_function:libsec_shared", 85 "../../../audioeffect:audio_effect", 86 "../../../audioschedule:audio_schedule", 87 "../../../audioutils:audio_utils", 88 "../../../hdiadapter/sink:renderer_sink_adapter", 89 "../../../playbackcapturer:playback_capturer", 90 ] 91 92 external_deps = [ 93 "c_utils:utils", 94 "hilog:libhilog", 95 ] 96 97 if (ressche_enable == true) { 98 external_deps += [ "resource_schedule_service:ressched_client" ] 99 } 100 101 subsystem_name = "multimedia" 102 part_name = "audio_framework" 103} 104 105ohos_shared_library("module-hdi-source") { 106 sanitize = { 107 cfi = true 108 cfi_cross_dso = true 109 debug = false 110 blocklist = "../../../../../cfi_blocklist.txt" 111 } 112 sources = [ 113 "hdi_source.c", 114 "module_hdi_source.c", 115 ] 116 117 configs = [ ":hdi_config" ] 118 119 cflags = [ "-DPA_MODULE_NAME=libmodule_hdi_source_z_so" ] 120 121 deps = [ 122 "$pulseaudio_build_path/src:pulsecommon", 123 "$pulseaudio_build_path/src/pulse:pulse", 124 "$pulseaudio_build_path/src/pulsecore:pulsecore", 125 "../../../hdiadapter/source:capturer_source_adapter", 126 "//third_party/bounds_checking_function:libsec_shared", 127 ] 128 129 external_deps = [ "hilog:libhilog" ] 130 131 subsystem_name = "multimedia" 132 part_name = "audio_framework" 133} 134