• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2021-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.
13#
14import("//build/ohos.gni")
15import("//foundation/multimedia/histreamer/config.gni")
16if (!hst_is_lite_sys) {
17  ohos_kernel_type = ""
18}
19
20group("plugin_minimp3_adapter") {
21  if (ohos_kernel_type == "liteos_m") {
22    deps = [ ":histreamer_plugin_Minimp3_static" ]
23  } else {
24    deps = []
25    deps += [ ":histreamer_plugin_Minimp3Demuxer" ]
26    deps += [ ":histreamer_plugin_Minimp3Decoder" ]
27  }
28}
29
30config("plugin_minimp3_adapter_config") {
31  include_dirs = [
32    "minimp3_adapter",
33    "//foundation/multimedia/histreamer/engine/include",
34    "//third_party/minimp3",
35  ]
36}
37
38if (ohos_kernel_type == "liteos_m") {
39  static_library("histreamer_plugin_Minimp3_static") {
40    sources = [
41      "minimp3_decoder_plugin.cpp",
42      "minimp3_demuxer_plugin.cpp",
43      "minimp3_wrapper.c",
44    ]
45    public_configs = [
46      ":plugin_minimp3_adapter_config",
47      "//foundation/multimedia/histreamer:histreamer_presets",
48    ]
49    public_deps = [
50      "//foundation/multimedia/histreamer/engine/foundation:histreamer_foundation",
51      "//foundation/multimedia/histreamer/engine/plugin:histreamer_plugin_base",
52    ]
53  }
54} else {
55  ohos_shared_library("histreamer_plugin_Minimp3Demuxer") {
56    sanitize = {
57      cfi = true
58      cfi_cross_dso = true
59      debug = false
60      integer_overflow = true
61    }
62    sources = [
63      "minimp3_demuxer_plugin.cpp",
64      "minimp3_wrapper.c",
65    ]
66    public_configs = [
67      ":plugin_minimp3_adapter_config",
68      "//foundation/multimedia/histreamer:histreamer_presets",
69    ]
70    public_deps = [
71      "//foundation/multimedia/histreamer/engine/foundation:histreamer_foundation",
72      "//foundation/multimedia/histreamer/engine/plugin:histreamer_plugin_base",
73    ]
74    relative_install_dir = "media/histreamer_plugins"
75    subsystem_name = "multimedia"
76    part_name = "histreamer"
77  }
78  ohos_shared_library("histreamer_plugin_Minimp3Decoder") {
79    sanitize = {
80      cfi = true
81      cfi_cross_dso = true
82      debug = false
83      integer_overflow = true
84    }
85    sources = [
86      "minimp3_decoder_plugin.cpp",
87      "minimp3_wrapper.c",
88    ]
89    public_configs = [
90      ":plugin_minimp3_adapter_config",
91      "//foundation/multimedia/histreamer:histreamer_presets",
92    ]
93    public_deps = [
94      "//foundation/multimedia/histreamer/engine/foundation:histreamer_foundation",
95      "//foundation/multimedia/histreamer/engine/plugin:histreamer_plugin_intf",
96    ]
97    relative_install_dir = "media/histreamer_plugins"
98    subsystem_name = "multimedia"
99    part_name = "histreamer"
100  }
101}
102