• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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.
13import("//build/ohos.gni")
14import("../..//codec.gni")
15
16ohos_shared_library("libcodec_component_manager_service_2.0") {
17  include_dirs = [
18    "../../interfaces/include/",
19    "../../utils/include/",
20    "//third_party/openmax/api/1.1.2",
21    "include",
22  ]
23  sources = [
24    "../../utils/src/codec_hcb_util.c",
25    "src/codec_component_config.cpp",
26    "src/codec_component_manager_service.cpp",
27    "src/codec_component_service.cpp",
28    "src/codec_death_recipient.cpp",
29    "src/codec_dfx_service.cpp",
30    "src/codec_dma_buffer.cpp",
31    "src/codec_dyna_buffer.cpp",
32    "src/codec_handle_buffer.cpp",
33    "src/codec_omx_core.cpp",
34    "src/codec_share_buffer.cpp",
35    "src/component_mgr.cpp",
36    "src/component_node.cpp",
37    "src/icodec_buffer.cpp",
38  ]
39
40  if (is_standard_system) {
41    external_deps = [
42      "c_utils:utils",
43      "drivers_interface_codec:codec_idl_headers",
44      "graphic_surface:buffer_handle",
45      "hdf_core:libhdf_host",
46      "hdf_core:libhdf_ipc_adapter",
47      "hdf_core:libhdf_utils",
48      "hdf_core:libhdi",
49      "hilog:libhilog",
50      "hitrace:hitrace_meter",
51      "ipc:ipc_single",
52    ]
53  } else {
54    external_deps = [
55      "hilog:libhilog",
56      "ipc:ipc_single",
57    ]
58  }
59  defines = []
60  if (drivers_peripheral_codec_feature_set_omx_role) {
61    defines += [ "SUPPORT_ROLE" ]
62  }
63  if (use_musl && use_jemalloc && use_jemalloc_dfx_intf) {
64    defines += [ "CONFIG_USE_JEMALLOC_DFX_INTF" ]
65  }
66  license_file = "//third_party/openmax/README.OpenSource"
67  innerapi_tags = [ "passthrough_indirect" ]
68  install_images = [ chipset_base_dir ]
69  subsystem_name = "hdf"
70  part_name = "drivers_peripheral_codec"
71}
72
73ohos_shared_library("libcodec_driver") {
74  include_dirs = [
75    "../../interfaces/include/",
76    "../../utils/include/",
77    "//third_party/openmax/api/1.1.2",
78    "include",
79  ]
80
81  sources = [ "src/codec_component_manager_driver.cpp" ]
82
83  deps = [ ":libcodec_component_manager_service_2.0" ]
84
85  if (is_standard_system) {
86    external_deps = [
87      "c_utils:utils",
88      "drivers_interface_codec:codec_idl_headers",
89      "drivers_interface_codec:libcodec_stub_2.0",
90      "graphic_surface:buffer_handle",
91      "hdf_core:libhdf_host",
92      "hdf_core:libhdf_ipc_adapter",
93      "hdf_core:libhdf_utils",
94      "hdf_core:libhdi",
95      "hilog:libhilog",
96      "ipc:ipc_single",
97    ]
98  } else {
99    external_deps = [
100      "hilog:libhilog",
101      "ipc:ipc_single",
102    ]
103  }
104  license_file = "//third_party/openmax/README.OpenSource"
105  install_images = [ chipset_base_dir ]
106  subsystem_name = "hdf"
107  part_name = "drivers_peripheral_codec"
108  shlib_type = "hdi"
109}
110
111group("codec_idl_omx_service") {
112  deps = [
113    ":libcodec_component_manager_service_2.0",
114    ":libcodec_driver",
115  ]
116}
117