• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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  sanitize = {
21    cfi = true
22    cfi_cross_dso = true
23    debug = false
24  }
25
26  include_dirs = [
27    "${multimedia_player_framework_path}/frameworks/js/soundpool/include",
28    "${multimedia_player_framework_path}/frameworks/js/common",
29    "${multimedia_player_framework_path}/interfaces/inner_api/native",
30    "${multimedia_player_framework_path}/services/utils/include",
31    "${multimedia_player_framework_path}/interfaces/inner_api/native/soundpool/include",
32  ]
33
34  sources = [
35    "${multimedia_player_framework_path}/frameworks/js/common/common_napi.cpp",
36    "${multimedia_player_framework_path}/frameworks/js/soundpool/src/soundpool_callback_napi.cpp",
37    "${multimedia_player_framework_path}/frameworks/js/soundpool/src/soundpool_napi.cpp",
38  ]
39
40  cflags = [
41    "-std=c++17",
42    "-fno-rtti",
43    "-fno-exceptions",
44    "-Wall",
45    "-fno-common",
46    "-fstack-protector-strong",
47    "-Wshadow",
48    "-FPIC",
49    "-FS",
50    "-O2",
51    "-D_FORTIFY_SOURCE=2",
52    "-fvisibility=hidden",
53    "-Wformat=2",
54    "-Wfloat-equal",
55    "-Wdate-time",
56    "-Werror",
57    "-Wextra",
58    "-Wimplicit-fallthrough",
59    "-Wsign-compare",
60    "-Wunused-parameter",
61    "-Wunused-variable",
62    "-Wunused-private-field",
63  ]
64
65  deps = [
66    "${multimedia_player_framework_path}/frameworks/native/soundpool:soundpool_client",
67    "${multimedia_player_framework_path}/interfaces/inner_api/native:media_client",
68    "${multimedia_player_framework_path}/services/utils:media_service_utils",
69    "../../../../../../third_party/bounds_checking_function:libsec_shared",
70  ]
71
72  external_deps = [
73    "ability_runtime:abilitykit_native",
74    "ability_runtime:napi_base_context",
75    "audio_framework:audio_client",
76    "audio_framework:audio_renderer",
77    "c_utils:utils",
78    "eventhandler:libeventhandler",
79    "hilog:libhilog",
80    "napi:ace_napi",
81    "qos_manager:qos",
82    "resource_management:global_resmgr",
83  ]
84
85  defines = []
86  defines += player_framework_defines
87  innerapi_tags = [ "platformsdk" ]
88  part_name = "player_framework"
89  subsystem_name = "multimedia"
90}
91