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") 15 16pulseaudio_dir = "//third_party/pulseaudio" 17 18group("audio_capturer_test_packages") { 19 deps = [ ":audio_capturer_test" ] 20} 21 22config("audio_capturer_config") { 23 include_dirs = [ 24 "//foundation/multimedia/audio_standard/interfaces/inner_api/native/audiocapturer/include", 25 "//foundation/multimedia/audio_standard/frameworks/native/audiocapturer/include", 26 "//foundation/multimedia/audio_standard/frameworks/native/audiosession/include", 27 "//foundation/multimedia/audio_standard/frameworks/native/audiostream/include", 28 "//foundation/multimedia/audio_standard/interfaces/inner_api/native/audiocommon/include", 29 "//foundation/multimedia/audio_standard/services/include", 30 "//foundation/multimedia/audio_standard/services/include/audio_service/client", 31 "$pulseaudio_dir/src", 32 "$pulseaudio_dir/confgure/src", 33 ] 34 35 cflags = [ 36 "-Wall", 37 "-Werror", 38 ] 39} 40 41ohos_shared_library("audio_capturer") { 42 install_enable = true 43 44 configs = [ ":audio_capturer_config" ] 45 46 sources = [ "//foundation/multimedia/audio_standard/frameworks/native/audiocapturer/src/audio_capturer.cpp" ] 47 48 deps = [ "//foundation/multimedia/audio_standard/interfaces/inner_api/native/audiomanager:audio_client" ] 49 50 public_configs = [ ":audio_external_library_config" ] 51 52 external_deps = [ "hiviewdfx_hilog_native:libhilog" ] 53 54 part_name = "multimedia_audio_standard" 55 subsystem_name = "multimedia" 56} 57 58config("audio_external_library_config") { 59 include_dirs = [ "//foundation/multimedia/audio_standard/interfaces/inner_api/native/audiocapturer/include" ] 60} 61 62ohos_executable("audio_capturer_test") { 63 install_enable = false 64 65 sources = [ "//foundation/multimedia/audio_standard/services/test/audio_capturer_test.cpp" ] 66 67 configs = [ ":audio_capturer_config" ] 68 69 deps = [ "//foundation/multimedia/audio_standard/interfaces/inner_api/native/audiocapturer:audio_capturer" ] 70 71 external_deps = [ "hiviewdfx_hilog_native:libhilog" ] 72 73 part_name = "multimedia_audio_standard" 74 subsystem_name = "multimedia" 75} 76