1# Copyright (c) 2020-2021 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. 13import("//build/lite/config/component/lite_component.gni") 14import("//foundation/multimedia/media_utils_lite/config.gni") 15 16static_library("recorder_server") { 17 sources = [ 18 "server/src/recorder_samgr.cpp", 19 "server/src/recorder_service.cpp", 20 ] 21 cflags = [ "-Wall" ] 22 cflags_cc = cflags 23 24 include_dirs = [ 25 "//foundation/multimedia/media_lite/interfaces/kits/recorder_lite", 26 "//third_party/bounds_checking_function/include", 27 "//drivers/peripheral/audio/interfaces/include", 28 "//drivers/peripheral/codec/interfaces/include", 29 "//drivers/peripheral/format/interfaces/include", 30 "//base/security/permission_lite/interfaces/kits", 31 "//foundation/systemabilitymgr/samgr_lite/interfaces/kits/registry", 32 "//foundation/systemabilitymgr/samgr_lite/interfaces/kits/samgr", 33 "//foundation/systemabilitymgr/samgr_lite/interfaces/kits/communication/broadcast", 34 "//foundation/multimedia/media_lite/services/recorder_lite/impl/include", 35 "//foundation/multimedia/media_lite/services/recorder_lite/server/include", 36 "//foundation/multimedia/media_lite/interfaces/kits/recorder_lite", 37 "//foundation/multimedia/media_utils_lite/interfaces/kits", 38 "//foundation/multimedia/audio_lite/interfaces/kits", 39 "//foundation/multimedia/audio_lite/services/impl", 40 ] 41 ldflags = [ 42 "-lformat_hw", 43 "-lcodec", 44 ] 45 public_deps = [ 46 "//base/security/permission_lite/services/pms_client:pms_client", 47 "//foundation/communication/ipc/interfaces/innerkits/c/ipc:ipc_single", 48 "//foundation/graphic/surface_lite:surface_lite", 49 "//foundation/multimedia/audio_lite/services:audio_capturer_impl", 50 "//foundation/multimedia/media_lite/services/recorder_lite:recorder_impl", 51 "//foundation/multimedia/media_utils_lite:media_common", 52 "//foundation/systemabilitymgr/samgr_lite/samgr:samgr", 53 "//third_party/bounds_checking_function:libsec_shared", 54 ] 55} 56 57shared_library("recorder_impl") { 58 sources = [ 59 "impl/src/recorder_audio_source.cpp", 60 "impl/src/recorder_data_source.cpp", 61 "impl/src/recorder_impl.cpp", 62 "impl/src/recorder_sink.cpp", 63 "impl/src/recorder_video_source.cpp", 64 ] 65 66 if (enable_media_passthrough_mode == true) { 67 defines = [ "ENABLE_PASSTHROUGH_MODE" ] 68 } 69 70 cflags = [ "-Wall" ] 71 72 # cflags += [ "-Werror" ] 73 # cflags += [ "-Wno-delete-non-abstract-non-virtual-dtor" ] 74 cflags_cc = cflags 75 76 include_dirs = [ 77 "//foundation/multimedia/media_lite/interfaces/kits/recorder_lite", 78 "//third_party/bounds_checking_function/include", 79 "//drivers/peripheral/audio/interfaces/include", 80 "//drivers/peripheral/codec/interfaces/include", 81 "//drivers/peripheral/format/interfaces/include", 82 "//foundation/multimedia/media_lite/services/recorder_lite/impl/include", 83 "//foundation/multimedia/media_utils_lite/interfaces/kits", 84 "//foundation/multimedia/audio_lite/interfaces/kits", 85 "//foundation/multimedia/audio_lite/services/impl", 86 ] 87 88 outdir = rebase_path("$root_out_dir") 89 ldflags = [ 90 "-L$outdir", 91 "-lcodec", 92 "-laudio_hw", 93 "-lpthread", 94 ] 95 deps = [ 96 "//device/soc/hisilicon/common/hal/media:hardware_media_sdk", 97 "//foundation/multimedia/audio_lite/services:audio_capturer_impl", 98 "//foundation/multimedia/media_utils_lite:media_common", 99 "//third_party/bounds_checking_function:libsec_shared", 100 ] 101} 102