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")
16import("./../../../../multimedia_player_framework_aafwk.gni")
17
18config("media_engine_histreamer_player_config") {
19  visibility = [ ":*" ]
20
21  cflags = [
22    "-O2",
23    "-fPIC",
24    "-Wall",
25    "-fexceptions",
26    "-fno-rtti",
27    "-Wno-unused-but-set-variable",
28    "-Wno-format",
29  ]
30  cflags_cc = cflags
31
32  include_dirs = [
33    "$MEDIA_PLAYER_ROOT_DIR/services/engine/histreamer/player",
34    "$MEDIA_PLAYER_ROOT_DIR/services/engine/histreamer/utils",
35    "$MEDIA_PLAYER_ROOT_DIR/services/utils/include",
36    "$MEDIA_PLAYER_ROOT_DIR/interfaces/inner_api/native",
37    "$MEDIA_PLAYER_ROOT_DIR/services/services/engine_intf",
38  ]
39  defines = []
40
41  if (target_cpu == "arm64" || is_emulator) {
42    dragging_player_path = "\"/system/lib64\""
43  } else {
44    dragging_player_path = "\"/system/lib\""
45  }
46
47  defines += [ "DRAGGING_PLAYER_PATH=${dragging_player_path}" ]
48
49  defines += player_framework_defines
50}
51
52ohos_static_library("media_engine_histreamer_player") {
53  stack_protector_ret = true
54  sanitize = {
55    integer_overflow = true
56    ubsan = true
57    boundary_sanitize = true
58    cfi = true
59    cfi_cross_dso = true
60    debug = false
61  }
62  sources = [
63    "dfx_agent.cpp",
64    "dragging_player_agent.cpp",
65    "hiplayer_callback_looper.cpp",
66    "hiplayer_impl.cpp",
67    "seek_agent.cpp",
68  ]
69
70  configs = [
71    ":media_engine_histreamer_player_config",
72    "$MEDIA_PLAYER_ROOT_DIR/services/dfx:media_service_log_dfx_public_config",
73    "$MEDIA_PLAYER_ROOT_DIR/services/utils:media_service_utils_public_config",
74  ]
75
76  deps = [
77    "$MEDIA_PLAYER_ROOT_DIR/services/dfx:media_service_log_dfx",
78    "$MEDIA_PLAYER_ROOT_DIR/services/utils:media_service_utils",
79  ]
80
81  external_deps = [
82    "audio_framework:audio_client",
83    "audio_framework:audio_renderer",
84    "av_codec:av_codec_client",
85    "av_codec:av_codec_media_engine_filters",
86    "av_codec:av_codec_media_engine_modules",
87    "c_utils:utils",
88    "graphic_surface:surface",
89    "graphic_surface:sync_fence",
90    "hilog:libhilog",
91    "hisysevent:libhisysevent",
92    "hitrace:libhitracechain",
93    "init:libbegetutil",
94    "ipc:ipc_single",
95    "media_foundation:media_foundation",
96    "safwk:system_ability_fwk",
97  ]
98
99  subsystem_name = "multimedia"
100  part_name = "player_framework"
101}
102