1# Copyright (c) 2022-2023 Shenzhen Kaihong DID 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. 13import("//build/ohos.gni") 14import("../..//codec.gni") 15 16ohos_shared_library("libcodec_component_manager_service_1.0") { 17 include_dirs = [ 18 "../../interfaces/include/", 19 "../../utils/include/", 20 "//third_party/openmax/api/1.1.2", 21 "include", 22 ] 23 sources = [ 24 "../../utils/src/codec_hcb_util.c", 25 "src/codec_component_config.cpp", 26 "src/codec_component_manager_service.cpp", 27 "src/codec_component_service.cpp", 28 "src/codec_dfx_service.cpp", 29 "src/codec_dyna_buffer.cpp", 30 "src/codec_handle_buffer.cpp", 31 "src/codec_omx_core.cpp", 32 "src/codec_share_buffer.cpp", 33 "src/component_mgr.cpp", 34 "src/component_node.cpp", 35 "src/icodec_buffer.cpp", 36 ] 37 38 if (is_standard_system) { 39 external_deps = [ 40 "c_utils:utils", 41 "drivers_interface_codec:codec_idl_headers", 42 "graphic_chipsetsdk:buffer_handle", 43 "hdf_core:libhdf_host", 44 "hdf_core:libhdf_ipc_adapter", 45 "hdf_core:libhdf_utils", 46 "hdf_core:libhdi", 47 "hilog:libhilog", 48 "ipc:ipc_single", 49 ] 50 } else { 51 external_deps = [ 52 "hilog:libhilog", 53 "ipc:ipc_single", 54 ] 55 } 56 defines = [] 57 if (drivers_peripheral_codec_feature_set_omx_role) { 58 defines += [ "SUPPORT_ROLE" ] 59 } 60 if (use_musl && use_jemalloc && use_jemalloc_dfx_intf) { 61 defines += [ "CONFIG_USE_JEMALLOC_DFX_INTF" ] 62 } 63 innerapi_tags = [ "passthrough_indirect" ] 64 install_images = [ chipset_base_dir ] 65 subsystem_name = "hdf" 66 part_name = "drivers_peripheral_codec" 67} 68 69ohos_shared_library("libcodec_driver") { 70 include_dirs = [ 71 "../../interfaces/include/", 72 "../../utils/include/", 73 "//third_party/openmax/api/1.1.2", 74 "include", 75 ] 76 77 sources = [ "src/codec_component_manager_driver.cpp" ] 78 79 deps = [ ":libcodec_component_manager_service_1.0" ] 80 81 if (is_standard_system) { 82 external_deps = [ 83 "c_utils:utils", 84 "drivers_interface_codec:codec_idl_headers", 85 "drivers_interface_codec:libcodec_stub_1.0", 86 "graphic_chipsetsdk:buffer_handle", 87 "hdf_core:libhdf_host", 88 "hdf_core:libhdf_ipc_adapter", 89 "hdf_core:libhdf_utils", 90 "hdf_core:libhdi", 91 "hilog:libhilog", 92 "ipc:ipc_single", 93 ] 94 } else { 95 external_deps = [ 96 "hilog:libhilog", 97 "ipc:ipc_single", 98 ] 99 } 100 101 install_images = [ chipset_base_dir ] 102 subsystem_name = "hdf" 103 part_name = "drivers_peripheral_codec" 104 shlib_type = "hdi" 105} 106 107group("codec_idl_omx_service") { 108 deps = [ 109 ":libcodec_component_manager_service_1.0", 110 ":libcodec_driver", 111 ] 112} 113