• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2023-2023 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.
13#
14import("//foundation/multimedia/histreamer/config.gni")
15group("plugin_codec_adapter") {
16  deps = []
17  if (hst_is_lite_sys) {
18    print("std hdi codec adapter is not available on lite systems")
19  } else {
20    deps += [ ":histreamer_plugin_CodecAdapter" ]
21  }
22}
23
24config("plugin_codec_adapter_config") {
25  include_dirs = [
26    "//drivers/peripheral/base/",
27    "//drivers/peripheral/codec/hal/include/",
28    "//drivers/peripheral/codec/interfaces/include/",
29    "//drivers/peripheral/display/interfaces/include/",
30    "//foundation/multimedia/histreamer/engine/include/",
31    "//third_party/openmax/api/1.1.2/",
32  ]
33}
34
35ohos_source_set("std_plugin_codec_adapter") {
36  subsystem_name = "multimedia"
37  part_name = "histreamer"
38  sources = [
39    "codec_buffer.cpp",
40    "codec_buffer_pool.cpp",
41    "codec_cmd_executor.cpp",
42    "codec_port.cpp",
43    "codec_utils.cpp",
44    "hdi_codec_adapter.cpp",
45    "hdi_codec_manager.cpp",
46  ]
47  public_deps = [
48    "//foundation/multimedia/histreamer/engine/foundation:histreamer_foundation",
49    "//foundation/multimedia/histreamer/engine/plugin:histreamer_plugin_base",
50  ]
51  external_deps = [ "hdf_core:libpub_utils" ]
52  if (!hst_is_lite_sys) {
53    external_deps += [ "graphic_2d:surface" ]
54  }
55  public_configs = [
56    ":plugin_codec_adapter_config",
57    "//foundation/multimedia/histreamer:histreamer_presets",
58  ]
59}
60
61if (hst_is_lite_sys) {
62  print("std hdi codec adapter is not available on lite systems")
63} else {
64  import("//build/ohos.gni")
65  ohos_shared_library("histreamer_plugin_CodecAdapter") {
66    sanitize = {
67      cfi = true
68      cfi_cross_dso = true
69      debug = false
70      integer_overflow = true
71    }
72    deps = [ ":std_plugin_codec_adapter" ]
73    external_deps = [ "drivers_peripheral_codec:libcodec_hdi_omx_client" ]
74    relative_install_dir = "media/histreamer_plugins"
75    subsystem_name = "multimedia"
76    part_name = "histreamer"
77  }
78}
79