• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (C) 2025 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
17MEDIA_ROOT_DIR = "//foundation/multimedia/player_framework"
18
19config("media_helper_public_config") {
20  include_dirs = [
21    "$MEDIA_ROOT_DIR/interfaces/inner_api/native/media_service_helper",
22  ]
23}
24
25config("media_helper_ipc_config") {
26  include_dirs = [
27    "$MEDIA_ROOT_DIR/services/services/common",
28    "$MEDIA_ROOT_DIR/services/services/monitor/client",
29    "$MEDIA_ROOT_DIR/services/services/monitor/ipc",
30  ]
31}
32
33config("media_helper_base_config") {
34  include_dirs = [
35    "$MEDIA_ROOT_DIR/services/include",
36    "$MEDIA_ROOT_DIR/services/utils/include",
37  ]
38
39  cflags = [
40    "-std=c++17",
41    "-fno-rtti",
42    "-fno-exceptions",
43    "-Wall",
44    "-fno-common",
45    "-fstack-protector-strong",
46    "-Wshadow",
47    "-FPIC",
48    "-FS",
49    "-O2",
50    "-D_FORTIFY_SOURCE=2",
51    "-Wformat=2",
52    "-Wfloat-equal",
53    "-Wdate-time",
54    "-Werror",
55    "-Wextra",
56    "-Wimplicit-fallthrough",
57    "-Wsign-compare",
58    "-Wunused-parameter",
59  ]
60
61  if (target_cpu == "arm") {
62    cflags += [ "-DBINDER_IPC_32BIT" ]
63  }
64
65  defines = []
66  defines += player_framework_defines
67}
68
69ohos_shared_library("media_helper_client") {
70  branch_protector_ret = "pac_ret"
71  install_enable = true
72
73  sanitize = {
74    integer_overflow = true
75    ubsan = true
76    boundary_sanitize = true
77    cfi = true
78    cfi_cross_dso = true
79    debug = false
80  }
81
82  sources = [
83    "$MEDIA_ROOT_DIR/frameworks/native/media_service_helper/media_service_helper.cpp"
84  ]
85
86  configs = [
87    ":media_helper_base_config",
88    ":media_helper_ipc_config",
89  ]
90
91  public_configs = [ ":media_helper_public_config" ]
92  deps = [
93    "$MEDIA_ROOT_DIR/interfaces/inner_api/native:media_client",
94    "$MEDIA_ROOT_DIR/services/utils:media_service_utils" ]
95
96  external_deps = [
97    "audio_framework:audio_client",
98    "av_codec:av_codec_client",
99    "c_utils:utils",
100    "hilog:libhilog",
101    "image_framework:image_native",
102    "ipc:ipc_single",
103    "media_foundation:media_foundation"
104  ]
105
106  innerapi_tags = [ "platformsdk" ]
107  subsystem_name = "multimedia"
108  part_name = "player_framework"
109  version_script = "$MEDIA_ROOT_DIR/interfaces/inner_api/native/player_framework.versionscript"
110}
111