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")
15
16group("plugin_stream_source") {
17  deps = [ ":histreamer_plugin_StreamSource" ]
18}
19
20ohos_source_set("streamsource") {
21  subsystem_name = "multimedia"
22  part_name = "media_foundation"
23  include_dirs = [ "//foundation/multimedia/media_foundation/engine/include" ]
24  sources = [ "stream_source_plugin.cpp" ]
25  public_deps = [
26    "//foundation/multimedia/media_foundation/engine/foundation:histreamer_foundation",
27    "//foundation/multimedia/media_foundation/engine/plugin:histreamer_plugin_base",
28  ]
29  public_configs =
30      [ "//foundation/multimedia/media_foundation:histreamer_presets" ]
31  if (hst_is_lite_sys) {
32    public_deps += [ "//foundation/multimedia/media_utils_lite:media_common" ]
33  }
34  if (!hst_is_lite_sys) {
35    external_deps = [ "hilog:libhilog" ]
36  }
37}
38
39if (hst_is_lite_sys) {
40  #lite
41  import("//build/lite/config/component/lite_component.gni")
42  lite_library("histreamer_plugin_StreamSource") {
43    if (hst_is_mini_sys) {
44      target_type = "static_library"
45    } else {
46      target_type = "shared_library"
47    }
48    deps = [ ":streamsource" ]
49  }
50} else {
51  #standard
52  import("//build/ohos.gni")
53  ohos_shared_library("histreamer_plugin_StreamSource") {
54    subsystem_name = "multimedia"
55    part_name = "media_foundation"
56    deps = [ ":streamsource" ]
57    external_deps = [ "hilog:libhilog" ]
58    sanitize = {
59      cfi = true
60      cfi_cross_dso = true
61      debug = false
62      integer_overflow = true
63    }
64    relative_install_dir = "media/histreamer_plugins"
65  }
66}
67