• 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/media_foundation/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 = "media_foundation"
26  include_dirs = [ "//foundation/multimedia/media_foundation/engine/include" ]
27  sources = [ "file_source_plugin.cpp" ]
28  public_configs =
29      [ "//foundation/multimedia/media_foundation:histreamer_presets" ]
30  public_deps = [
31    "//foundation/multimedia/media_foundation/engine/foundation:histreamer_foundation",
32    "//foundation/multimedia/media_foundation/engine/plugin:histreamer_plugin_base",
33  ]
34  if (hst_is_standard_sys) {
35    external_deps = [
36      "graphic_surface:surface",
37      "hilog:libhilog",
38      "hitrace:hitrace_meter",
39      "ipc:ipc_core",
40    ]
41  }
42}
43
44ohos_source_set("filefdsource") {
45  subsystem_name = "multimedia"
46  part_name = "media_foundation"
47  include_dirs = [ "//foundation/multimedia/media_foundation/engine/include" ]
48  sources = [ "file_fd_source_plugin.cpp" ]
49  public_configs =
50      [ "//foundation/multimedia/media_foundation:histreamer_presets" ]
51  public_deps = [
52    "//foundation/multimedia/media_foundation/engine/foundation:histreamer_foundation",
53    "//foundation/multimedia/media_foundation/engine/plugin:histreamer_plugin_base",
54  ]
55  if (hst_is_standard_sys) {
56    external_deps = [
57      "graphic_surface:surface",
58      "hilog:libhilog",
59      "hitrace:hitrace_meter",
60      "ipc:ipc_core",
61    ]
62  }
63}
64
65if (hst_is_lite_sys) {
66  # lite
67  import("//build/lite/config/component/lite_component.gni")
68  lite_library("histreamer_plugin_FileSource") {
69    if (hst_is_mini_sys) {
70      target_type = "static_library"
71    } else {
72      target_type = "shared_library"
73    }
74    sources = []
75    deps = [ ":filesource" ]
76  }
77
78  lite_library("histreamer_plugin_FileFdSource") {
79    if (hst_is_mini_sys) {
80      target_type = "static_library"
81    } else {
82      target_type = "shared_library"
83    }
84    sources = []
85    deps = [ ":filefdsource" ]
86  }
87} else {
88  # standard
89  import("//build/ohos.gni")
90  ohos_shared_library("histreamer_plugin_FileSource") {
91    subsystem_name = "multimedia"
92    part_name = "media_foundation"
93    deps = [ ":filesource" ]
94    external_deps = [ "hilog:libhilog" ]
95    sanitize = {
96      cfi = true
97      cfi_cross_dso = true
98      debug = false
99      integer_overflow = true
100    }
101    relative_install_dir = "media/histreamer_plugins"
102  }
103
104  ohos_shared_library("histreamer_plugin_FileFdSource") {
105    subsystem_name = "multimedia"
106    part_name = "media_foundation"
107    deps = [ ":filefdsource" ]
108    external_deps = [ "hilog:libhilog" ]
109    sanitize = {
110      cfi = true
111      cfi_cross_dso = true
112      debug = false
113      integer_overflow = true
114    }
115    relative_install_dir = "media/histreamer_plugins"
116  }
117}
118