# Copyright (c) 2021-2022 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") static_library("audio_capturer_server") { sources = [ "server/src/audio_capturer_samgr.cpp", "server/src/audio_capturer_server.cpp", ] cflags = [ "-fPIC" ] cflags += [ "-Werror" ] cflags_cc = cflags include_dirs = [ "//base/security/permission_lite/interfaces/kits", "//foundation/multimedia/audio_lite/services/server/include", "//foundation/multimedia/audio_lite/interfaces/kits", "//foundation/multimedia/audio_lite/services/impl", "//foundation/systemabilitymgr/samgr_lite/interfaces/kits/registry", "//foundation/systemabilitymgr/samgr_lite/interfaces/kits/samgr", "//foundation/communication/ipc/interfaces/innerkits/c/ipc/include", "//foundation/systemabilitymgr/samgr_lite/interfaces/kits/communication/broadcast", "//foundation/multimedia/media_utils_lite/interfaces/kits", "//third_party/bounds_checking_function/include", ] deps = [ "//base/security/permission_lite/services/pms_client:pms_client", "//foundation/communication/ipc/interfaces/innerkits/c/ipc:ipc_single", "//foundation/graphic/surface_lite:surface_lite", "//foundation/multimedia/audio_lite/services:audio_capturer_impl", "//foundation/multimedia/media_utils_lite:media_common", "//foundation/systemabilitymgr/samgr_lite/samgr:samgr", "//third_party/bounds_checking_function:libsec_shared", ] } shared_library("audio_capturer_impl") { sources = [ "impl/audio_capturer_impl.cpp", "impl/audio_encoder/audio_encoder.cpp", "impl/audio_source/audio_source.cpp", ] cflags = [ "-fPIC" ] cflags += [ "-Werror" ] cflags_cc = cflags include_dirs = [ "//foundation/multimedia/audio_lite/services/impl/audio_encoder/include", "//foundation/multimedia/audio_lite/services/impl/audio_source/include", "//foundation/multimedia/audio_lite/frameworks/binder", "//foundation/multimedia/audio_lite/interfaces/kits", "//drivers/peripheral/audio/interfaces/include", "//drivers/peripheral/codec/interfaces/include", "//drivers/peripheral/display/interfaces/include", "//drivers/peripheral/base", "//foundation/multimedia/media_utils_lite/interfaces/kits", ] outdir = rebase_path("$root_out_dir") public_configs = [ ":audio_external_library_config" ] ldflags = [ "-L$outdir", "-lcodec", "-laudio_hw", "-lpthread", ] deps = [ "//device/soc/hisilicon/common/hal/media:hardware_media_sdk", "//foundation/graphic/surface_lite:surface_lite", "//foundation/multimedia/media_utils_lite:media_common", "//third_party/bounds_checking_function:libsec_shared", ] } config("audio_external_library_config") { include_dirs = [ "//foundation/multimedia/audio_lite/interfaces/kits" ] include_dirs += [ "//foundation/multimedia/media_utils_lite/interfaces/kits" ] }