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_surface: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 license_file = "//third_party/openmax/README.OpenSource" 76 shlib_type = "hdi" 77 install_images = [ chipset_base_dir ] 78 subsystem_name = "hdf" 79 part_name = "drivers_peripheral_codec" 80} 81 82ohos_static_library("libcodec_hdi_omx_server_static") { 83 include_dirs = [ 84 "../interfaces/include", 85 "../hal/v2.0/hdi_impl/include", 86 "../hal/include", 87 "../utils/include", 88 "//third_party/openmax/api/1.1.2", 89 "../../base", 90 ] 91 sources = [ 92 "../utils/src/codec_util.c", 93 "src/codec_adapter.cpp", 94 "src/codec_callback_type_proxy.c", 95 "src/codec_component_capability_config.c", 96 "src/codec_component_manager_service.c", 97 "src/codec_component_manager_stub.c", 98 "src/codec_component_type_driver.c", 99 "src/codec_component_type_service.c", 100 "src/codec_component_type_stub.c", 101 "src/codec_config_parser.c", 102 "src/codec_death_recipient.cpp", 103 "src/codec_dfx_service.c", 104 "src/codec_types.c", 105 "v2.0/hdi_impl/src/codec_dyna_buffer.cpp", 106 "v2.0/hdi_impl/src/codec_handle_buffer.cpp", 107 "v2.0/hdi_impl/src/codec_omx_core.cpp", 108 "v2.0/hdi_impl/src/codec_share_buffer.cpp", 109 "v2.0/hdi_impl/src/component_mgr.cpp", 110 "v2.0/hdi_impl/src/component_node.cpp", 111 "v2.0/hdi_impl/src/icodec_buffer.cpp", 112 ] 113 if (is_standard_system) { 114 external_deps = [ 115 "c_utils:utils", 116 "graphic_surface:buffer_handle", 117 "hdf_core:libhdf_host", 118 "hdf_core:libhdf_ipc_adapter", 119 "hdf_core:libhdf_utils", 120 "hilog:libhilog", 121 ] 122 } else { 123 external_deps = [ "hilog:libhilog" ] 124 } 125 external_deps += [ "hitrace:hitrace_meter" ] 126 defines = [ "LOG_TAG_HDI_SERVER" ] 127 if (drivers_peripheral_codec_feature_set_omx_role) { 128 defines += [ "SUPPORT_ROLE" ] 129 } 130 if (use_musl) { 131 if (use_jemalloc && use_jemalloc_dfx_intf) { 132 defines += [ "CONFIG_USE_JEMALLOC_DFX_INTF" ] 133 } 134 } 135 license_file = "//third_party/openmax/README.OpenSource" 136 subsystem_name = "hdf" 137 part_name = "drivers_peripheral_codec" 138} 139 140ohos_shared_library("libcodec_hdi_omx_client") { 141 include_dirs = [ 142 "../hal/include", 143 "../utils/include", 144 "//third_party/openmax/api/1.1.2", 145 ] 146 public_configs = [ ":headers_config" ] 147 sources = [ 148 "../utils/src/codec_util.c", 149 "src/codec_callback_type_stub.c", 150 "src/codec_component_manager_proxy.c", 151 "src/codec_component_type_proxy.c", 152 "src/codec_types.c", 153 ] 154 155 if (is_standard_system) { 156 external_deps = [ 157 "c_utils:utils", 158 "graphic_surface:buffer_handle", 159 "hdf_core:libhdf_ipc_adapter", 160 "hdf_core:libhdi", 161 "hdf_core:libpub_utils", 162 "hilog:libhilog", 163 ] 164 } else { 165 external_deps = [ "hilog:libhilog" ] 166 } 167 defines = [ "LOG_TAG_HDI_CLIENT" ] 168 if (use_musl) { 169 if (use_jemalloc && use_jemalloc_dfx_intf) { 170 defines += [ "CONFIG_USE_JEMALLOC_DFX_INTF" ] 171 } 172 } 173 license_file = "//third_party/openmax/README.OpenSource" 174 install_images = [ system_base_dir ] 175 subsystem_name = "hdf" 176 part_name = "drivers_peripheral_codec" 177} 178 179ohos_shared_library("libcodec_hdi_omx_callback_type_service_impl") { 180 include_dirs = [ 181 "../hal/include", 182 "../utils/include", 183 "//third_party/openmax/api/1.1.2", 184 ] 185 configs = [ ":headers_config" ] 186 187 sources = [ "src/codec_callback_type_service.c" ] 188 189 if (is_standard_system) { 190 external_deps = [ 191 "c_utils:utils", 192 "hdf_core:libhdf_ipc_adapter", 193 "hdf_core:libhdf_utils", 194 "hdf_core:libhdi", 195 "hilog:libhilog", 196 ] 197 } else { 198 external_deps = [ "hilog:libhilog" ] 199 } 200 license_file = "//third_party/openmax/README.OpenSource" 201 defines = [ "LOG_TAG_HDI_CLIENT" ] 202 install_images = [ chipset_base_dir ] 203 innerapi_tags = [ "passthrough" ] 204 subsystem_name = "hdf" 205 part_name = "drivers_peripheral_codec" 206} 207 208group("codec_hdi_omx") { 209 deps = [ 210 ":libcodec_hdi_omx_callback_type_service_impl", 211 ":libcodec_hdi_omx_client", 212 ":libcodec_hdi_omx_server", 213 ] 214} 215