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_hdi_adapter") {
17  if (hst_is_lite_sys) {
18    deps = [ ":histreamer_plugin_HdiAuSink" ]
19  }
20}
21
22if (hst_is_lite_sys) {
23  import("//build/lite/config/component/lite_component.gni")
24  plugin_hdi_adapter_src = [
25    "sink/hos_au_sink.cpp",
26    "utils/hdi_au_utils.cpp",
27  ]
28  config("plugin_hdi_adapter_config") {
29    include_dirs = [
30      "//drivers/peripheral/audio/interfaces/include",
31      "//foundation/multimedia/media_foundation/engine/include",
32    ]
33    ldflags = [ "-lhdi_videodisplayer" ]
34    ldflags += [ "-laudio_hw" ]
35  }
36
37  lite_library("histreamer_plugin_HdiAuSink") {
38    if (hst_is_mini_sys) {
39      target_type = "static_library"
40    } else {
41      target_type = "shared_library"
42    }
43    sources = plugin_hdi_adapter_src
44    public_configs = [
45      ":plugin_hdi_adapter_config",
46      "//foundation/multimedia/media_foundation:histreamer_presets",
47    ]
48    public_deps = [
49      "//foundation/multimedia/media_foundation/engine/foundation:histreamer_foundation",
50      "//foundation/multimedia/media_foundation/engine/plugin:histreamer_plugin_base",
51    ]
52  }
53} else {
54  print("plugin_hdi_adapter is not available on standard systems")
55}
56