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 14import("//build/ohos.gni") 15import("//foundation/multimedia/av_codec/config.gni") 16 17config("hcodec_public_cfg") { 18 include_dirs = [ 19 "$av_codec_root_dir/services/engine/codec/video/hcodec/include", 20 "$av_codec_root_dir/services/engine/base/include/", 21 "$av_codec_root_dir/interfaces/inner_api/native/", 22 "$av_codec_root_dir/services/utils/include/", 23 ] 24} 25 26config("hcodec_cfg") { 27 cflags_cc = [ "-fexceptions" ] 28} 29 30ohos_shared_library("hcodec") { 31 install_enable = true 32 subsystem_name = "multimedia" 33 part_name = "av_codec" 34 35 sanitize = { 36 cfi = true 37 cfi_cross_dso = true 38 debug = false 39 } 40 41 sources = [ 42 "hcodec.cpp", 43 "hcodec_api.cpp", 44 "hcodec_list.cpp", 45 "hcodec_state.cpp", 46 "hdecoder.cpp", 47 "hencoder.cpp", 48 "msg_handle_loop.cpp", 49 "param_bundle.cpp", 50 "state_machine.cpp", 51 "type_converter.cpp", 52 ] 53 54 public_configs = [ ":hcodec_public_cfg" ] 55 configs = [ ":hcodec_cfg" ] 56 57 include_dirs = [ 58 "$av_codec_root_dir/../../../third_party/openmax/api/1.1.2", 59 "$av_codec_root_dir/../../../drivers/peripheral/codec/interfaces/include/", 60 "$av_codec_root_dir/../../../drivers/hdf_core/interfaces/inner_api", 61 "$av_codec_root_dir/../../../drivers/hdf_core/interfaces/inner_api/osal/uhdf", 62 "$av_codec_root_dir/interfaces/kits/c/", 63 "$av_codec_root_dir/interfaces/inner_api/native", 64 ] 65 66 deps = [ 67 "$av_codec_root_dir/services/engine/base:av_codec_codec_base", 68 "$av_codec_root_dir/services/utils:av_codec_format", 69 "$av_codec_root_dir/services/utils:av_codec_service_utils", 70 ] 71 72 external_deps = [ 73 "c_utils:utils", 74 "drivers_interface_codec:codec_idl_headers", 75 "drivers_interface_codec:libcodec_proxy_1.0", 76 "graphic_2d:surface", 77 "graphic_2d:sync_fence", 78 "hdf_core:libhdi", 79 "hilog:libhilog", 80 "init:libbegetutil", 81 ] 82} 83