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. 13 14import("//build/ohos.gni") 15import("../codec.gni") 16 17config("headers_config") { 18 include_dirs = [ "../interfaces/include" ] 19} 20 21ohos_shared_library("libcodec_hdi_omx_server") { 22 include_dirs = [ 23 "../hal/v2.0/hdi_impl/include", 24 "../hal/include", 25 "../utils/include", 26 "//third_party/openmax/api/1.1.2", 27 "../../base", 28 ] 29 configs = [ ":headers_config" ] 30 31 sources = [ 32 "../utils/src/codec_util.c", 33 "src/codec_adapter.cpp", 34 "src/codec_callback_type_proxy.c", 35 "src/codec_component_capability_config.c", 36 "src/codec_component_manager_service.c", 37 "src/codec_component_manager_stub.c", 38 "src/codec_component_type_driver.c", 39 "src/codec_component_type_service.c", 40 "src/codec_component_type_stub.c", 41 "src/codec_config_parser.c", 42 "src/codec_death_recipient.cpp", 43 "src/codec_dfx_service.c", 44 "src/codec_types.c", 45 "v2.0/hdi_impl/src/codec_dyna_buffer.cpp", 46 "v2.0/hdi_impl/src/codec_handle_buffer.cpp", 47 "v2.0/hdi_impl/src/codec_omx_core.cpp", 48 "v2.0/hdi_impl/src/codec_share_buffer.cpp", 49 "v2.0/hdi_impl/src/component_mgr.cpp", 50 "v2.0/hdi_impl/src/component_node.cpp", 51 "v2.0/hdi_impl/src/icodec_buffer.cpp", 52 ] 53 if (is_standard_system) { 54 external_deps = [ 55 "c_utils:utils", 56 "graphic_chipsetsdk:buffer_handle", 57 "hdf_core:libhdf_host", 58 "hdf_core:libhdf_ipc_adapter", 59 "hdf_core:libhdf_utils", 60 "hilog:libhilog", 61 ] 62 } else { 63 external_deps = [ "hilog:libhilog" ] 64 } 65 external_deps += [ "hitrace:hitrace_meter" ] 66 defines = [ "LOG_TAG_HDI_SERVER" ] 67 if (drivers_peripheral_codec_feature_set_omx_role) { 68 defines += [ "SUPPORT_ROLE" ] 69 } 70 if (use_musl) { 71 if (use_jemalloc && use_jemalloc_dfx_intf) { 72 defines += [ "CONFIG_USE_JEMALLOC_DFX_INTF" ] 73 } 74 } 75 shlib_type = "hdi" 76 install_images = [ chipset_base_dir ] 77 subsystem_name = "hdf" 78 part_name = "drivers_peripheral_codec" 79} 80 81ohos_static_library("libcodec_hdi_omx_server_static") { 82 include_dirs = [ 83 "../interfaces/include", 84 "../hal/v2.0/hdi_impl/include", 85 "../hal/include", 86 "../utils/include", 87 "//third_party/openmax/api/1.1.2", 88 "../../base", 89 ] 90 sources = [ 91 "../utils/src/codec_util.c", 92 "src/codec_adapter.cpp", 93 "src/codec_callback_type_proxy.c", 94 "src/codec_component_capability_config.c", 95 "src/codec_component_manager_service.c", 96 "src/codec_component_manager_stub.c", 97 "src/codec_component_type_driver.c", 98 "src/codec_component_type_service.c", 99 "src/codec_component_type_stub.c", 100 "src/codec_config_parser.c", 101 "src/codec_death_recipient.cpp", 102 "src/codec_dfx_service.c", 103 "src/codec_types.c", 104 "v2.0/hdi_impl/src/codec_dyna_buffer.cpp", 105 "v2.0/hdi_impl/src/codec_handle_buffer.cpp", 106 "v2.0/hdi_impl/src/codec_omx_core.cpp", 107 "v2.0/hdi_impl/src/codec_share_buffer.cpp", 108 "v2.0/hdi_impl/src/component_mgr.cpp", 109 "v2.0/hdi_impl/src/component_node.cpp", 110 "v2.0/hdi_impl/src/icodec_buffer.cpp", 111 ] 112 if (is_standard_system) { 113 external_deps = [ 114 "c_utils:utils", 115 "graphic_chipsetsdk:buffer_handle", 116 "hdf_core:libhdf_host", 117 "hdf_core:libhdf_ipc_adapter", 118 "hdf_core:libhdf_utils", 119 "hilog:libhilog", 120 ] 121 } else { 122 external_deps = [ "hilog:libhilog" ] 123 } 124 external_deps += [ "hitrace:hitrace_meter" ] 125 defines = [ "LOG_TAG_HDI_SERVER" ] 126 if (drivers_peripheral_codec_feature_set_omx_role) { 127 defines += [ "SUPPORT_ROLE" ] 128 } 129 if (use_musl) { 130 if (use_jemalloc && use_jemalloc_dfx_intf) { 131 defines += [ "CONFIG_USE_JEMALLOC_DFX_INTF" ] 132 } 133 } 134 subsystem_name = "hdf" 135 part_name = "drivers_peripheral_codec" 136} 137 138ohos_shared_library("libcodec_hdi_omx_client") { 139 include_dirs = [ 140 "../hal/include", 141 "../utils/include", 142 "//third_party/openmax/api/1.1.2", 143 ] 144 public_configs = [ ":headers_config" ] 145 sources = [ 146 "../utils/src/codec_util.c", 147 "src/codec_callback_type_stub.c", 148 "src/codec_component_manager_proxy.c", 149 "src/codec_component_type_proxy.c", 150 "src/codec_types.c", 151 ] 152 153 if (is_standard_system) { 154 external_deps = [ 155 "c_utils:utils", 156 "graphic_chipsetsdk:buffer_handle", 157 "hdf_core:libhdf_ipc_adapter", 158 "hdf_core:libhdi", 159 "hdf_core:libpub_utils", 160 "hilog:libhilog", 161 ] 162 } else { 163 external_deps = [ "hilog:libhilog" ] 164 } 165 defines = [ "LOG_TAG_HDI_CLIENT" ] 166 if (use_musl) { 167 if (use_jemalloc && use_jemalloc_dfx_intf) { 168 defines += [ "CONFIG_USE_JEMALLOC_DFX_INTF" ] 169 } 170 } 171 install_images = [ system_base_dir ] 172 subsystem_name = "hdf" 173 part_name = "drivers_peripheral_codec" 174} 175 176ohos_shared_library("libcodec_hdi_omx_callback_type_service_impl") { 177 include_dirs = [ 178 "../hal/include", 179 "../utils/include", 180 "//third_party/openmax/api/1.1.2", 181 ] 182 configs = [ ":headers_config" ] 183 184 sources = [ "src/codec_callback_type_service.c" ] 185 186 if (is_standard_system) { 187 external_deps = [ 188 "c_utils:utils", 189 "hdf_core:libhdf_ipc_adapter", 190 "hdf_core:libhdf_utils", 191 "hdf_core:libhdi", 192 "hilog:libhilog", 193 ] 194 } else { 195 external_deps = [ "hilog:libhilog" ] 196 } 197 defines = [ "LOG_TAG_HDI_CLIENT" ] 198 install_images = [ chipset_base_dir ] 199 innerapi_tags = [ "chipsetsdk" ] 200 subsystem_name = "hdf" 201 part_name = "drivers_peripheral_codec" 202} 203 204group("codec_hdi_omx") { 205 deps = [ 206 ":libcodec_hdi_omx_callback_type_service_impl", 207 ":libcodec_hdi_omx_client", 208 ":libcodec_hdi_omx_server", 209 ] 210} 211