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