1# Copyright (C) 2023 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# 14 15import("//build/ohos.gni") 16import("//foundation/multimedia/av_codec/config.gni") 17 18config("plugin_presets") { 19 include_dirs = [ 20 "$av_codec_root_dir/interfaces/kits/c", 21 "$av_codec_root_dir/interfaces/inner_api/native", 22 "$av_codec_root_dir/services/dfx/include", 23 "$av_codec_root_dir/services/utils/include", 24 "$av_codec_root_dir/services/engine/plugin/common", 25 "$av_codec_root_dir/services/engine/plugin/core", 26 "$av_codec_root_dir/services/engine/plugin/interface", 27 "$av_codec_root_dir/services/engine/source/hst_releated", 28 "//third_party/bounds_checking_function/include", 29 ] 30 31 if (target_cpu == "arm64") { 32 av_codec_plugin_path = "\"/system/lib64/media/av_codec_plugins\"" 33 } else { 34 av_codec_plugin_path = "\"/system/lib/media/av_codec_plugins\"" 35 } 36 37 defines = [] 38 defines += av_codec_defines 39 defines += [ 40 "AV_CODEC_PLUGIN_PATH=${av_codec_plugin_path}", 41 "AV_CODEC_PLUGIN_FILE_TAIL=\".z.so\"", 42 ] 43 44 cflags = [ 45 "-fno-exceptions", 46 "-Wall", 47 "-fno-common", 48 "-fstack-protector-all", 49 "-Wshadow", 50 "-FPIC", 51 "-FS", 52 "-O2", 53 "-D_FORTIFY_SOURCE=2", 54 "-Wformat=2", 55 "-Wdate-time", 56 ] 57 58 cflags_cc = [ 59 "-std=c++17", 60 "-fno-rtti", 61 ] 62} 63 64group("av_codec_plugin") { 65 deps = [ "plugins:av_codec_plugin_store" ] 66} 67