• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (C) 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.
13
14import("//build/ohos.gni")
15import("//foundation/multimedia/player_framework/config.gni")
16
17config("media_service_utils_public_config") {
18  include_dirs = [ "include" ]
19}
20
21ohos_shared_library("media_service_utils") {
22  install_enable = true
23
24  sanitize = {
25    cfi = true
26    cfi_cross_dso = true
27    debug = false
28  }
29
30  sources = [
31    "avdatasrcmemory.cpp",
32    "media_dfx.cpp",
33    "media_permission.cpp",
34    "media_utils.cpp",
35    "player_xcollie.cpp",
36    "task_queue.cpp",
37    "uri_helper.cpp",
38    "watchdog.cpp",
39    "xml_parse.cpp",
40  ]
41
42  include_dirs = [
43    "//commonlibrary/c_utils/base/include",
44    "//foundation/multimedia/player_framework/interfaces/inner_api/native",
45    "$MEDIA_PLAYER_ROOT_DIR/services/services/engine_intf",
46    "//third_party/libxml2/include",
47  ]
48
49  defines = [ "MEDIA_OHOS" ]
50  defines += player_framework_defines
51  if (is_emulator) {
52    defines += [ "EMULATOR_ENABLED" ]
53  }
54
55  cflags = [
56    "-std=c++17",
57    "-fno-rtti",
58    "-fno-exceptions",
59    "-Wall",
60    "-fno-common",
61    "-fstack-protector-strong",
62    "-Wshadow",
63    "-FPIC",
64    "-FS",
65    "-O2",
66    "-D_FORTIFY_SOURCE=2",
67    "-fvisibility=hidden",
68    "-Wformat=2",
69    "-Wfloat-equal",
70    "-Wdate-time",
71    "-Werror",
72    "-Wextra",
73    "-Wimplicit-fallthrough",
74    "-Wsign-compare",
75    "-Wunused-parameter",
76  ]
77
78  configs = [ ":media_service_utils_public_config" ]
79
80  deps = [ "//third_party/libxml2:xml2" ]
81
82  external_deps = [
83    "access_token:libaccesstoken_sdk",
84    "access_token:libprivacy_sdk",
85    "bundle_framework:appexecfwk_base",
86    "bundle_framework:appexecfwk_core",
87    "c_utils:utils",
88    "graphic_surface:surface",
89    "hicollie:libhicollie",
90    "hilog:libhilog",
91    "hisysevent:libhisysevent",
92    "hitrace:hitrace_meter",
93    "init:libbegetutil",
94    "ipc:ipc_single",
95    "media_foundation:media_foundation",
96    "qos_manager:qos",
97    "samgr:samgr_proxy",
98  ]
99
100  subsystem_name = "multimedia"
101  innerapi_tags = [ "platformsdk" ]
102  part_name = "player_framework"
103}
104