1# Copyright (c) 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("../../../../../config.gni") 16 17pulseaudio_dir = "//third_party/pulseaudio" 18pulseaudio_build_path = "//third_party/pulseaudio/ohosbuild" 19 20config("capturer_config") { 21 visibility = [ ":*" ] 22 23 include_dirs = [ 24 "$pulseaudio_dir/include", 25 "$pulseaudio_dir/src", 26 "$pulseaudio_dir", 27 "$pulseaudio_build_path/src", 28 "$pulseaudio_build_path/include", 29 "../../../../../interfaces/inner_api/native/audiocommon/include", 30 ] 31 32 cflags = [ 33 "-Wall", 34 "-Werror", 35 "-DHAVE_CONFIG_H", 36 "-D_GNU_SOURCE", 37 "-D__INCLUDED_FROM_PULSE_AUDIO", 38 ] 39} 40 41ohos_shared_library("module-inner-capturer-sink") { 42 sanitize = { 43 cfi = true 44 cfi_cross_dso = true 45 debug = false 46 blocklist = "../../../../../cfi_blocklist.txt" 47 } 48 sources = [ "module_inner_capturer_sink.c" ] 49 50 configs = [ ":capturer_config" ] 51 52 cflags = [ "-DPA_MODULE_NAME=libmodule_inner_capturer_sink_z_so" ] 53 54 ldflags = [ 55 "-Wl", 56 "--no-undefined", 57 ] 58 59 deps = [ 60 "$pulseaudio_build_path/src:pulsecommon", 61 "$pulseaudio_build_path/src/pulse:pulse", 62 "$pulseaudio_build_path/src/pulsecore:pulsecore", 63 ] 64 65 external_deps = [ "hilog:libhilog" ] 66 67 subsystem_name = "multimedia" 68 part_name = "audio_framework" 69} 70 71ohos_shared_library("module-receiver-sink") { 72 sanitize = { 73 cfi = true 74 cfi_cross_dso = true 75 debug = false 76 blocklist = "../../../../../cfi_blocklist.txt" 77 } 78 sources = [ "module_receiver_sink.c" ] 79 80 configs = [ ":capturer_config" ] 81 82 cflags = [ "-DPA_MODULE_NAME=libmodule_receiver_sink_z_so" ] 83 84 ldflags = [ 85 "-Wl", 86 "--no-undefined", 87 ] 88 89 deps = [ 90 "$pulseaudio_build_path/src:pulsecommon", 91 "$pulseaudio_build_path/src/pulse:pulse", 92 "$pulseaudio_build_path/src/pulsecore:pulsecore", 93 ] 94 95 external_deps = [ "hilog:libhilog" ] 96 97 subsystem_name = "multimedia" 98 part_name = "audio_framework" 99} 100