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