• 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")
15config("histreamer_presets") {
16  include_dirs = [
17    "//foundation/multimedia/media_foundation/engine",
18  ]
19  defines = [
20    "HST_ANY_WITH_NO_RTTI",
21    "MEDIA_OHOS",
22  ]
23  cflags = [
24    "-O2",
25    "-fPIC",
26    "-Wall",
27    "-fexceptions",
28    "-fno-rtti",
29    "-Wno-unused-but-set-variable",
30    "-Wno-format",
31  ]
32  cflags_cc = cflags
33  if (media_foundation_enable_recorder) {
34    defines += [ "RECORDER_SUPPORT" ]
35  }
36  if (media_foundation_enable_video) {
37    defines += [ "VIDEO_SUPPORT" ]
38  }
39  if (media_foundation_enable_avs3da) {
40    defines += [ "AVS3DA_SUPPORT" ]
41  }
42  if (hst_is_lite_sys) {
43    defines += [ "OHOS_LITE" ]
44  }
45}
46
47if (!hst_is_mini_sys) {
48  # L1 & std shared and seprated
49
50  # media_engine_histreamer lib for L1 & std
51  if (hst_is_lite_sys) {
52    group("histreamer") {
53      deps = [
54        ":media_engine_histreamer",
55        "engine/plugin/plugins:histreamer_plugin_store",
56      ]
57    }
58    import("//build/lite/config/component/lite_component.gni")
59    lite_library("media_engine_histreamer") {
60      target_type = "shared_library"
61      include_dirs = [ "//foundation/multimedia/media_foundation/interface" ]
62      sources = []
63      deps = [ "engine/scene/player:histreamer_player" ]
64      if (media_foundation_enable_recorder) {
65        deps += [ "engine/scene/recorder:histreamer_recorder" ]
66      }
67      public_deps = [ "//foundation/multimedia/media_utils_lite:media_common" ]
68      output_name = "media_foundation"
69    }
70    group("media_foundation") {
71    }
72  } else {
73    group("histreamer") {
74      deps = [ "engine/plugin/plugins:histreamer_plugin_store" ]
75    }
76    group("media_foundation") {
77      deps = [
78        "src:media_foundation",
79        "src/capi:capi_packages",
80      ]
81    }
82  }
83} else {
84  # L0 compile as a whole static lib
85  import("//build/lite/config/component/lite_component.gni")
86  lite_library("histreamer") {
87    target_type = "static_library"
88    complete_static_lib = true
89    sources = []
90    include_dirs = [ "//foundation/multimedia/media_foundation/interface" ]
91    deps = [
92      "engine/plugin/plugins:histreamer_plugin_store",
93      "engine/scene/player:histreamer_player",
94    ]
95    if (media_foundation_enable_recorder) {
96      deps += [ "engine/scene/recorder:histreamer_recorder" ]
97    }
98    public_deps = [ "//foundation/multimedia/media_utils_lite:media_common" ]
99  }
100}
101