• 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("//foundation/multimedia/histreamer/config.gni")
15group("plugin_file_source") {
16  deps = [ ":histreamer_plugin_FileSource" ]
17}
18
19group("plugin_file_fd_source") {
20  deps = [ ":histreamer_plugin_FileFdSource" ]
21}
22
23ohos_source_set("filesource") {
24  subsystem_name = "multimedia"
25  part_name = "histreamer"
26  include_dirs = [ "//foundation/multimedia/histreamer/engine/include" ]
27  sources = [ "file_source_plugin.cpp" ]
28  public_deps = [
29    "//foundation/multimedia/histreamer/engine/foundation:histreamer_foundation",
30    "//foundation/multimedia/histreamer/engine/plugin:histreamer_plugin_base",
31  ]
32  if (!hst_is_lite_sys) {
33    external_deps = [ "graphic_2d:surface" ]
34  }
35  public_configs = [ "//foundation/multimedia/histreamer:histreamer_presets" ]
36}
37
38ohos_source_set("filefdsource") {
39  subsystem_name = "multimedia"
40  part_name = "histreamer"
41  include_dirs = [ "//foundation/multimedia/histreamer/engine/include" ]
42  sources = [ "file_fd_source_plugin.cpp" ]
43  public_deps = [
44    "//foundation/multimedia/histreamer/engine/foundation:histreamer_foundation",
45    "//foundation/multimedia/histreamer/engine/plugin:histreamer_plugin_base",
46  ]
47  if (!hst_is_lite_sys) {
48    external_deps = [ "graphic_2d:surface" ]
49  }
50  public_configs = [ "//foundation/multimedia/histreamer:histreamer_presets" ]
51}
52
53if (hst_is_lite_sys) {
54  # lite
55  import("//build/lite/config/component/lite_component.gni")
56  lite_library("histreamer_plugin_FileSource") {
57    if (ohos_kernel_type == "liteos_m") {
58      target_type = "static_library"
59    } else {
60      target_type = "shared_library"
61    }
62    sources = []
63    deps = [ ":filesource" ]
64  }
65  lite_library("histreamer_plugin_FileFdSource") {
66    if (ohos_kernel_type == "liteos_m") {
67      target_type = "static_library"
68    } else {
69      target_type = "shared_library"
70    }
71    sources = []
72    deps = [ ":filefdsource" ]
73  }
74} else {
75  # standard
76  import("//build/ohos.gni")
77  ohos_shared_library("histreamer_plugin_FileSource") {
78    sanitize = {
79      cfi = true
80      cfi_cross_dso = true
81      debug = false
82      integer_overflow = true
83    }
84    deps = [ ":filesource" ]
85    relative_install_dir = "media/histreamer_plugins"
86    subsystem_name = "multimedia"
87    part_name = "histreamer"
88  }
89  ohos_shared_library("histreamer_plugin_FileFdSource") {
90    sanitize = {
91      cfi = true
92      cfi_cross_dso = true
93      debug = false
94      integer_overflow = true
95    }
96    deps = [ ":filefdsource" ]
97    relative_install_dir = "media/histreamer_plugins"
98    subsystem_name = "multimedia"
99    part_name = "histreamer"
100  }
101}
102