1049e185fSopenharmony_ci# Copyright (C) 2021 Huawei Device Co., Ltd.
2049e185fSopenharmony_ci# Licensed under the Apache License, Version 2.0 (the "License");
3049e185fSopenharmony_ci# you may not use this file except in compliance with the License.
4049e185fSopenharmony_ci# You may obtain a copy of the License at
5049e185fSopenharmony_ci#
6049e185fSopenharmony_ci#     http://www.apache.org/licenses/LICENSE-2.0
7049e185fSopenharmony_ci#
8049e185fSopenharmony_ci# Unless required by applicable law or agreed to in writing, software
9049e185fSopenharmony_ci# distributed under the License is distributed on an "AS IS" BASIS,
10049e185fSopenharmony_ci# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11049e185fSopenharmony_ci# See the License for the specific language governing permissions and
12049e185fSopenharmony_ci# limitations under the License.
13049e185fSopenharmony_ci
14049e185fSopenharmony_ciimport("//build/ohos.gni")
15049e185fSopenharmony_ciimport("//foundation/multimedia/player_framework/config.gni")
16049e185fSopenharmony_ciimport("./../../../../multimedia_player_framework_aafwk.gni")
17049e185fSopenharmony_ci
18049e185fSopenharmony_ciconfig("media_engine_histreamer_player_config") {
19049e185fSopenharmony_ci  visibility = [ ":*" ]
20049e185fSopenharmony_ci
21049e185fSopenharmony_ci  cflags = [
22049e185fSopenharmony_ci    "-O2",
23049e185fSopenharmony_ci    "-fPIC",
24049e185fSopenharmony_ci    "-Wall",
25049e185fSopenharmony_ci    "-fexceptions",
26049e185fSopenharmony_ci    "-fno-rtti",
27049e185fSopenharmony_ci    "-Wno-unused-but-set-variable",
28049e185fSopenharmony_ci    "-Wno-format",
29049e185fSopenharmony_ci  ]
30049e185fSopenharmony_ci  cflags_cc = cflags
31049e185fSopenharmony_ci
32049e185fSopenharmony_ci  include_dirs = [
33049e185fSopenharmony_ci    "$MEDIA_PLAYER_ROOT_DIR/services/engine/histreamer/player",
34049e185fSopenharmony_ci    "$MEDIA_PLAYER_ROOT_DIR/services/engine/histreamer/utils",
35049e185fSopenharmony_ci    "$MEDIA_PLAYER_ROOT_DIR/services/utils/include",
36049e185fSopenharmony_ci    "$MEDIA_PLAYER_ROOT_DIR/interfaces/inner_api/native",
37049e185fSopenharmony_ci    "$MEDIA_PLAYER_ROOT_DIR/services/services/engine_intf",
38049e185fSopenharmony_ci  ]
39049e185fSopenharmony_ci  defines = [ "MEDIA_OHOS" ]
40049e185fSopenharmony_ci
41049e185fSopenharmony_ci  if (target_cpu == "arm64" || is_emulator) {
42049e185fSopenharmony_ci    dragging_player_path = "\"/system/lib64\""
43049e185fSopenharmony_ci  } else {
44049e185fSopenharmony_ci    dragging_player_path = "\"/system/lib\""
45049e185fSopenharmony_ci  }
46049e185fSopenharmony_ci
47049e185fSopenharmony_ci  defines += [ "DRAGGING_PLAYER_PATH=${dragging_player_path}" ]
48049e185fSopenharmony_ci
49049e185fSopenharmony_ci  defines += player_framework_defines
50049e185fSopenharmony_ci}
51049e185fSopenharmony_ci
52049e185fSopenharmony_ciohos_static_library("media_engine_histreamer_player") {
53049e185fSopenharmony_ci  stack_protector_ret = true
54049e185fSopenharmony_ci  sanitize = {
55049e185fSopenharmony_ci    integer_overflow = true
56049e185fSopenharmony_ci    ubsan = true
57049e185fSopenharmony_ci    boundary_sanitize = true
58049e185fSopenharmony_ci    cfi = true
59049e185fSopenharmony_ci    cfi_cross_dso = true
60049e185fSopenharmony_ci    debug = false
61049e185fSopenharmony_ci  }
62049e185fSopenharmony_ci  sources = [
63049e185fSopenharmony_ci    "dfx_agent.cpp",
64049e185fSopenharmony_ci    "dragging_player_agent.cpp",
65049e185fSopenharmony_ci    "hiplayer_callback_looper.cpp",
66049e185fSopenharmony_ci    "hiplayer_impl.cpp",
67049e185fSopenharmony_ci    "seek_agent.cpp",
68049e185fSopenharmony_ci  ]
69049e185fSopenharmony_ci
70049e185fSopenharmony_ci  configs = [
71049e185fSopenharmony_ci    ":media_engine_histreamer_player_config",
72049e185fSopenharmony_ci    "$MEDIA_PLAYER_ROOT_DIR/services/dfx:media_service_log_dfx_public_config",
73049e185fSopenharmony_ci    "$MEDIA_PLAYER_ROOT_DIR/services/utils:media_service_utils_public_config",
74049e185fSopenharmony_ci  ]
75049e185fSopenharmony_ci
76049e185fSopenharmony_ci  deps = [
77049e185fSopenharmony_ci    "$MEDIA_PLAYER_ROOT_DIR/services/dfx:media_service_log_dfx",
78049e185fSopenharmony_ci    "$MEDIA_PLAYER_ROOT_DIR/services/utils:media_service_utils",
79049e185fSopenharmony_ci  ]
80049e185fSopenharmony_ci
81049e185fSopenharmony_ci  external_deps = [
82049e185fSopenharmony_ci    "audio_framework:audio_client",
83049e185fSopenharmony_ci    "audio_framework:audio_renderer",
84049e185fSopenharmony_ci    "av_codec:av_codec_client",
85049e185fSopenharmony_ci    "av_codec:av_codec_media_engine_filters",
86049e185fSopenharmony_ci    "av_codec:av_codec_media_engine_modules",
87049e185fSopenharmony_ci    "c_utils:utils",
88049e185fSopenharmony_ci    "graphic_surface:surface",
89049e185fSopenharmony_ci    "graphic_surface:sync_fence",
90049e185fSopenharmony_ci    "hilog:libhilog",
91049e185fSopenharmony_ci    "hisysevent:libhisysevent",
92049e185fSopenharmony_ci    "hitrace:libhitracechain",
93049e185fSopenharmony_ci    "init:libbegetutil",
94049e185fSopenharmony_ci    "ipc:ipc_single",
95049e185fSopenharmony_ci    "media_foundation:media_foundation",
96049e185fSopenharmony_ci    "safwk:system_ability_fwk",
97049e185fSopenharmony_ci  ]
98049e185fSopenharmony_ci
99049e185fSopenharmony_ci  subsystem_name = "multimedia"
100049e185fSopenharmony_ci  part_name = "player_framework"
101049e185fSopenharmony_ci}
102