# Copyright (c) 2020-2021 Huawei Device Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. import("//build/lite/config/component/lite_component.gni") import("//build/lite/ndk/ndk.gni") import("//foundation/multimedia/media_utils_lite/config.gni") shared_library("audio_capturer_lite") { sources = [ "audio_capturer.cpp" ] if (enable_media_passthrough_mode == true) { sources += [ "passthrough/audio_capturer_client.cpp" ] include_dirs = [ "//foundation/multimedia/audio_lite/frameworks/passthrough", "//foundation/multimedia/audio_lite/services/impl", "//foundation/systemabilitymgr/samgr_lite/interfaces/kits/samgr", ] deps = [ "//foundation/multimedia/audio_lite/services:audio_capturer_impl", "//foundation/systemabilitymgr/samgr_lite/samgr:samgr", ] } else { sources += [ "binder/audio_capturer_client.cpp" ] include_dirs = [ "//base/security/permission_lite/interfaces/kits", "//foundation/multimedia/audio_lite/services/server/include", "//foundation/multimedia/audio_lite/services/impl", "//foundation/multimedia/audio_lite/frameworks/binder", "//foundation/systemabilitymgr/samgr_lite/interfaces/kits/registry", "//foundation/systemabilitymgr/samgr_lite/interfaces/kits/registry", "//foundation/systemabilitymgr/samgr_lite/interfaces/kits/samgr", ] deps = [ "//base/security/permission_lite/services/pms_client:pms_client", "//foundation/graphic/surface_lite:surface_lite", "//foundation/systemabilitymgr/samgr_lite/samgr:samgr", ] } public_configs = [ ":audio_capturer_public_config" ] public_deps = [ "//foundation/multimedia/media_utils_lite:media_common", "//third_party/bounds_checking_function:libsec_shared", ] } config("audio_capturer_public_config") { include_dirs = [ "//foundation/multimedia/audio_lite/interfaces/kits", "//foundation/multimedia/media_utils_lite/interfaces/kits", ] cflags = [ "-fPIC" ] cflags += [ "-Wall" ] cflags_cc = cflags }