1# Copyright (C) 2022 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("//build/ohos/ace/ace.gni") 16import("//foundation/multimedia/player_framework/config.gni") 17 18ohos_shared_library("media_avplayer") { 19 include_dirs = [ 20 "//foundation/multimedia/player_framework/interfaces/inner_api", 21 "//foundation/multimedia/player_framework/frameworks/js/avplayer", 22 "//foundation/multimedia/player_framework/frameworks/js/common", 23 "//foundation/multimedia/player_framework/services/utils/include", 24 "//third_party/libuv/include", 25 "//third_party/bounds_checking_function/include", 26 ] 27 28 sources = [ 29 "//foundation/multimedia/player_framework/frameworks/js/avplayer/avplayer_callback.cpp", 30 "//foundation/multimedia/player_framework/frameworks/js/avplayer/avplayer_napi.cpp", 31 "//foundation/multimedia/player_framework/frameworks/js/common/common_napi.cpp", 32 ] 33 34 cflags = [ 35 "-std=c++17", 36 "-fno-rtti", 37 "-fno-exceptions", 38 "-Wall", 39 "-fno-common", 40 "-fstack-protector-strong", 41 "-Wshadow", 42 "-FPIC", 43 "-FS", 44 "-O2", 45 "-D_FORTIFY_SOURCE=2", 46 "-fvisibility=hidden", 47 "-Wformat=2", 48 "-Wfloat-equal", 49 "-Wdate-time", 50 "-Werror", 51 "-Wextra", 52 "-Wimplicit-fallthrough", 53 "-Wsign-compare", 54 "-Wunused-parameter", 55 ] 56 57 deps = [ 58 "//base/hiviewdfx/hilog/interfaces/native/innerkits:libhilog", 59 "//foundation/arkui/napi:ace_napi", 60 "//foundation/multimedia/player_framework/interfaces/inner_api/native:media_client", 61 "//foundation/multimedia/player_framework/services/utils:media_service_utils", 62 "//third_party/bounds_checking_function:libsec_shared", 63 ] 64 65 if (multimedia_player_framework_support_video) { 66 deps += [ "//foundation/graphic/graphic_2d/frameworks/surface:surface" ] 67 } 68 69 external_deps = [ 70 "c_utils:utils", 71 "hiviewdfx_hilog_native:libhilog", 72 ] 73 74 part_name = "multimedia_player_framework" 75 subsystem_name = "multimedia" 76} 77