# Copyright (C) 2022 Huawei Device Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. import("//build/ohos.gni") import("//build/ohos/ace/ace.gni") import("//foundation/multimedia/player_framework/config.gni") MEDIA_ROOT_DIR = "//foundation/multimedia/player_framework/" ohos_shared_library("media_avplayer") { stack_protector_ret = true sanitize = { integer_overflow = true ubsan = true boundary_sanitize = true cfi = true cfi_cross_dso = true debug = false } include_dirs = [ "//foundation/multimedia/player_framework/interfaces/inner_api", "//foundation/multimedia/player_framework/frameworks/js/avplayer", "//foundation/multimedia/player_framework/frameworks/js/common", "$MEDIA_ROOT_DIR/frameworks/js/mediasource", "//foundation/multimedia/player_framework/services/utils/include", ] sources = [ "$MEDIA_ROOT_DIR/frameworks/js/mediasource/media_source_napi.cpp", "./media_data_source_callback.cpp", "//foundation/multimedia/player_framework/frameworks/js/avplayer/avplayer_callback.cpp", "//foundation/multimedia/player_framework/frameworks/js/avplayer/avplayer_napi.cpp", "//foundation/multimedia/player_framework/frameworks/js/common/common_napi.cpp", ] cflags = [ "-std=c++17", "-fno-rtti", "-fno-exceptions", "-Wall", "-fno-common", "-fstack-protector-strong", "-Wshadow", "-FPIC", "-FS", "-O2", "-D_FORTIFY_SOURCE=2", "-fvisibility=hidden", "-Wformat=2", "-Wfloat-equal", "-Wdate-time", "-Werror", "-Wextra", "-Wimplicit-fallthrough", "-Wsign-compare", "-Wunused-parameter", ] deps = [ "../../../../../../foundation/multimedia/player_framework/interfaces/inner_api/native:media_client", "../../../../../../foundation/multimedia/player_framework/services/utils:media_service_utils", ] external_deps = [ "audio_framework:audio_client", "av_codec:av_codec_client", "bounds_checking_function:libsec_shared", "c_utils:utils", "ets_runtime:libark_jsruntime", "eventhandler:libeventhandler", "hilog:libhilog", "hisysevent:libhisysevent", "hitrace:hitrace_meter", "ipc:ipc_core", "libuv:uv", "napi:ace_napi", "qos_manager:qos", "samgr:samgr_proxy", ] if (player_framework_support_video) { external_deps += [ "graphic_surface:surface" ] } if (player_framework_support_jsstack) { external_deps += [ "hiview:libxpower_event_js" ] } if (player_framework_support_drm) { external_deps += [ "drm_framework:drm_framework" ] } defines = [] defines += player_framework_defines innerapi_tags = [ "platformsdk" ] part_name = "player_framework" subsystem_name = "multimedia" }