1# Copyright (c) 2022 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("//drivers/hdf_core/adapter/uhdf2/uhdf.gni") 16 17declare_args() { 18 drivers_peripheral_codec_support_role = false 19} 20 21ohos_shared_library("libcodec_hdi_omx_server") { 22 include_dirs = [ 23 "//drivers/peripheral/codec/interfaces/include", 24 "//drivers/peripheral/codec/hal/v2.0/hdi_impl/include", 25 "//drivers/peripheral/codec/hal/include", 26 "//third_party/openmax/api/1.1.2", 27 "//drivers/peripheral/base", 28 ] 29 sources = [ 30 "src/codec_adapter.cpp", 31 "src/codec_callback_type_proxy.c", 32 "src/codec_component_capability_config.c", 33 "src/codec_component_manager_service.c", 34 "src/codec_component_manager_stub.c", 35 "src/codec_component_type_driver.c", 36 "src/codec_component_type_service.c", 37 "src/codec_component_type_stub.c", 38 "src/codec_config_parser.c", 39 "src/codec_types.c", 40 "v2.0/hdi_impl/src/codec_dyna_buffer.cpp", 41 "v2.0/hdi_impl/src/codec_handle_buffer.cpp", 42 "v2.0/hdi_impl/src/codec_omx_core.cpp", 43 "v2.0/hdi_impl/src/codec_share_buffer.cpp", 44 "v2.0/hdi_impl/src/component_mgr.cpp", 45 "v2.0/hdi_impl/src/component_node.cpp", 46 "v2.0/hdi_impl/src/icodec_buffer.cpp", 47 ] 48 if (is_standard_system) { 49 external_deps = [ 50 "c_utils:utils", 51 "graphic_chipsetsdk:buffer_handle", 52 "hdf_core:libhdf_host", 53 "hdf_core:libhdf_ipc_adapter", 54 "hdf_core:libhdf_utils", 55 "hiviewdfx_hilog_native:libhilog", 56 ] 57 } else { 58 external_deps = [ "hilog:libhilog" ] 59 } 60 defines = [] 61 if (drivers_peripheral_codec_support_role) { 62 defines += [ "SUPPORT_ROLE" ] 63 } 64 if (use_musl) { 65 if (use_jemalloc && use_jemalloc_dfx_intf) { 66 defines += [ "CONFIG_USE_JEMALLOC_DFX_INTF" ] 67 } 68 } 69 install_images = [ chipset_base_dir ] 70 subsystem_name = "hdf" 71 part_name = "drivers_peripheral_codec" 72} 73 74ohos_shared_library("libcodec_hdi_omx_client") { 75 include_dirs = [ 76 "//drivers/peripheral/codec/interfaces/include", 77 "//drivers/peripheral/codec/hal/include", 78 "//third_party/openmax/api/1.1.2", 79 ] 80 sources = [ 81 "src/codec_callback_type_stub.c", 82 "src/codec_component_manager_proxy.c", 83 "src/codec_component_type_proxy.c", 84 "src/codec_types.c", 85 ] 86 87 if (is_standard_system) { 88 external_deps = [ 89 "c_utils:utils", 90 "graphic_chipsetsdk:buffer_handle", 91 "hdf_core:libhdf_ipc_adapter", 92 "hdf_core:libhdf_utils", 93 "hdf_core:libhdi", 94 "hiviewdfx_hilog_native:libhilog", 95 ] 96 } else { 97 external_deps = [ "hilog:libhilog" ] 98 } 99 install_images = [ chipset_base_dir ] 100 subsystem_name = "hdf" 101 part_name = "drivers_peripheral_codec" 102} 103 104ohos_shared_library("libcodec_hdi_omx_callback_type_service_impl") { 105 include_dirs = [ 106 "//drivers/hdf_core/adapter/uhdf2/include/hdi", 107 "//drivers/peripheral/codec/interfaces/include", 108 "//drivers/peripheral/codec/hal/include", 109 "//third_party/openmax/api/1.1.2", 110 ] 111 sources = [ "src/codec_callback_type_service.c" ] 112 113 if (is_standard_system) { 114 external_deps = [ 115 "c_utils:utils", 116 "hdf_core:libhdf_utils", 117 "hiviewdfx_hilog_native:libhilog", 118 ] 119 } else { 120 external_deps = [ "hilog:libhilog" ] 121 } 122 123 install_images = [ chipset_base_dir ] 124 subsystem_name = "hdf" 125 part_name = "drivers_peripheral_codec" 126} 127 128group("codec_hdi_omx") { 129 deps = [ 130 ":libcodec_hdi_omx_callback_type_service_impl", 131 ":libcodec_hdi_omx_client", 132 ":libcodec_hdi_omx_server", 133 ] 134} 135