• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
17ohos_executable("codec_decode_test_ipc") {
18  sources = [
19    "//drivers/peripheral/codec/hal/v1.0/share_mem/src/ashmem_wrapper.cpp",
20    "//drivers/peripheral/codec/hal/v1.0/share_mem/src/share_mem.c",
21    "//drivers/peripheral/codec/hdi_service/codec_service_stub/codec_callback_stub.c",
22    "codec_decode_test_ipc.c",
23    "codec_gralloc_wrapper.cpp",
24    "codec_utils.c",
25  ]
26
27  include_dirs = [
28    "//device/soc/${device_company}/${product_name}/hardware/codec/include",
29    "//device/soc/${device_company}/${product_name}/hardware/mpp/include",
30    "//drivers/peripheral/codec/interfaces/include",
31    "//drivers/peripheral/codec/hal/v1.0/share_mem/include",
32    "//drivers/peripheral/codec/hdi_service/codec_proxy",
33    "//drivers/peripheral/codec/hdi_service/codec_service_stub",
34  ]
35
36  cflags_c = [
37    "-Wall",
38    "-Wextra",
39    "-Werror",
40    "-Wno-predefined-identifier-outside-function",
41    "-Wno-macro-redefined",
42    "-Wno-format",
43    "-Wno-unused-parameter",
44    "-Wno-unused-variable",
45    "-fsigned-char",
46    "-fno-common",
47    "-fno-strict-aliasing",
48  ]
49
50  deps = [
51    "//device/soc/${device_company}/${product_name}/hardware/codec:codec_oem_interface",
52    "//device/soc/${device_company}/${product_name}/hardware/mpp:mpp",
53    "//drivers/peripheral/codec/hdi_service:codec_client",
54  ]
55
56  if (is_standard_system) {
57    external_deps = [
58      "c_utils:utils",
59      "drivers_peripheral_display:hdi_gralloc_client",
60      "graphic_chipsetsdk:buffer_handle",
61      "hdf_core:libhdf_host",
62      "hdf_core:libhdf_ipc_adapter",
63      "hdf_core:libhdf_utils",
64      "hdf_core:libhdi",
65      "hiviewdfx_hilog_native:libhilog",
66    ]
67  } else {
68    external_deps = [ "hilog:libhilog" ]
69  }
70
71  subsystem_name = "hdf"
72  part_name = "drivers_peripheral_codec"
73}
74
75ohos_executable("codec_encode_test_ipc") {
76  sources = [
77    "//drivers/peripheral/codec/hal/v1.0/share_mem/src/ashmem_wrapper.cpp",
78    "//drivers/peripheral/codec/hal/v1.0/share_mem/src/share_mem.c",
79    "//drivers/peripheral/codec/hdi_service/codec_service_stub/codec_callback_stub.c",
80    "codec_encode_test_ipc.c",
81    "codec_gralloc_wrapper.cpp",
82    "codec_utils.c",
83  ]
84
85  include_dirs = [
86    "//device/soc/${device_company}/${product_name}/hardware/codec/include",
87    "//device/soc/${device_company}/${product_name}/hardware/mpp/include",
88    "//drivers/peripheral/codec/interfaces/include",
89    "//drivers/peripheral/codec/hal/v1.0/share_mem/include",
90    "//drivers/peripheral/codec/hdi_service/codec_proxy",
91    "//drivers/peripheral/codec/hdi_service/codec_service_stub",
92  ]
93
94  cflags_c = [
95    "-Wall",
96    "-Wextra",
97    "-Werror",
98    "-Wno-predefined-identifier-outside-function",
99    "-Wno-macro-redefined",
100    "-Wno-format",
101    "-Wno-unused-parameter",
102    "-Wno-unused-variable",
103    "-fsigned-char",
104    "-fno-common",
105    "-fno-strict-aliasing",
106  ]
107
108  deps = [
109    "//device/soc/${device_company}/${product_name}/hardware/codec:codec_oem_interface",
110    "//device/soc/${device_company}/${product_name}/hardware/mpp:mpp",
111    "//drivers/peripheral/codec/hdi_service:codec_client",
112  ]
113  if (is_standard_system) {
114    external_deps = [
115      "c_utils:utils",
116      "drivers_peripheral_display:hdi_gralloc_client",
117      "graphic_chipsetsdk:buffer_handle",
118      "hdf_core:libhdf_host",
119      "hdf_core:libhdf_ipc_adapter",
120      "hdf_core:libhdf_utils",
121      "hdf_core:libhdi",
122      "hiviewdfx_hilog_native:libhilog",
123    ]
124  } else {
125    external_deps = [ "hilog:libhilog" ]
126  }
127
128  subsystem_name = "hdf"
129  part_name = "drivers_peripheral_codec"
130}
131
132group("codec_hdi_demo") {
133  deps = [
134    ":codec_decode_test_ipc",
135    ":codec_encode_test_ipc",
136  ]
137}
138