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.0") {
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_encode_service.cpp",
29    "jpeg/src/codec_jpeg_core.cpp",
30    "jpeg/src/codec_jpeg_service.cpp",
31  ]
32  defines = [ "LOG_TAG_IMAGE" ]
33  if (is_standard_system) {
34    external_deps = [
35      "c_utils:utils",
36      "drivers_interface_codec:libimage_proxy_2.0",
37      "graphic_surface:buffer_handle",
38      "hdf_core:libhdf_utils",
39      "hdf_core:libhdi",
40      "hilog:libhilog",
41      "hitrace:hitrace_meter",
42      "ipc:ipc_single",
43    ]
44  } else {
45    external_deps = [ "hilog:libhilog" ]
46  }
47
48  install_images = [ chipset_base_dir ]
49  subsystem_name = "hdf"
50  part_name = "drivers_peripheral_codec"
51}
52
53ohos_shared_library("libcodec_image_driver") {
54  include_dirs = [
55    "../utils/include",
56    "config/",
57    "hdi_service/include",
58  ]
59
60  sources = [ "hdi_service/src/codec_image_driver.cpp" ]
61
62  deps = [ ":libcodec_image_service_2.0" ]
63
64  defines = [ "LOG_TAG_IMAGE" ]
65
66  if (is_standard_system) {
67    external_deps = [
68      "c_utils:utils",
69      "drivers_interface_codec:libimage_stub_2.0",
70      "graphic_surface:buffer_handle",
71      "hdf_core:libhdf_host",
72      "hdf_core:libhdf_ipc_adapter",
73      "hdf_core:libhdf_utils",
74      "hdf_core:libhdi",
75      "hilog:libhilog",
76      "ipc:ipc_single",
77    ]
78  } else {
79    external_deps = [ "hilog:libhilog" ]
80  }
81
82  install_images = [ chipset_base_dir ]
83  subsystem_name = "hdf"
84  part_name = "drivers_peripheral_codec"
85  shlib_type = "hdi"
86}
87
88group("codec_image_service") {
89  deps = [
90    ":libcodec_image_driver",
91    ":libcodec_image_service_2.0",
92  ]
93}
94