1# Copyright (C) 2024 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.
13
14import("//build/ohos.gni")
15import("//build/ohos/ace/ace.gni")
16import("../../config.gni")
17import("../../multimedia_aafwk.gni")
18
19ohos_shared_library("cj_multimedia_audio_ffi") {
20  sanitize = {
21    cfi = true  # Enable/disable control flow integrity detection
22    boundary_sanitize = true  # Enable boundary san detection
23    cfi_cross_dso = true  # Cross-SO CFI Checks
24    integer_overflow = true  # Enable integer overflow detection
25    ubsan = true  # Enable some Ubsan options
26    debug = false
27  }
28
29  include_dirs = [
30    "include",
31    "../../frameworks/native/include",
32    "../../interfaces/inner_api",
33  ]
34
35  sources = [
36    "src/multimedia_audio_capturer_callback.cpp",
37    "src/multimedia_audio_capturer_impl.cpp",
38    "src/multimedia_audio_common.cpp",
39    "src/multimedia_audio_ffi.cpp",
40    "src/multimedia_audio_manager_impl.cpp",
41    "src/multimedia_audio_routing_manager_callback.cpp",
42    "src/multimedia_audio_routing_manager_impl.cpp",
43    "src/multimedia_audio_stream_manager_callback.cpp",
44    "src/multimedia_audio_stream_manager_impl.cpp",
45    "src/multimedia_audio_volume_group_manager_impl.cpp",
46    "src/multimedia_audio_volume_manager_impl.cpp",
47  ]
48
49  deps = [
50    "../../services/audio_policy:audio_policy_client",
51    "../../services/audio_service:audio_client",
52    "../native/audiocapturer:audio_capturer",
53    "../native/audiorenderer:audio_renderer",
54    "../native/audioutils:audio_utils",
55  ]
56
57  external_deps = [
58    "c_utils:utils",
59    "hilog:libhilog",
60    "napi:ace_napi",
61    "napi:cj_bind_ffi",
62    "napi:cj_bind_native",
63  ]
64
65  innerapi_tags = [ "platformsdk" ]
66  part_name = "audio_framework"
67  subsystem_name = "multimedia"
68}
69