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("//drivers/hdf_core/adapter/uhdf2/uhdf.gni") 16import("//foundation/multimedia/audio_framework/config.gni") 17 18ohos_shared_library("audio_capturer_source") { 19 sanitize = { 20 cfi = true 21 debug = false 22 blocklist = "//foundation/multimedia/audio_framework/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 "//foundation/multimedia/audio_framework/interfaces/inner_api/native/audiocommon/include", 32 "//foundation/multimedia/audio_framework/frameworks/native/audioutils/include", 33 "//foundation/multimedia/audio_framework/frameworks/native/hdiadapter/source/common", 34 "//drivers/peripheral/audio/interfaces/include", 35 ] 36 37 deps = [ "//foundation/multimedia/audio_framework/frameworks/native/audioutils:audio_utils" ] 38 deps += [ multimedia_audio_framework_hdi_audio_client ] 39 40 external_deps = [ "hiviewdfx_hilog_native:libhilog" ] 41 42 part_name = "multimedia_audio_framework" 43 subsystem_name = "multimedia" 44} 45 46ohos_shared_library("remote_audio_capturer_source") { 47 sanitize = { 48 cfi = true 49 debug = false 50 blocklist = "//foundation/multimedia/audio_framework/cfi_blocklist.txt" 51 } 52 install_enable = true 53 sources = [ "remote/remote_audio_capturer_source.cpp" ] 54 cflags = [ "-fPIC" ] 55 cflags += [ "-Wall" ] 56 cflags_cc = cflags 57 if ("${product_name}" == "m40") { 58 cflags += [ "-DPRODUCT_M40" ] 59 } 60 61 include_dirs = [ 62 "//foundation/multimedia/audio_framework/interfaces/inner_api/native/audiocommon/include", 63 "//foundation/multimedia/audio_framework/frameworks/native/hdiadapter/source/common", 64 "//drivers/peripheral/audio/interfaces/include", 65 ] 66 67 if ("${product_name}" == "m40") { 68 deps = [ "//foundation/distributedhardware/distributed_audio/hdf_service/distributed_audio/audio_client:daudio_client" ] 69 } else { 70 deps = [ multimedia_audio_framework_hdi_audio_client ] 71 } 72 73 external_deps = [ "hiviewdfx_hilog_native:libhilog" ] 74 75 part_name = "multimedia_audio_framework" 76 subsystem_name = "multimedia" 77} 78 79ohos_shared_library("audio_capturer_file_source") { 80 sanitize = { 81 cfi = true 82 debug = false 83 blocklist = "//foundation/multimedia/audio_framework/cfi_blocklist.txt" 84 } 85 install_enable = true 86 87 sources = [ "file/audio_capturer_file_source.cpp" ] 88 89 cflags = [ "-fPIC" ] 90 cflags += [ "-Wall" ] 91 92 cflags_cc = cflags 93 94 include_dirs = [ 95 "//foundation/multimedia/audio_framework/interfaces/inner_api/native/audiocommon/include", 96 "//foundation/multimedia/audio_framework/frameworks/native/hdiadapter/source/common", 97 "//drivers/peripheral/audio/interfaces/include", 98 ] 99 100 external_deps = [ "hiviewdfx_hilog_native:libhilog" ] 101 102 part_name = "multimedia_audio_framework" 103 subsystem_name = "multimedia" 104} 105 106ohos_shared_library("capturer_source_adapter") { 107 sanitize = { 108 cfi = true 109 debug = false 110 blocklist = "//foundation/multimedia/audio_framework/cfi_blocklist.txt" 111 } 112 install_enable = true 113 114 sources = [ 115 "common/capturer_source_adapter.c", 116 "common/i_audio_capturer_source.cpp", 117 ] 118 119 cflags = [ "-fPIC" ] 120 cflags += [ "-Wall" ] 121 122 cflags_cc = cflags 123 124 include_dirs = [ 125 "//foundation/multimedia/audio_framework/frameworks/native/hdiadapter/source/common", 126 "//foundation/multimedia/audio_framework/frameworks/native/hdiadapter/source/primary", 127 "//foundation/multimedia/audio_framework/frameworks/native/hdiadapter/source/file", 128 "//foundation/multimedia/audio_framework/frameworks/native/hdiadapter/source/remote", 129 "//foundation/multimedia/audio_framework/interfaces/inner_api/native/audiocommon/include", 130 "//drivers/peripheral/audio/interfaces/include", 131 ] 132 133 deps = [ 134 ":audio_capturer_file_source", 135 ":audio_capturer_source", 136 ":remote_audio_capturer_source", 137 ] 138 139 external_deps = [ "hiviewdfx_hilog_native:libhilog" ] 140 141 part_name = "multimedia_audio_framework" 142 subsystem_name = "multimedia" 143} 144