• 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.
13
14import("//build/ohos.gni")
15import("../codec.gni")
16
17config("headers_config") {
18  include_dirs = [
19    "../interfaces/include",
20    "../hal/include",
21  ]
22}
23
24ohos_shared_library("libcodec_hdi_omx_server") {
25  include_dirs = [
26    "../hal/v2.0/hdi_impl/include",
27    "../hal/include",
28    "../utils/include",
29  ]
30  configs = [ ":headers_config" ]
31
32  sources = [
33    "../utils/src/codec_util.c",
34    "src/codec_adapter.cpp",
35    "src/codec_callback_type_proxy.c",
36    "src/codec_component_capability_config.c",
37    "src/codec_component_manager_service.c",
38    "src/codec_component_manager_stub.c",
39    "src/codec_component_type_driver.c",
40    "src/codec_component_type_service.c",
41    "src/codec_component_type_stub.c",
42    "src/codec_config_parser.c",
43    "src/codec_death_recipient.cpp",
44    "src/codec_dfx_service.c",
45    "src/codec_types.c",
46    "v2.0/hdi_impl/src/codec_dyna_buffer.cpp",
47    "v2.0/hdi_impl/src/codec_handle_buffer.cpp",
48    "v2.0/hdi_impl/src/codec_omx_core.cpp",
49    "v2.0/hdi_impl/src/codec_share_buffer.cpp",
50    "v2.0/hdi_impl/src/component_mgr.cpp",
51    "v2.0/hdi_impl/src/component_node.cpp",
52    "v2.0/hdi_impl/src/icodec_buffer.cpp",
53  ]
54  if (is_standard_system) {
55    external_deps = [
56      "c_utils:utils",
57      "graphic_surface:buffer_handle",
58      "hdf_core:libhdf_host",
59      "hdf_core:libhdf_ipc_adapter",
60      "hdf_core:libhdf_utils",
61      "hilog:libhilog",
62    ]
63  } else {
64    external_deps = [ "hilog:libhilog" ]
65  }
66  external_deps += [
67    "hitrace:hitrace_meter",
68    "openmax:libopenmax_static",
69  ]
70  defines = [ "LOG_TAG_HDI_SERVER" ]
71  if (drivers_peripheral_codec_feature_set_omx_role) {
72    defines += [ "SUPPORT_ROLE" ]
73  }
74  if (use_musl) {
75    if (musl_use_jemalloc && musl_use_jemalloc_dfx_intf) {
76      defines += [ "CONFIG_USE_JEMALLOC_DFX_INTF" ]
77    }
78  }
79
80  cflags_cc = [ "-fstack-protector-strong" ]
81
82  shlib_type = "hdi"
83  install_images = [ chipset_base_dir ]
84  subsystem_name = "hdf"
85  part_name = "drivers_peripheral_codec"
86}
87
88ohos_static_library("libcodec_hdi_omx_server_static") {
89  include_dirs = [
90    "../interfaces/include",
91    "../hal/v2.0/hdi_impl/include",
92    "../hal/include",
93    "../utils/include",
94  ]
95  sources = [
96    "../utils/src/codec_util.c",
97    "src/codec_adapter.cpp",
98    "src/codec_callback_type_proxy.c",
99    "src/codec_component_capability_config.c",
100    "src/codec_component_manager_service.c",
101    "src/codec_component_manager_stub.c",
102    "src/codec_component_type_driver.c",
103    "src/codec_component_type_service.c",
104    "src/codec_component_type_stub.c",
105    "src/codec_config_parser.c",
106    "src/codec_death_recipient.cpp",
107    "src/codec_dfx_service.c",
108    "src/codec_types.c",
109    "v2.0/hdi_impl/src/codec_dyna_buffer.cpp",
110    "v2.0/hdi_impl/src/codec_handle_buffer.cpp",
111    "v2.0/hdi_impl/src/codec_omx_core.cpp",
112    "v2.0/hdi_impl/src/codec_share_buffer.cpp",
113    "v2.0/hdi_impl/src/component_mgr.cpp",
114    "v2.0/hdi_impl/src/component_node.cpp",
115    "v2.0/hdi_impl/src/icodec_buffer.cpp",
116  ]
117  if (is_standard_system) {
118    external_deps = [
119      "c_utils:utils",
120      "graphic_surface:buffer_handle",
121      "hdf_core:libhdf_host",
122      "hdf_core:libhdf_ipc_adapter",
123      "hdf_core:libhdf_utils",
124      "hilog:libhilog",
125    ]
126  } else {
127    external_deps = [ "hilog:libhilog" ]
128  }
129  external_deps += [
130    "hitrace:hitrace_meter",
131    "openmax:libopenmax_static",
132  ]
133  defines = [ "LOG_TAG_HDI_SERVER" ]
134  if (drivers_peripheral_codec_feature_set_omx_role) {
135    defines += [ "SUPPORT_ROLE" ]
136  }
137  if (use_musl) {
138    if (musl_use_jemalloc && musl_use_jemalloc_dfx_intf) {
139      defines += [ "CONFIG_USE_JEMALLOC_DFX_INTF" ]
140    }
141  }
142  subsystem_name = "hdf"
143  part_name = "drivers_peripheral_codec"
144}
145
146ohos_shared_library("libcodec_hdi_omx_client") {
147  include_dirs = [
148    "../hal/include",
149    "../utils/include",
150  ]
151  public_configs = [ ":headers_config" ]
152  sources = [
153    "../utils/src/codec_util.c",
154    "src/codec_callback_type_stub.c",
155    "src/codec_component_manager_proxy.c",
156    "src/codec_component_type_proxy.c",
157    "src/codec_types.c",
158  ]
159
160  if (is_standard_system) {
161    external_deps = [
162      "c_utils:utils",
163      "graphic_surface:buffer_handle",
164      "hdf_core:libhdf_ipc_adapter",
165      "hdf_core:libhdi",
166      "hdf_core:libpub_utils",
167      "hilog:libhilog",
168    ]
169  } else {
170    external_deps = [ "hilog:libhilog" ]
171  }
172  external_deps += [ "openmax:libopenmax_static" ]
173  defines = [ "LOG_TAG_HDI_CLIENT" ]
174  if (use_musl) {
175    if (musl_use_jemalloc && musl_use_jemalloc_dfx_intf) {
176      defines += [ "CONFIG_USE_JEMALLOC_DFX_INTF" ]
177    }
178  }
179
180  cflags_cc = [ "-fstack-protector-strong" ]
181
182  install_images = [ system_base_dir ]
183  subsystem_name = "hdf"
184  part_name = "drivers_peripheral_codec"
185}
186
187ohos_shared_library("libcodec_hdi_omx_callback_type_service_impl") {
188  include_dirs = [
189    "../hal/include",
190    "../utils/include",
191  ]
192  configs = [ ":headers_config" ]
193
194  sources = [ "src/codec_callback_type_service.c" ]
195
196  if (is_standard_system) {
197    external_deps = [
198      "c_utils:utils",
199      "hdf_core:libhdf_ipc_adapter",
200      "hdf_core:libhdf_utils",
201      "hdf_core:libhdi",
202      "hilog:libhilog",
203    ]
204  } else {
205    external_deps = [ "hilog:libhilog" ]
206  }
207  external_deps += [ "openmax:libopenmax_static" ]
208  defines = [ "LOG_TAG_HDI_CLIENT" ]
209
210  cflags_cc = [ "-fstack-protector-strong" ]
211
212  install_images = [ chipset_base_dir ]
213  innerapi_tags = [ "passthrough" ]
214  subsystem_name = "hdf"
215  part_name = "drivers_peripheral_codec"
216}
217
218group("codec_hdi_omx") {
219  deps = [
220    ":libcodec_hdi_omx_callback_type_service_impl",
221    ":libcodec_hdi_omx_client",
222    ":libcodec_hdi_omx_server",
223  ]
224}
225