1# Copyright (c) 2022-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") 16 17ohos_shared_library("audio_capturer_source") { 18 sanitize = { 19 cfi = true 20 cfi_cross_dso = true 21 debug = false 22 blocklist = "../../../../cfi_blocklist.txt" 23 } 24 install_enable = true 25 sources = [ "primary/audio_capturer_source.cpp" ] 26 cflags = [ "-fPIC" ] 27 cflags += [ "-Wall" ] 28 cflags_cc = cflags 29 30 include_dirs = [ 31 "common", 32 "../../audioutils/include", 33 "../../../../interfaces/inner_api/native/audiocommon/include", 34 ] 35 36 deps = [ "../../audioutils:audio_utils" ] 37 38 external_deps = [ 39 "c_utils:utils", 40 "drivers_interface_audio:audio_idl_headers", 41 "drivers_interface_audio:libaudio_proxy_1.0", 42 "hilog:libhilog", 43 "power_manager:powermgr_client", 44 ] 45 46 part_name = "audio_framework" 47 subsystem_name = "multimedia" 48} 49 50ohos_shared_library("fast_audio_capturer_source") { 51 sanitize = { 52 cfi = true 53 cfi_cross_dso = true 54 debug = false 55 blocklist = "../../../../cfi_blocklist.txt" 56 } 57 install_enable = true 58 sources = [ "fast/fast_audio_capturer_source.cpp" ] 59 cflags = [ "-fPIC" ] 60 cflags += [ "-Wall" ] 61 cflags_cc = cflags 62 63 include_dirs = [ 64 "../../../../interfaces/inner_api/native/audiocommon/include", 65 "../../audioutils/include", 66 "common", 67 ] 68 69 deps = [ "../../audioutils:audio_utils" ] 70 71 external_deps = [ 72 "drivers_interface_audio:audio_idl_headers", 73 "drivers_interface_audio:libaudio_proxy_1.0", 74 "hilog:libhilog", 75 "power_manager:powermgr_client", 76 ] 77 78 part_name = "audio_framework" 79 subsystem_name = "multimedia" 80} 81 82ohos_shared_library("remote_audio_capturer_source") { 83 sanitize = { 84 cfi = true 85 cfi_cross_dso = true 86 debug = false 87 blocklist = "../../../../cfi_blocklist.txt" 88 } 89 install_enable = true 90 sources = [ "remote/remote_audio_capturer_source.cpp" ] 91 cflags = [ "-fPIC" ] 92 cflags += [ "-Wall" ] 93 cflags_cc = cflags 94 95 include_dirs = [ 96 "common", 97 "../../../../interfaces/inner_api/native/audiocommon/include", 98 ] 99 include_dirs += [ multimedia_audio_framework_drivers ] 100 101 external_deps = [ "hilog:libhilog" ] 102 defines = [] 103 if (audio_framework_feature_daudio_enable) { 104 defines += [ "FEATURE_DISTRIBUTE_AUDIO" ] 105 external_deps += [ "distributed_audio:daudio_client" ] 106 } 107 108 part_name = "audio_framework" 109 subsystem_name = "multimedia" 110} 111 112ohos_shared_library("remote_fast_audio_capturer_source") { 113 sanitize = { 114 cfi = true 115 cfi_cross_dso = true 116 debug = false 117 blocklist = "../../../../cfi_blocklist.txt" 118 } 119 install_enable = true 120 sources = [ "remote_fast/remote_fast_audio_capturer_source.cpp" ] 121 cflags = [ "-fPIC" ] 122 cflags += [ "-Wall" ] 123 cflags_cc = cflags 124 125 include_dirs = [ 126 "common", 127 "../../audioutils/include", 128 "../../../../interfaces/inner_api/native/audiocommon/include", 129 ] 130 131 include_dirs += [ multimedia_audio_framework_drivers ] 132 133 deps = [ "../../audioutils:audio_utils" ] 134 135 external_deps = [ 136 "c_utils:utils", 137 "hilog:libhilog", 138 ] 139 defines = [] 140 if (audio_framework_feature_daudio_enable) { 141 defines += [ "FEATURE_DISTRIBUTE_AUDIO" ] 142 external_deps += [ "distributed_audio:daudio_client" ] 143 } 144 145 part_name = "audio_framework" 146 subsystem_name = "multimedia" 147} 148 149ohos_shared_library("audio_capturer_file_source") { 150 sanitize = { 151 cfi = true 152 cfi_cross_dso = true 153 debug = false 154 blocklist = "../../../../cfi_blocklist.txt" 155 } 156 install_enable = true 157 158 sources = [ "file/audio_capturer_file_source.cpp" ] 159 160 cflags = [ "-fPIC" ] 161 cflags += [ "-Wall" ] 162 163 cflags_cc = cflags 164 165 include_dirs = [ 166 "common", 167 "../../../../interfaces/inner_api/native/audiocommon/include", 168 ] 169 170 include_dirs += [ multimedia_audio_framework_drivers ] 171 172 external_deps = [ "hilog:libhilog" ] 173 174 part_name = "audio_framework" 175 subsystem_name = "multimedia" 176} 177 178ohos_shared_library("capturer_source_adapter") { 179 sanitize = { 180 cfi = true 181 cfi_cross_dso = true 182 debug = false 183 blocklist = "../../../../cfi_blocklist.txt" 184 } 185 install_enable = true 186 187 sources = [ 188 "common/capturer_source_adapter.c", 189 "common/i_audio_capturer_source.cpp", 190 ] 191 192 cflags = [ "-fPIC" ] 193 cflags += [ "-Wall" ] 194 195 cflags_cc = cflags 196 197 include_dirs = [ 198 "common", 199 "file", 200 "primary", 201 "remote", 202 "../../../../interfaces/inner_api/native/audiocommon/include", 203 ] 204 205 include_dirs += [ multimedia_audio_framework_drivers ] 206 207 deps = [ 208 ":audio_capturer_file_source", 209 ":audio_capturer_source", 210 ":remote_audio_capturer_source", 211 ":remote_fast_audio_capturer_source", 212 ] 213 214 external_deps = [ "hilog:libhilog" ] 215 216 part_name = "audio_framework" 217 subsystem_name = "multimedia" 218} 219