1# Copyright (c) 2023 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("//foundation/multimedia/player_framework/config.gni")
17import("./../../../multimedia_player_framework_aafwk.gni")
18
19ohos_shared_library("media_soundpool") {
20  stack_protector_ret = true
21  sanitize = {
22    integer_overflow = true
23    ubsan = true
24    boundary_sanitize = true
25    cfi = true
26    cfi_cross_dso = true
27    debug = false
28  }
29
30  include_dirs = [
31    "${multimedia_player_framework_path}/frameworks/js/soundpool/include",
32    "${multimedia_player_framework_path}/frameworks/js/common",
33    "${multimedia_player_framework_path}/interfaces/inner_api/native",
34    "${multimedia_player_framework_path}/services/utils/include",
35    "${multimedia_player_framework_path}/interfaces/inner_api/native/soundpool/include",
36  ]
37
38  sources = [
39    "${multimedia_player_framework_path}/frameworks/js/common/common_napi.cpp",
40    "${multimedia_player_framework_path}/frameworks/js/soundpool/src/soundpool_callback_napi.cpp",
41    "${multimedia_player_framework_path}/frameworks/js/soundpool/src/soundpool_napi.cpp",
42  ]
43
44  cflags = [
45    "-std=c++17",
46    "-fno-rtti",
47    "-fno-exceptions",
48    "-Wall",
49    "-fno-common",
50    "-fstack-protector-strong",
51    "-Wshadow",
52    "-FPIC",
53    "-FS",
54    "-O2",
55    "-D_FORTIFY_SOURCE=2",
56    "-fvisibility=hidden",
57    "-Wformat=2",
58    "-Wfloat-equal",
59    "-Wdate-time",
60    "-Werror",
61    "-Wextra",
62    "-Wimplicit-fallthrough",
63    "-Wsign-compare",
64    "-Wunused-parameter",
65    "-Wunused-variable",
66    "-Wunused-private-field",
67  ]
68
69  deps = [
70    "${multimedia_player_framework_path}/frameworks/native/soundpool:soundpool_client",
71    "${multimedia_player_framework_path}/interfaces/inner_api/native:media_client",
72    "${multimedia_player_framework_path}/services/utils:media_service_utils",
73  ]
74
75  external_deps = [
76    "ability_base:want",
77    "ability_runtime:ability_manager",
78    "ability_runtime:abilitykit_native",
79    "ability_runtime:extensionkit_native",
80    "ability_runtime:napi_base_context",
81    "ability_runtime:wantagent_innerkits",
82    "audio_framework:audio_client",
83    "audio_framework:audio_renderer",
84    "av_codec:av_codec_client",
85    "bounds_checking_function:libsec_shared",
86    "bundle_framework:appexecfwk_base",
87    "c_utils:utils",
88    "eventhandler:libeventhandler",
89    "hilog:libhilog",
90    "hisysevent:libhisysevent",
91    "ipc:ipc_core",
92    "napi:ace_napi",
93    "qos_manager:qos",
94    "resource_management:global_resmgr",
95  ]
96
97  defines = []
98  defines += player_framework_defines
99  innerapi_tags = [ "platformsdk" ]
100  part_name = "player_framework"
101  subsystem_name = "multimedia"
102}
103