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("//foundation/multimedia/player_framework/config.gni")
16
17config("media_engine_histreamer_factory_config") {
18  visibility = [ ":*" ]
19
20  cflags = [
21    "-O2",
22    "-fPIC",
23    "-Wall",
24    "-fexceptions",
25    "-fno-rtti",
26    "-Wno-unused-but-set-variable",
27    "-Wno-format",
28  ]
29  cflags_cc = cflags
30
31  include_dirs = [
32    "$MEDIA_PLAYER_ROOT_DIR/services/include",
33    "$MEDIA_PLAYER_ROOT_DIR/services/services/engine_intf",
34    "$MEDIA_PLAYER_ROOT_DIR/services/engine/histreamer/player",
35    "$MEDIA_PLAYER_ROOT_DIR/services/engine/histreamer/recorder",
36    "$MEDIA_PLAYER_ROOT_DIR/services/engine/histreamer/avmetadatahelper",
37    "$MEDIA_PLAYER_ROOT_DIR/services/engine/histreamer/transcoder",
38    "$MEDIA_PLAYER_ROOT_DIR/services/utils/include",
39    "$MEDIA_PLAYER_ROOT_DIR/interfaces/inner_api/native",
40  ]
41  defines = [
42    "HST_ANY_WITH_NO_RTTI",
43    "MEDIA_OHOS",
44  ]
45  defines += player_framework_defines
46}
47
48ohos_static_library("media_engine_histreamer_factory") {
49  stack_protector_ret = true
50  sanitize = {
51    integer_overflow = true
52    ubsan = true
53    boundary_sanitize = true
54    cfi = true
55    cfi_cross_dso = true
56    debug = false
57  }
58  sources = [ "hst_engine_factory.cpp" ]
59
60  configs = [
61    ":media_engine_histreamer_factory_config",
62    "$MEDIA_PLAYER_ROOT_DIR/services/dfx:media_service_log_dfx_public_config",
63  ]
64
65  deps = [
66    "$MEDIA_PLAYER_ROOT_DIR/services/dfx:media_service_log_dfx",
67    "$MEDIA_PLAYER_ROOT_DIR/services/engine/histreamer/player:media_engine_histreamer_player",
68  ]
69
70  external_deps = [
71    "audio_framework:audio_client",
72    "av_codec:av_codec_client",
73    "av_codec:av_codec_media_engine_filters",
74    "c_utils:utils",
75    "graphic_surface:surface",
76    "graphic_surface:sync_fence",
77    "hilog:libhilog",
78    "image_framework:image_native",
79    "ipc:ipc_single",
80    "media_foundation:media_foundation",
81    "safwk:system_ability_fwk",
82  ]
83
84  subsystem_name = "multimedia"
85  part_name = "player_framework"
86}
87