1049e185fSopenharmony_ci# Copyright (C) 2022 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("//build/ohos/ace/ace.gni") 16049e185fSopenharmony_ciimport("//foundation/multimedia/player_framework/config.gni") 17049e185fSopenharmony_ciMEDIA_ROOT_DIR = "//foundation/multimedia/player_framework/" 18049e185fSopenharmony_ci 19049e185fSopenharmony_ciohos_shared_library("media_avplayer") { 20049e185fSopenharmony_ci stack_protector_ret = true 21049e185fSopenharmony_ci sanitize = { 22049e185fSopenharmony_ci integer_overflow = true 23049e185fSopenharmony_ci ubsan = true 24049e185fSopenharmony_ci boundary_sanitize = true 25049e185fSopenharmony_ci cfi = true 26049e185fSopenharmony_ci cfi_cross_dso = true 27049e185fSopenharmony_ci debug = false 28049e185fSopenharmony_ci } 29049e185fSopenharmony_ci 30049e185fSopenharmony_ci include_dirs = [ 31049e185fSopenharmony_ci "//foundation/multimedia/player_framework/interfaces/inner_api", 32049e185fSopenharmony_ci "//foundation/multimedia/player_framework/frameworks/js/avplayer", 33049e185fSopenharmony_ci "//foundation/multimedia/player_framework/frameworks/js/common", 34049e185fSopenharmony_ci "$MEDIA_ROOT_DIR/frameworks/js/mediasource", 35049e185fSopenharmony_ci "//foundation/multimedia/player_framework/services/utils/include", 36049e185fSopenharmony_ci ] 37049e185fSopenharmony_ci 38049e185fSopenharmony_ci sources = [ 39049e185fSopenharmony_ci "$MEDIA_ROOT_DIR/frameworks/js/mediasource/media_source_napi.cpp", 40049e185fSopenharmony_ci "./media_data_source_callback.cpp", 41049e185fSopenharmony_ci "//foundation/multimedia/player_framework/frameworks/js/avplayer/avplayer_callback.cpp", 42049e185fSopenharmony_ci "//foundation/multimedia/player_framework/frameworks/js/avplayer/avplayer_napi.cpp", 43049e185fSopenharmony_ci "//foundation/multimedia/player_framework/frameworks/js/common/common_napi.cpp", 44049e185fSopenharmony_ci ] 45049e185fSopenharmony_ci 46049e185fSopenharmony_ci cflags = [ 47049e185fSopenharmony_ci "-std=c++17", 48049e185fSopenharmony_ci "-fno-rtti", 49049e185fSopenharmony_ci "-fno-exceptions", 50049e185fSopenharmony_ci "-Wall", 51049e185fSopenharmony_ci "-fno-common", 52049e185fSopenharmony_ci "-fstack-protector-strong", 53049e185fSopenharmony_ci "-Wshadow", 54049e185fSopenharmony_ci "-FPIC", 55049e185fSopenharmony_ci "-FS", 56049e185fSopenharmony_ci "-O2", 57049e185fSopenharmony_ci "-D_FORTIFY_SOURCE=2", 58049e185fSopenharmony_ci "-fvisibility=hidden", 59049e185fSopenharmony_ci "-Wformat=2", 60049e185fSopenharmony_ci "-Wfloat-equal", 61049e185fSopenharmony_ci "-Wdate-time", 62049e185fSopenharmony_ci "-Werror", 63049e185fSopenharmony_ci "-Wextra", 64049e185fSopenharmony_ci "-Wimplicit-fallthrough", 65049e185fSopenharmony_ci "-Wsign-compare", 66049e185fSopenharmony_ci "-Wunused-parameter", 67049e185fSopenharmony_ci ] 68049e185fSopenharmony_ci 69049e185fSopenharmony_ci deps = [ 70049e185fSopenharmony_ci "../../../../../../foundation/multimedia/player_framework/interfaces/inner_api/native:media_client", 71049e185fSopenharmony_ci "../../../../../../foundation/multimedia/player_framework/services/utils:media_service_utils", 72049e185fSopenharmony_ci ] 73049e185fSopenharmony_ci 74049e185fSopenharmony_ci external_deps = [ 75049e185fSopenharmony_ci "audio_framework:audio_client", 76049e185fSopenharmony_ci "av_codec:av_codec_client", 77049e185fSopenharmony_ci "bounds_checking_function:libsec_shared", 78049e185fSopenharmony_ci "bundle_framework:appexecfwk_base", 79049e185fSopenharmony_ci "bundle_framework:appexecfwk_core", 80049e185fSopenharmony_ci "c_utils:utils", 81049e185fSopenharmony_ci "ets_runtime:libark_jsruntime", 82049e185fSopenharmony_ci "eventhandler:libeventhandler", 83049e185fSopenharmony_ci "hilog:libhilog", 84049e185fSopenharmony_ci "hisysevent:libhisysevent", 85049e185fSopenharmony_ci "hitrace:hitrace_meter", 86049e185fSopenharmony_ci "ipc:ipc_core", 87049e185fSopenharmony_ci "libuv:uv", 88049e185fSopenharmony_ci "napi:ace_napi", 89049e185fSopenharmony_ci "os_account:os_account_innerkits", 90049e185fSopenharmony_ci "qos_manager:qos", 91049e185fSopenharmony_ci "samgr:samgr_proxy", 92049e185fSopenharmony_ci ] 93049e185fSopenharmony_ci 94049e185fSopenharmony_ci if (player_framework_support_video) { 95049e185fSopenharmony_ci external_deps += [ "graphic_surface:surface" ] 96049e185fSopenharmony_ci } 97049e185fSopenharmony_ci 98049e185fSopenharmony_ci if (player_framework_support_jsstack) { 99049e185fSopenharmony_ci external_deps += [ "hiview:libxpower_event_js" ] 100049e185fSopenharmony_ci } 101049e185fSopenharmony_ci 102049e185fSopenharmony_ci if (player_framework_support_drm) { 103049e185fSopenharmony_ci external_deps += [ "drm_framework:drm_framework" ] 104049e185fSopenharmony_ci } 105049e185fSopenharmony_ci 106049e185fSopenharmony_ci if (is_arkui_x) { 107049e185fSopenharmony_ci defines += [ "CROSS_PLATFORM" ] 108049e185fSopenharmony_ci } 109049e185fSopenharmony_ci 110049e185fSopenharmony_ci defines = [] 111049e185fSopenharmony_ci defines += player_framework_defines 112049e185fSopenharmony_ci innerapi_tags = [ "platformsdk" ] 113049e185fSopenharmony_ci part_name = "player_framework" 114049e185fSopenharmony_ci subsystem_name = "multimedia" 115049e185fSopenharmony_ci} 116