1# Copyright (C) 2025 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("//foundation/multimedia/av_codec/config.gni") 16 17config("avc_encoder_public_cfg") { 18 include_dirs = [ 19 "$av_codec_root_dir/services/engine/base/include", 20 "$av_codec_root_dir/services/engine/codec/video/avcencoder", 21 "$av_codec_root_dir/services/engine/codec/video/avcencoder/include", 22 "$av_codec_root_dir/interfaces/inner_api/native", 23 ] 24} 25 26ohos_shared_library("avc_encoder") { 27 branch_protector_ret = "pac_ret" 28 install_enable = true 29 sanitize = av_codec_sanitize 30 public_configs = [ ":avc_encoder_public_cfg" ] 31 include_dirs = [ 32 "$av_codec_root_dir/services/dfx/include", 33 "$av_codec_root_dir/services/engine/common/include", 34 "$av_codec_root_dir/services/utils/include", 35 "$av_codec_root_dir/services/engine/plugin/interface", 36 ] 37 38 defines = [] 39 defines += av_codec_defines 40 41 if (!is_emulator && target_cpu == "arm64") { 42 defines += [ "ARMV8" ] 43 } 44 45 sources = [ 46 "$av_codec_root_dir/services/engine/codec/video/avcencoder/avc_encoder.cpp", 47 "$av_codec_root_dir/services/engine/codec/video/avcencoder/avc_encoder_api.cpp", 48 "$av_codec_root_dir/services/engine/codec/video/avcencoder/avc_encoder_convert.cpp", 49 "$av_codec_root_dir/services/engine/codec/video/avcencoder/avc_encoder_util.cpp", 50 ] 51 52 deps = [ 53 "$av_codec_root_dir/services/engine/base:av_codec_codec_base", 54 "$av_codec_root_dir/services/engine/common:av_codec_engine_common", 55 ] 56 57 public_deps = [ 58 "$av_codec_root_dir/services/dfx:av_codec_service_dfx", 59 "$av_codec_root_dir/services/utils:av_codec_service_utils", 60 ] 61 62 external_deps = [ 63 "bounds_checking_function:libsec_static", 64 "c_utils:utils", 65 "graphic_surface:surface", 66 "graphic_surface:sync_fence", 67 "hilog:libhilog", 68 "hisysevent:libhisysevent", 69 "hitrace:hitrace_meter", 70 "init:libbegetutil", 71 "media_foundation:media_foundation", 72 ] 73 74 subsystem_name = "multimedia" 75 part_name = "av_codec" 76 77 if (build_variant != "user") { 78 defines += [ "BUILD_ENG_VERSION" ] 79 } 80} 81