• 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#
14
15# build plugin interface
16import("//foundation/multimedia/histreamer/config.gni")
17ohos_source_set("histreamer_pipeline_base") {
18  subsystem_name = "multimedia"
19  part_name = "histreamer"
20  include_dirs = [ "//foundation/multimedia/histreamer/engine/include" ]
21  sources = [
22    "core/compatible_check.cpp",
23    "core/error_code.cpp",
24    "core/event.cpp",
25    "core/filter_base.cpp",
26    "core/media_sync_manager.cpp",
27    "core/pipeline_core.cpp",
28    "core/port.cpp",
29    "factory/filter_factory.cpp",
30    "filters/common/plugin_settings.cpp",
31    "filters/common/plugin_utils.cpp",
32  ]
33  public_configs = [ "//foundation/multimedia/histreamer:histreamer_presets" ]
34  public_deps = [
35    "//foundation/multimedia/histreamer/engine/foundation:histreamer_foundation",
36    "//foundation/multimedia/histreamer/engine/plugin:histreamer_plugin_core",
37  ]
38  if (!hst_is_lite_sys) {
39    external_deps = [ "graphic_2d:surface" ]
40  }
41}
42
43config("histreamer_base_external_config") {
44  include_dirs = [
45    "//foundation/multimedia/histreamer/engine/include/pipeline/core",
46    "//foundation/multimedia/histreamer/engine/include/pipeline/factory",
47    "//foundation/multimedia/histreamer/engine/include/plugin/common",
48    "//foundation/multimedia/histreamer/engine/include/plugin/core",
49    "//foundation/multimedia/histreamer/engine/include/plugin/factory",
50    "//foundation/multimedia/histreamer/engine/include/plugin/interface",
51    "//foundation/multimedia/player_framework/interfaces/inner_api/native",
52  ]
53}
54
55if (hst_is_lite_sys) {
56  import("//build/lite/config/component/lite_component.gni")
57  lite_library("histreamer_base") {
58    if (ohos_kernel_type == "liteos_m") {
59      target_type = "static_library"
60    } else {
61      target_type = "shared_library"
62    }
63    sources = []
64    deps = [ ":histreamer_pipeline_base" ]
65  }
66} else {
67  import("//build/ohos.gni")
68  ohos_shared_library("histreamer_base") {
69    public_configs = [ ":histreamer_base_external_config" ]
70    install_enable = true
71    sanitize = {
72      cfi = true
73      cfi_cross_dso = true
74      debug = false
75      integer_overflow = true
76    }
77    deps = [ ":histreamer_pipeline_base" ]
78    subsystem_name = "multimedia"
79    part_name = "histreamer"
80  }
81}
82
83config("histreamer_codec_filters_external_config") {
84  include_dirs = [
85    "//foundation/multimedia/histreamer/engine/scene/standard",
86    "//foundation/multimedia/histreamer/engine/include/pipeline/filters/codec/audio_decoder",
87    "//foundation/multimedia/histreamer/engine/include/pipeline/filters/codec/audio_encoder",
88    "//foundation/multimedia/histreamer/engine/include/pipeline/filters/codec/video_decoder",
89    "//foundation/multimedia/histreamer/engine/include/pipeline/filters/codec/video_encoder",
90  ]
91}
92
93if (hst_is_lite_sys) {
94  import("//build/lite/config/component/lite_component.gni")
95  lite_library("histreamer_codec_filters") {
96    if (ohos_kernel_type == "liteos_m") {
97      target_type = "static_library"
98    } else {
99      target_type = "shared_library"
100    }
101    sources = []
102    deps = [ "filters/codec:codec_filters" ]
103  }
104} else {
105  import("//build/ohos.gni")
106  ohos_shared_library("histreamer_codec_filters") {
107    public_configs = [ ":histreamer_codec_filters_external_config" ]
108    install_enable = true
109    sanitize = {
110      cfi = true
111      cfi_cross_dso = true
112      debug = false
113      integer_overflow = true
114    }
115    deps = [ "filters/codec:codec_filters" ]
116    subsystem_name = "multimedia"
117    part_name = "histreamer"
118  }
119}
120
121ohos_source_set("histreamer_pipeline") {
122  subsystem_name = "multimedia"
123  part_name = "histreamer"
124  sources = []
125  public_configs = [ "//foundation/multimedia/histreamer:histreamer_presets" ]
126  public_deps = [
127    ":histreamer_codec_filters",
128    "filters/codec:codec_filters",
129    "filters/demux:demuxer_filter",
130    "filters/muxer:muxer_filter",
131    "filters/sink:audio_sink_filter",
132    "filters/sink:output_sink_filter",
133    "filters/source:audio_capture_filter",
134    "filters/source:media_source_filter",
135  ]
136  if (histreamer_enable_video) {
137    public_deps += [ "filters/sink:video_sink_filter" ]
138    if (histreamer_enable_recorder) {
139      public_deps += [ "filters/source:video_capture_filter" ]
140    }
141  }
142}
143
144if (hst_is_lite_sys) {
145  import("//build/lite/config/component/lite_component.gni")
146  lite_library("histreamer_engine_filters") {
147    if (ohos_kernel_type == "liteos_m") {
148      target_type = "static_library"
149    } else {
150      target_type = "shared_library"
151    }
152    sources = []
153    deps = [ ":histreamer_pipeline" ]
154  }
155} else {
156  import("//build/ohos.gni")
157  ohos_shared_library("histreamer_engine_filters") {
158    install_enable = true
159    sanitize = {
160      cfi = true
161      cfi_cross_dso = true
162      debug = false
163      integer_overflow = true
164    }
165    deps = [ ":histreamer_pipeline" ]
166    subsystem_name = "multimedia"
167    part_name = "histreamer"
168  }
169}
170