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("//build/ohos.gni") 15import("//foundation/multimedia/histreamer/config.gni") 16if (!hst_is_lite_sys) { 17 ohos_kernel_type = "" 18} 19 20group("plugin_minimp3_adapter") { 21 if (ohos_kernel_type == "liteos_m") { 22 deps = [ ":histreamer_plugin_Minimp3_static" ] 23 } else { 24 deps = [] 25 deps += [ ":histreamer_plugin_Minimp3Demuxer" ] 26 deps += [ ":histreamer_plugin_Minimp3Decoder" ] 27 } 28} 29 30config("plugin_minimp3_adapter_config") { 31 include_dirs = [ 32 "minimp3_adapter", 33 "//third_party/minimp3", 34 "//foundation/multimedia/histreamer/engine/foundation", 35 ] 36} 37 38if (ohos_kernel_type == "liteos_m") { 39 static_library("histreamer_plugin_Minimp3_static") { 40 sources = [ 41 "minimp3_decoder_plugin.cpp", 42 "minimp3_demuxer_plugin.cpp", 43 "minimp3_wrapper.c", 44 ] 45 public_configs = [ 46 ":plugin_minimp3_adapter_config", 47 "//foundation/multimedia/histreamer:histreamer_presets", 48 ] 49 public_deps = [ 50 "//foundation/multimedia/histreamer/engine/foundation:histreamer_foundation", 51 "//foundation/multimedia/histreamer/engine/plugin:histreamer_plugin_intf", 52 ] 53 } 54} else { 55 ohos_shared_library("histreamer_plugin_Minimp3Demuxer") { 56 sanitize = { 57 cfi = true 58 debug = false 59 } 60 sources = [ 61 "minimp3_demuxer_plugin.cpp", 62 "minimp3_wrapper.c", 63 ] 64 public_configs = [ 65 ":plugin_minimp3_adapter_config", 66 "//foundation/multimedia/histreamer:histreamer_presets", 67 ] 68 public_deps = [ 69 "//foundation/multimedia/histreamer/engine/foundation:histreamer_foundation", 70 "//foundation/multimedia/histreamer/engine/plugin:histreamer_plugin_intf", 71 ] 72 relative_install_dir = "media/histreamer_plugins" 73 subsystem_name = "multimedia" 74 part_name = "multimedia_histreamer" 75 } 76 ohos_shared_library("histreamer_plugin_Minimp3Decoder") { 77 sanitize = { 78 cfi = true 79 debug = false 80 } 81 sources = [ 82 "minimp3_decoder_plugin.cpp", 83 "minimp3_wrapper.c", 84 ] 85 public_configs = [ 86 ":plugin_minimp3_adapter_config", 87 "//foundation/multimedia/histreamer:histreamer_presets", 88 ] 89 public_deps = [ 90 "//foundation/multimedia/histreamer/engine/foundation:histreamer_foundation", 91 "//foundation/multimedia/histreamer/engine/plugin:histreamer_plugin_intf", 92 ] 93 relative_install_dir = "media/histreamer_plugins" 94 subsystem_name = "multimedia" 95 part_name = "multimedia_histreamer" 96 } 97} 98