1049e185fSopenharmony_ci# Copyright (C) 2023 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("//foundation/multimedia/player_framework/config.gni") 16049e185fSopenharmony_ci 17049e185fSopenharmony_cigroup("capi_packages") { 18049e185fSopenharmony_ci deps = [] 19049e185fSopenharmony_ci if (player_framework_support_capi) { 20049e185fSopenharmony_ci deps += [ 21049e185fSopenharmony_ci "$MEDIA_PLAYER_ROOT_DIR/interfaces/kits/c:avplayer", 22049e185fSopenharmony_ci "$MEDIA_PLAYER_ROOT_DIR/interfaces/kits/c:native_avscreen_capture", 23049e185fSopenharmony_ci ] 24049e185fSopenharmony_ci } 25049e185fSopenharmony_ci} 26049e185fSopenharmony_ci 27049e185fSopenharmony_ciconfig("media_capi_config") { 28049e185fSopenharmony_ci include_dirs = [ 29049e185fSopenharmony_ci "$MEDIA_PLAYER_ROOT_DIR/interfaces/inner_api/native", 30049e185fSopenharmony_ci "$MEDIA_PLAYER_ROOT_DIR/interfaces/kits/c", 31049e185fSopenharmony_ci "$MEDIA_PLAYER_ROOT_DIR/frameworks/native/capi/common", 32049e185fSopenharmony_ci "$MEDIA_PLAYER_ROOT_DIR/services/utils/include", 33049e185fSopenharmony_ci ] 34049e185fSopenharmony_ci 35049e185fSopenharmony_ci cflags = [ 36049e185fSopenharmony_ci "-fno-exceptions", 37049e185fSopenharmony_ci "-Wall", 38049e185fSopenharmony_ci "-fno-common", 39049e185fSopenharmony_ci "-fstack-protector-all", 40049e185fSopenharmony_ci "-Wshadow", 41049e185fSopenharmony_ci "-FPIC", 42049e185fSopenharmony_ci "-FS", 43049e185fSopenharmony_ci "-O2", 44049e185fSopenharmony_ci "-D_FORTIFY_SOURCE=2", 45049e185fSopenharmony_ci "-Wformat=2", 46049e185fSopenharmony_ci "-Wdate-time", 47049e185fSopenharmony_ci ] 48049e185fSopenharmony_ci 49049e185fSopenharmony_ci cflags_cc = [ 50049e185fSopenharmony_ci "-std=c++17", 51049e185fSopenharmony_ci "-fno-rtti", 52049e185fSopenharmony_ci ] 53049e185fSopenharmony_ci} 54049e185fSopenharmony_ci 55049e185fSopenharmony_ciconfig("media_capi_public_config") { 56049e185fSopenharmony_ci include_dirs = [ "$MEDIA_PLAYER_ROOT_DIR/interfaces/kits/c" ] 57049e185fSopenharmony_ci} 58049e185fSopenharmony_ci 59049e185fSopenharmony_ciohos_shared_library("native_avscreen_capture") { 60049e185fSopenharmony_ci stack_protector_ret = true 61049e185fSopenharmony_ci install_enable = true 62049e185fSopenharmony_ci 63049e185fSopenharmony_ci sanitize = { 64049e185fSopenharmony_ci integer_overflow = true 65049e185fSopenharmony_ci ubsan = true 66049e185fSopenharmony_ci boundary_sanitize = true 67049e185fSopenharmony_ci cfi = true 68049e185fSopenharmony_ci cfi_cross_dso = true 69049e185fSopenharmony_ci debug = false 70049e185fSopenharmony_ci } 71049e185fSopenharmony_ci 72049e185fSopenharmony_ci sources = [ "$MEDIA_PLAYER_ROOT_DIR/frameworks/native/capi/screencapture/native_avscreen_capture.cpp" ] 73049e185fSopenharmony_ci 74049e185fSopenharmony_ci configs = [ ":media_capi_config" ] 75049e185fSopenharmony_ci 76049e185fSopenharmony_ci public_configs = [ ":media_capi_public_config" ] 77049e185fSopenharmony_ci 78049e185fSopenharmony_ci deps = [ "$MEDIA_PLAYER_ROOT_DIR/interfaces/inner_api/native:media_client" ] 79049e185fSopenharmony_ci 80049e185fSopenharmony_ci external_deps = [ 81049e185fSopenharmony_ci "av_codec:av_codec_client", 82049e185fSopenharmony_ci "c_utils:utils", 83049e185fSopenharmony_ci "graphic_surface:surface", 84049e185fSopenharmony_ci "hilog:libhilog", 85049e185fSopenharmony_ci "ipc:ipc_core", 86049e185fSopenharmony_ci "media_foundation:media_foundation", 87049e185fSopenharmony_ci "qos_manager:qos", 88049e185fSopenharmony_ci "window_manager:libdm", 89049e185fSopenharmony_ci ] 90049e185fSopenharmony_ci output_extension = "so" 91049e185fSopenharmony_ci subsystem_name = "multimedia" 92049e185fSopenharmony_ci part_name = "player_framework" 93049e185fSopenharmony_ci} 94049e185fSopenharmony_ci 95049e185fSopenharmony_ciohos_shared_library("avplayer") { 96049e185fSopenharmony_ci stack_protector_ret = true 97049e185fSopenharmony_ci install_enable = true 98049e185fSopenharmony_ci 99049e185fSopenharmony_ci sanitize = { 100049e185fSopenharmony_ci integer_overflow = true 101049e185fSopenharmony_ci ubsan = true 102049e185fSopenharmony_ci boundary_sanitize = true 103049e185fSopenharmony_ci cfi = true 104049e185fSopenharmony_ci cfi_cross_dso = true 105049e185fSopenharmony_ci debug = false 106049e185fSopenharmony_ci } 107049e185fSopenharmony_ci 108049e185fSopenharmony_ci configs = [ ":media_capi_config" ] 109049e185fSopenharmony_ci 110049e185fSopenharmony_ci public_configs = [ ":media_capi_public_config" ] 111049e185fSopenharmony_ci 112049e185fSopenharmony_ci sources = [ 113049e185fSopenharmony_ci "$MEDIA_PLAYER_ROOT_DIR/frameworks/native/capi/player/native_avplayer.cpp", 114049e185fSopenharmony_ci ] 115049e185fSopenharmony_ci 116049e185fSopenharmony_ci deps = [ "$MEDIA_PLAYER_ROOT_DIR/interfaces/inner_api/native:media_client" ] 117049e185fSopenharmony_ci 118049e185fSopenharmony_ci external_deps = [ 119049e185fSopenharmony_ci "audio_framework:audio_capturer", 120049e185fSopenharmony_ci "av_codec:av_codec_client", 121049e185fSopenharmony_ci "c_utils:utils", 122049e185fSopenharmony_ci "graphic_surface:surface", 123049e185fSopenharmony_ci "hilog:libhilog", 124049e185fSopenharmony_ci "hisysevent:libhisysevent", 125049e185fSopenharmony_ci "ipc:ipc_core", 126049e185fSopenharmony_ci "media_foundation:media_foundation", 127049e185fSopenharmony_ci "samgr:samgr_proxy", 128049e185fSopenharmony_ci "window_manager:libdm", 129049e185fSopenharmony_ci ] 130049e185fSopenharmony_ci if (player_framework_support_drm) { 131049e185fSopenharmony_ci public_external_deps = [ 132049e185fSopenharmony_ci "drm_framework:drm_framework", 133049e185fSopenharmony_ci "drm_framework:native_drm", 134049e185fSopenharmony_ci ] 135049e185fSopenharmony_ci } 136049e185fSopenharmony_ci 137049e185fSopenharmony_ci defines = [] 138049e185fSopenharmony_ci defines += player_framework_defines 139049e185fSopenharmony_ci 140049e185fSopenharmony_ci output_extension = "so" 141049e185fSopenharmony_ci subsystem_name = "multimedia" 142049e185fSopenharmony_ci part_name = "player_framework" 143049e185fSopenharmony_ci} 144