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_avmetadatahelper_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/engine/histreamer/avmetadatahelper",
33    "$MEDIA_PLAYER_ROOT_DIR/services/engine/histreamer/utils",
34    "$MEDIA_PLAYER_ROOT_DIR/services/include",
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}
40
41ohos_static_library("media_engine_histreamer_avmetadatahelper") {
42  stack_protector_ret = true
43  sanitize = {
44    integer_overflow = true
45    ubsan = true
46    boundary_sanitize = true
47    cfi = true
48    cfi_cross_dso = true
49    debug = false
50  }
51  sources = [
52    "av_thumbnail_generator.cpp",
53    "avmetadata_collector.cpp",
54    "avmetadatahelper_impl.cpp",
55  ]
56
57  configs = [
58    ":media_engine_histreamer_avmetadatahelper_config",
59    "$MEDIA_PLAYER_ROOT_DIR/services/dfx:media_service_log_dfx_public_config",
60    "$MEDIA_PLAYER_ROOT_DIR/services/utils:media_service_utils_public_config",
61  ]
62
63  deps = [
64    "$MEDIA_PLAYER_ROOT_DIR/services/dfx:media_service_dfx",
65    "$MEDIA_PLAYER_ROOT_DIR/services/dfx:media_service_log_dfx",
66    "$MEDIA_PLAYER_ROOT_DIR/services/utils:media_service_utils",
67  ]
68
69  external_deps = [
70    "av_codec:av_codec_client",
71    "av_codec:av_codec_media_engine_filters",
72    "av_codec:av_codec_media_engine_modules",
73    "c_utils:utils",
74    "drivers_interface_display:display_commontype_idl_headers",
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