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("//build/lite/ndk/ndk.gni")
15import("//foundation/multimedia/media_utils_lite/config.gni")
16
17shared_library("recorder_lite") {
18  sources = [ "recorder.cpp" ]
19  if (enable_media_passthrough_mode == false) {
20    sources += [ "binder/recorder_client.cpp" ]
21    include_dirs = [
22      "//foundation/multimedia/media_lite/frameworks/recorder_lite/binder",
23      "//foundation/multimedia/media_lite/services/recorder_lite/impl/include",
24      "//foundation/multimedia/media_utils_lite/hals",
25      "//foundation/systemabilitymgr/samgr_lite/interfaces/kits/registry",
26      "//foundation/systemabilitymgr/samgr_lite/interfaces/kits/samgr",
27      "//foundation/multimedia/media_lite/services/recorder_lite/server/include",
28    ]
29
30    deps = [
31      "//base/security/permission_lite/services/pms_client:pms_client",
32      "//foundation/communication/ipc/interfaces/innerkits/c/ipc:ipc_single",
33      "//foundation/systemabilitymgr/samgr_lite/samgr:samgr",
34    ]
35  } else {
36    sources += [ "passthrough/recorder_client.cpp" ]
37    include_dirs = [
38      "//foundation/multimedia/media_lite/frameworks/recorder_lite/passthrough",
39      "//foundation/multimedia/media_lite/services/recorder_lite/impl/include",
40      "//foundation/multimedia/audio_lite/services/impl",
41    ]
42    ldflags = [ "-lformat_hw" ]
43    deps = [
44      "//foundation/multimedia/media_lite/services/recorder_lite:recorder_impl",
45    ]
46  }
47  cflags = [ "-fPIC" ]
48  cflags += [ "-Wall" ]
49  cflags += [ "-Werror" ]
50  cflags += [ "-Wno-delete-non-abstract-non-virtual-dtor" ]
51  cflags_cc = cflags
52
53  public_configs = [ ":recorder_external_library_config" ]
54  public_deps = [
55    "//foundation/graphic/surface_lite:surface_lite",
56    "//foundation/multimedia/media_utils_lite:media_common",
57    "//third_party/bounds_checking_function:libsec_shared",
58  ]
59}
60config("recorder_external_library_config") {
61  include_dirs = [
62    "//third_party/bounds_checking_function/include",
63    "//base/security/permission_lite/interfaces/kits",
64    "//drivers/peripheral/audio/interfaces/include",
65    "//drivers/peripheral/codec/interfaces/include",
66    "//drivers/peripheral/format/interfaces/include",
67    "//foundation/multimedia/audio_lite/interfaces/kits",
68    "//foundation/multimedia/media_lite/interfaces/kits/recorder_lite",
69    "//foundation/multimedia/media_utils_lite/interfaces/kits",
70  ]
71}
72