• 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  if (is_standard_system) {
28    external_deps = [
29      "device_driver_framework:libhdf_host",
30      "device_driver_framework:libhdf_ipc_adapter",
31      "device_driver_framework:libhdf_utils",
32      "device_driver_framework:libhdi",
33      "hiviewdfx_hilog_native:libhilog",
34    ]
35  } else {
36    external_deps = [ "hilog:libhilog" ]
37  }
38
39  install_images = [ chipset_base_dir ]
40  subsystem_name = "hdf"
41  part_name = "codec_device_driver"
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 = "//device/soc/hisilicon/common/hal/media/codec/hi3516dv300/linux_standard/libs"
61  CODEC_LIB_REAL_PATH = rebase_path("$CODEC_LIB_PATH")
62  ldflags = [ "-L$CODEC_LIB_REAL_PATH" ]
63  ldflags += [ "-lcodec" ]
64
65  deps = [ "//drivers/peripheral/codec/hdi_service:codec_client" ]
66
67  if (is_standard_system) {
68    external_deps = [
69      "device_driver_framework:libhdf_host",
70      "device_driver_framework:libhdf_ipc_adapter",
71      "device_driver_framework:libhdf_utils",
72      "device_driver_framework:libhdi",
73      "hiviewdfx_hilog_native:libhilog",
74    ]
75  } else {
76    external_deps = [ "hilog:libhilog" ]
77  }
78
79  install_images = [ chipset_base_dir ]
80  subsystem_name = "hdf"
81  part_name = "codec_device_driver"
82}
83
84group("codec_service") {
85  if (target_cpu == "arm" && device_company == "hisilicon") {
86    deps = [ ":libcodec_server" ]
87  }
88}
89