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