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") 15 16ohos_shared_library("libcodec_image_service_2.1") { 17 include_dirs = [ 18 "../utils/include", 19 "config/", 20 "hdi_service/include", 21 "heif/include", 22 "jpeg/include", 23 "vdi", 24 ] 25 sources = [ 26 "config/codec_image_config.cpp", 27 "hdi_service/src/codec_image_service.cpp", 28 "heif/src/codec_heif_decode_service.cpp", 29 "heif/src/codec_heif_encode_service.cpp", 30 "jpeg/src/codec_jpeg_core.cpp", 31 "jpeg/src/codec_jpeg_service.cpp", 32 "../utils/src/buffer_helper.cpp", 33 ] 34 defines = [ "LOG_TAG_IMAGE" ] 35 if (is_standard_system) { 36 external_deps = [ 37 "c_utils:utils", 38 "drivers_interface_codec:libimage_stub_2.1", 39 "drivers_interface_display:libdisplay_buffer_stub_1.0", 40 "drivers_interface_display:libdisplay_buffer_stub_1.1", 41 "drivers_interface_display:libdisplay_composer_stub_1.0", 42 "drivers_interface_display:libhdifd_parcelable", 43 "graphic_surface:buffer_handle", 44 "hdf_core:libhdf_host", 45 "hdf_core:libhdf_ipc_adapter", 46 "hdf_core:libhdf_utils", 47 "hdf_core:libhdi", 48 "hilog:libhilog", 49 "hitrace:hitrace_meter", 50 "ipc:ipc_single", 51 ] 52 } else { 53 external_deps = [ "hilog:libhilog" ] 54 } 55 56 install_images = [ chipset_base_dir ] 57 subsystem_name = "hdf" 58 part_name = "drivers_peripheral_codec" 59} 60 61ohos_shared_library("libcodec_image_driver") { 62 include_dirs = [ 63 "../utils/include", 64 "config/", 65 "hdi_service/include", 66 ] 67 68 sources = [ "hdi_service/src/codec_image_driver.cpp" ] 69 70 deps = [ ":libcodec_image_service_2.1" ] 71 72 defines = [ "LOG_TAG_IMAGE" ] 73 74 if (is_standard_system) { 75 external_deps = [ 76 "c_utils:utils", 77 "drivers_interface_codec:libimage_stub_2.1", 78 "graphic_surface:buffer_handle", 79 "hdf_core:libhdf_host", 80 "hdf_core:libhdf_ipc_adapter", 81 "hdf_core:libhdf_utils", 82 "hdf_core:libhdi", 83 "hilog:libhilog", 84 "ipc:ipc_single", 85 ] 86 } else { 87 external_deps = [ "hilog:libhilog" ] 88 } 89 90 install_images = [ chipset_base_dir ] 91 subsystem_name = "hdf" 92 part_name = "drivers_peripheral_codec" 93 shlib_type = "hdi" 94} 95 96group("codec_image_service") { 97 deps = [ 98 ":libcodec_image_driver", 99 ":libcodec_image_service_2.1", 100 ] 101} 102