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") 16 17config("media_service_utils_public_config") { 18 include_dirs = [ "include" ] 19} 20 21ohos_shared_library("media_service_utils") { 22 branch_protector_ret = "pac_ret" 23 install_enable = true 24 25 sanitize = { 26 integer_overflow = true 27 ubsan = true 28 boundary_sanitize = true 29 cfi = true 30 cfi_cross_dso = true 31 debug = false 32 } 33 34 sources = [ 35 "avdatasrcmemory.cpp", 36 "media_dfx.cpp", 37 "media_permission.cpp", 38 "media_utils.cpp", 39 "player_xcollie.cpp", 40 "task_queue.cpp", 41 "time_format_utils.cpp", 42 "uri_helper.cpp", 43 "watchdog.cpp", 44 "xml_parse.cpp", 45 ] 46 47 include_dirs = [ 48 "//foundation/multimedia/player_framework/interfaces/inner_api/native", 49 "$MEDIA_PLAYER_ROOT_DIR/services/services/engine_intf", 50 ] 51 52 defines = [ "MEDIA_OHOS" ] 53 defines += player_framework_defines 54 if (is_emulator) { 55 defines += [ "EMULATOR_ENABLED" ] 56 } 57 58 cflags = [ 59 "-std=c++17", 60 "-fno-rtti", 61 "-fno-exceptions", 62 "-Wall", 63 "-fno-common", 64 "-fstack-protector-strong", 65 "-Wshadow", 66 "-FPIC", 67 "-FS", 68 "-O2", 69 "-D_FORTIFY_SOURCE=2", 70 "-fvisibility=hidden", 71 "-Wformat=2", 72 "-Wfloat-equal", 73 "-Wdate-time", 74 "-Werror", 75 "-Wextra", 76 "-Wimplicit-fallthrough", 77 "-Wsign-compare", 78 "-Wunused-parameter", 79 ] 80 81 configs = [ ":media_service_utils_public_config" ] 82 83 external_deps = [ 84 "access_token:libaccesstoken_sdk", 85 "access_token:libprivacy_sdk", 86 "av_codec:av_codec_client", 87 "bundle_framework:appexecfwk_base", 88 "bundle_framework:appexecfwk_core", 89 "c_utils:utils", 90 "graphic_surface:surface", 91 "hicollie:libhicollie", 92 "hilog:libhilog", 93 "hisysevent:libhisysevent", 94 "hitrace:hitrace_meter", 95 "hitrace:libhitracechain", 96 "init:libbegetutil", 97 "ipc:ipc_single", 98 "libxml2:libxml2", 99 "media_foundation:media_foundation", 100 "qos_manager:qos", 101 "samgr:samgr_proxy", 102 ] 103 104 subsystem_name = "multimedia" 105 innerapi_tags = [ "platformsdk" ] 106 part_name = "player_framework" 107} 108