146f34cbfSopenharmony_ci# Copyright (c) 2021-2024 Huawei Device Co., Ltd. 246f34cbfSopenharmony_ci# Licensed under the Apache License, Version 2.0 (the "License"); 346f34cbfSopenharmony_ci# you may not use this file except in compliance with the License. 446f34cbfSopenharmony_ci# You may obtain a copy of the License at 546f34cbfSopenharmony_ci# 646f34cbfSopenharmony_ci# http://www.apache.org/licenses/LICENSE-2.0 746f34cbfSopenharmony_ci# 846f34cbfSopenharmony_ci# Unless required by applicable law or agreed to in writing, software 946f34cbfSopenharmony_ci# distributed under the License is distributed on an "AS IS" BASIS, 1046f34cbfSopenharmony_ci# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1146f34cbfSopenharmony_ci# See the License for the specific language governing permissions and 1246f34cbfSopenharmony_ci# limitations under the License. 1346f34cbfSopenharmony_ci 1446f34cbfSopenharmony_ciimport("//build/ohos.gni") 1546f34cbfSopenharmony_ciimport("../../../config.gni") 1646f34cbfSopenharmony_ci 1746f34cbfSopenharmony_ciconfig("audio_capturer_config") { 1846f34cbfSopenharmony_ci include_dirs = [ 1946f34cbfSopenharmony_ci "include", 2046f34cbfSopenharmony_ci "../../../interfaces/inner_api/native/audiocommon/include", 2146f34cbfSopenharmony_ci "../../../interfaces/inner_api/native/audiocapturer/include", 2246f34cbfSopenharmony_ci "../../../frameworks/native/audiostream/include", 2346f34cbfSopenharmony_ci "../../../services/audio_service/client/include", 2446f34cbfSopenharmony_ci ] 2546f34cbfSopenharmony_ci 2646f34cbfSopenharmony_ci cflags = [ 2746f34cbfSopenharmony_ci "-Wall", 2846f34cbfSopenharmony_ci "-Werror", 2946f34cbfSopenharmony_ci ] 3046f34cbfSopenharmony_ci} 3146f34cbfSopenharmony_ci 3246f34cbfSopenharmony_ciconfig("audio_external_library_config") { 3346f34cbfSopenharmony_ci include_dirs = [ 3446f34cbfSopenharmony_ci "include", 3546f34cbfSopenharmony_ci "../../../interfaces/inner_api/native/audiocapturer/include", 3646f34cbfSopenharmony_ci "../../../interfaces/inner_api/native/audiocommon/include", 3746f34cbfSopenharmony_ci "../../../frameworks/native/audiostream/include", 3846f34cbfSopenharmony_ci "../../../services/audio_service/client/include", 3946f34cbfSopenharmony_ci "../../../interfaces/kits/c/common", 4046f34cbfSopenharmony_ci ] 4146f34cbfSopenharmony_ci} 4246f34cbfSopenharmony_ci 4346f34cbfSopenharmony_ciohos_shared_library("audio_capturer") { 4446f34cbfSopenharmony_ci branch_protector_ret = "pac_ret" 4546f34cbfSopenharmony_ci sanitize = { 4646f34cbfSopenharmony_ci cfi = true 4746f34cbfSopenharmony_ci cfi_cross_dso = true 4846f34cbfSopenharmony_ci cfi_vcall_icall_only = true 4946f34cbfSopenharmony_ci debug = false 5046f34cbfSopenharmony_ci } 5146f34cbfSopenharmony_ci install_enable = true 5246f34cbfSopenharmony_ci 5346f34cbfSopenharmony_ci configs = [ ":audio_capturer_config" ] 5446f34cbfSopenharmony_ci 5546f34cbfSopenharmony_ci sources = [ 5646f34cbfSopenharmony_ci "src/audio_capturer.cpp", 5746f34cbfSopenharmony_ci "src/audio_capturer_proxy_obj.cpp", 5846f34cbfSopenharmony_ci ] 5946f34cbfSopenharmony_ci 6046f34cbfSopenharmony_ci deps = [ 6146f34cbfSopenharmony_ci "../../../services/audio_policy:audio_policy_client", 6246f34cbfSopenharmony_ci "../../../services/audio_service:audio_client", 6346f34cbfSopenharmony_ci "../audioutils:audio_utils", 6446f34cbfSopenharmony_ci ] 6546f34cbfSopenharmony_ci 6646f34cbfSopenharmony_ci public_configs = [ ":audio_external_library_config" ] 6746f34cbfSopenharmony_ci 6846f34cbfSopenharmony_ci external_deps = [ 6946f34cbfSopenharmony_ci "c_utils:utils", 7046f34cbfSopenharmony_ci "eventhandler:libeventhandler", 7146f34cbfSopenharmony_ci "hilog:libhilog", 7246f34cbfSopenharmony_ci "ipc:ipc_single", 7346f34cbfSopenharmony_ci "media_foundation:media_monitor_client", 7446f34cbfSopenharmony_ci "media_foundation:media_monitor_common", 7546f34cbfSopenharmony_ci "pulseaudio:pulse", 7646f34cbfSopenharmony_ci "samgr:samgr_proxy", 7746f34cbfSopenharmony_ci ] 7846f34cbfSopenharmony_ci 7946f34cbfSopenharmony_ci version_script = "../../../audio_framework.versionscript" 8046f34cbfSopenharmony_ci innerapi_tags = [ "platformsdk" ] 8146f34cbfSopenharmony_ci 8246f34cbfSopenharmony_ci part_name = "audio_framework" 8346f34cbfSopenharmony_ci subsystem_name = "multimedia" 8446f34cbfSopenharmony_ci} 8546f34cbfSopenharmony_ci 8646f34cbfSopenharmony_cigroup("audio_capturer_test_packages") { 8746f34cbfSopenharmony_ci deps = [ ":audio_capturer_test" ] 8846f34cbfSopenharmony_ci} 8946f34cbfSopenharmony_ci 9046f34cbfSopenharmony_ciohos_executable("audio_capturer_test") { 9146f34cbfSopenharmony_ci install_enable = false 9246f34cbfSopenharmony_ci 9346f34cbfSopenharmony_ci sources = [ "test/example/audio_capturer_test.cpp" ] 9446f34cbfSopenharmony_ci 9546f34cbfSopenharmony_ci configs = [ ":audio_capturer_config" ] 9646f34cbfSopenharmony_ci 9746f34cbfSopenharmony_ci deps = [ ":audio_capturer" ] 9846f34cbfSopenharmony_ci 9946f34cbfSopenharmony_ci external_deps = [ "hilog:libhilog" ] 10046f34cbfSopenharmony_ci 10146f34cbfSopenharmony_ci part_name = "audio_framework" 10246f34cbfSopenharmony_ci subsystem_name = "multimedia" 10346f34cbfSopenharmony_ci} 10446f34cbfSopenharmony_ci 10546f34cbfSopenharmony_ciohos_executable("audio_inner_capturer_test") { 10646f34cbfSopenharmony_ci install_enable = false 10746f34cbfSopenharmony_ci sanitize = { 10846f34cbfSopenharmony_ci cfi = true 10946f34cbfSopenharmony_ci cfi_cross_dso = true 11046f34cbfSopenharmony_ci debug = false 11146f34cbfSopenharmony_ci } 11246f34cbfSopenharmony_ci cflags = [ 11346f34cbfSopenharmony_ci "-Wall", 11446f34cbfSopenharmony_ci "-Werror", 11546f34cbfSopenharmony_ci ] 11646f34cbfSopenharmony_ci 11746f34cbfSopenharmony_ci include_dirs = [ "../../../interfaces/inner_api/native/audiocommon/include" ] 11846f34cbfSopenharmony_ci 11946f34cbfSopenharmony_ci sources = [ "test/example/audio_inner_capturer_test.cpp" ] 12046f34cbfSopenharmony_ci 12146f34cbfSopenharmony_ci deps = [ ":audio_capturer" ] 12246f34cbfSopenharmony_ci 12346f34cbfSopenharmony_ci external_deps = [ 12446f34cbfSopenharmony_ci "c_utils:utils", 12546f34cbfSopenharmony_ci "hilog:libhilog", 12646f34cbfSopenharmony_ci ] 12746f34cbfSopenharmony_ci 12846f34cbfSopenharmony_ci part_name = "audio_framework" 12946f34cbfSopenharmony_ci subsystem_name = "multimedia" 13046f34cbfSopenharmony_ci} 131