# 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") ohos_shared_library("media_avplayer") { sanitize = { 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", "//foundation/multimedia/player_framework/services/utils/include", "//third_party/libuv/include", ] sources = [ "./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", "../../../../../../third_party/bounds_checking_function:libsec_shared", ] external_deps = [ "audio_framework:audio_client", "c_utils:utils", "eventhandler:libeventhandler", "hilog:libhilog", "hitrace:hitrace_meter", "napi:ace_napi", "qos_manager:qos", ] if (multimedia_player_framework_support_video) { external_deps += [ "graphic_surface:surface" ] } if (multimedia_player_framework_support_jsstack) { external_deps += [ "hiview:libxpower_event_js" ] } if (multimedia_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" }