# 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("//foundation/multimedia/media_utils_lite/config.gni") static_library("recorder_server") { sources = [ "server/src/recorder_samgr.cpp", "server/src/recorder_service.cpp", ] cflags = [ "-Wall" ] cflags_cc = cflags include_dirs = [ "//foundation/multimedia/media_lite/interfaces/kits/recorder_lite", "//third_party/bounds_checking_function/include", "//drivers/peripheral/audio/interfaces/include", "//drivers/peripheral/codec/interfaces/include", "//drivers/peripheral/format/interfaces/include", "//base/security/permission_lite/interfaces/kits", "//foundation/systemabilitymgr/samgr_lite/interfaces/kits/registry", "//foundation/systemabilitymgr/samgr_lite/interfaces/kits/samgr", "//foundation/systemabilitymgr/samgr_lite/interfaces/kits/communication/broadcast", "//foundation/multimedia/media_lite/services/recorder_lite/impl/include", "//foundation/multimedia/media_lite/services/recorder_lite/server/include", "//foundation/multimedia/media_lite/interfaces/kits/recorder_lite", "//foundation/multimedia/media_utils_lite/interfaces/kits", "//foundation/multimedia/audio_lite/interfaces/kits", "//foundation/multimedia/audio_lite/services/impl", ] ldflags = [ "-lformat_hw", "-lcodec", ] public_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_lite/services/recorder_lite:recorder_impl", "//foundation/multimedia/media_utils_lite:media_common", "//foundation/systemabilitymgr/samgr_lite/samgr:samgr", "//third_party/bounds_checking_function:libsec_shared", ] } shared_library("recorder_impl") { sources = [ "impl/src/recorder_audio_source.cpp", "impl/src/recorder_data_source.cpp", "impl/src/recorder_impl.cpp", "impl/src/recorder_sink.cpp", "impl/src/recorder_video_source.cpp", ] if (enable_media_passthrough_mode == true) { defines = [ "ENABLE_PASSTHROUGH_MODE" ] } cflags = [ "-Wall" ] # cflags += [ "-Werror" ] # cflags += [ "-Wno-delete-non-abstract-non-virtual-dtor" ] cflags_cc = cflags include_dirs = [ "//foundation/multimedia/media_lite/interfaces/kits/recorder_lite", "//third_party/bounds_checking_function/include", "//drivers/peripheral/audio/interfaces/include", "//drivers/peripheral/codec/interfaces/include", "//drivers/peripheral/format/interfaces/include", "//foundation/multimedia/media_lite/services/recorder_lite/impl/include", "//foundation/multimedia/media_utils_lite/interfaces/kits", "//foundation/multimedia/audio_lite/interfaces/kits", "//foundation/multimedia/audio_lite/services/impl", ] outdir = rebase_path("$root_out_dir") ldflags = [ "-L$outdir", "-lcodec", "-laudio_hw", "-lpthread", ] deps = [ "//device/soc/hisilicon/common/hal/media:hardware_media_sdk", "//foundation/multimedia/audio_lite/services:audio_capturer_impl", "//foundation/multimedia/media_utils_lite:media_common", "//third_party/bounds_checking_function:libsec_shared", ] }