• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2021 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.
13import("//build/ohos.gni")
14import("//drivers/adapter/uhdf2/uhdf.gni")
15
16ohos_shared_library("libcodec_client") {
17  include_dirs = [
18    "//drivers/adapter/uhdf2/include/hdi",
19    "//drivers/peripheral/codec/interfaces/include/",
20  ]
21  sources = [
22    "codec_proxy/codec_callback_proxy.c",
23    "codec_proxy/codec_proxy.c",
24    "codec_proxy/proxy_msgproc.c",
25  ]
26
27  deps = [
28    "//drivers/adapter/uhdf2/hdi:libhdi",
29    "//drivers/adapter/uhdf2/host:libhdf_host",
30    "//drivers/adapter/uhdf2/ipc:libhdf_ipc_adapter",
31    "//drivers/adapter/uhdf2/osal:libhdf_utils",
32  ]
33
34  if (is_standard_system) {
35    external_deps = [ "hiviewdfx_hilog_native:libhilog" ]
36  } else {
37    external_deps = [ "hilog:libhilog" ]
38  }
39
40  subsystem_name = "hdf"
41  part_name = "hdf"
42}
43
44group("codec_client") {
45  deps = [ ":libcodec_client" ]
46}
47
48ohos_shared_library("libcodec_server") {
49  include_dirs = [
50    "//drivers/peripheral/codec/interfaces/include/",
51    "//drivers/peripheral/codec/hdi_service/codec_proxy/",
52  ]
53  sources = [
54    "codec_service_stub/codec_callback_service.c",
55    "codec_service_stub/codec_callback_stub.c",
56    "codec_service_stub/codec_host.c",
57    "codec_service_stub/codec_stub.c",
58    "codec_service_stub/stub_msgproc.c",
59  ]
60  CODEC_LIB_PATH =
61      "//device/hisilicon/hardware/media/hal/codec/hi3516dv300/llvm/ext/libs"
62  CODEC_LIB_REAL_PATH = rebase_path("$CODEC_LIB_PATH")
63  ldflags = [ "-L$CODEC_LIB_REAL_PATH" ]
64  ldflags += [ "-lcodec" ]
65
66  deps = [
67    "//drivers/adapter/uhdf2/hdi:libhdi",
68    "//drivers/adapter/uhdf2/host:libhdf_host",
69    "//drivers/adapter/uhdf2/ipc:libhdf_ipc_adapter",
70    "//drivers/adapter/uhdf2/osal:libhdf_utils",
71    "//drivers/peripheral/codec/hdi_service:codec_client",
72  ]
73
74  if (is_standard_system) {
75    external_deps = [ "hiviewdfx_hilog_native:libhilog" ]
76  } else {
77    external_deps = [ "hilog:libhilog" ]
78  }
79
80  subsystem_name = "hdf"
81  part_name = "hdf"
82}
83
84group("codec_service") {
85  if (target_cpu == "arm") {
86    deps = [ ":libcodec_server" ]
87  }
88}
89