# 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("recorder_lite") { sources = [ "recorder.cpp" ] if (enable_media_passthrough_mode == false) { sources += [ "binder/recorder_client.cpp" ] include_dirs = [ "//foundation/multimedia/media_lite/frameworks/recorder_lite/binder", "//foundation/multimedia/media_lite/services/recorder_lite/impl/include", "//foundation/multimedia/media_utils_lite/hals", "//foundation/systemabilitymgr/samgr_lite/interfaces/kits/registry", "//foundation/systemabilitymgr/samgr_lite/interfaces/kits/samgr", "//foundation/multimedia/media_lite/services/recorder_lite/server/include", ] deps = [ "//base/security/permission_lite/services/pms_client:pms_client", "//foundation/communication/ipc/interfaces/innerkits/c/ipc:ipc_single", "//foundation/systemabilitymgr/samgr_lite/samgr:samgr", ] } else { sources += [ "passthrough/recorder_client.cpp" ] include_dirs = [ "//foundation/multimedia/media_lite/frameworks/recorder_lite/passthrough", "//foundation/multimedia/media_lite/services/recorder_lite/impl/include", "//foundation/multimedia/audio_lite/services/impl", ] ldflags = [ "-lformat_hw" ] deps = [ "//foundation/multimedia/media_lite/services/recorder_lite:recorder_impl", ] } cflags = [ "-fPIC" ] cflags += [ "-Wall" ] cflags += [ "-Werror" ] cflags += [ "-Wno-delete-non-abstract-non-virtual-dtor" ] cflags_cc = cflags public_configs = [ ":recorder_external_library_config" ] public_deps = [ "//foundation/graphic/surface_lite:surface_lite", "//foundation/multimedia/media_utils_lite:media_common", "//third_party/bounds_checking_function:libsec_shared", ] } config("recorder_external_library_config") { include_dirs = [ "//third_party/bounds_checking_function/include", "//base/security/permission_lite/interfaces/kits", "//drivers/peripheral/audio/interfaces/include", "//drivers/peripheral/codec/interfaces/include", "//drivers/peripheral/format/interfaces/include", "//foundation/multimedia/audio_lite/interfaces/kits", "//foundation/multimedia/media_lite/interfaces/kits/recorder_lite", "//foundation/multimedia/media_utils_lite/interfaces/kits", ] }