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/histreamer/config.gni") 15group("plugin_file_source") { 16 deps = [ ":histreamer_plugin_FileSource" ] 17} 18 19group("plugin_file_fd_source") { 20 deps = [ ":histreamer_plugin_FileFdSource" ] 21} 22 23source_set("filesource") { 24 sources = [ "file_source_plugin.cpp" ] 25 public_deps = [ 26 "//foundation/multimedia/histreamer/engine/foundation:histreamer_foundation", 27 "//foundation/multimedia/histreamer/engine/plugin:histreamer_plugin_intf", 28 ] 29 public_configs = [ "//foundation/multimedia/histreamer:histreamer_presets" ] 30} 31 32source_set("filefdsource") { 33 sources = [ "file_fd_source_plugin.cpp" ] 34 public_deps = [ 35 "//foundation/multimedia/histreamer/engine/foundation:histreamer_foundation", 36 "//foundation/multimedia/histreamer/engine/plugin:histreamer_plugin_intf", 37 ] 38 public_configs = [ "//foundation/multimedia/histreamer:histreamer_presets" ] 39} 40 41if (hst_is_lite_sys) { 42 # lite 43 import("//build/lite/config/component/lite_component.gni") 44 lite_library("histreamer_plugin_FileSource") { 45 if (ohos_kernel_type == "liteos_m") { 46 target_type = "static_library" 47 } else { 48 target_type = "shared_library" 49 } 50 sources = [] 51 deps = [ ":filesource" ] 52 } 53 lite_library("histreamer_plugin_FileFdSource") { 54 if (ohos_kernel_type == "liteos_m") { 55 target_type = "static_library" 56 } else { 57 target_type = "shared_library" 58 } 59 sources = [] 60 deps = [ ":filefdsource" ] 61 } 62} else { 63 # standard 64 import("//build/ohos.gni") 65 ohos_shared_library("histreamer_plugin_FileSource") { 66 sanitize = { 67 cfi = true 68 debug = false 69 } 70 deps = [ ":filesource" ] 71 relative_install_dir = "media/histreamer_plugins" 72 subsystem_name = "multimedia" 73 part_name = "multimedia_histreamer" 74 } 75 ohos_shared_library("histreamer_plugin_FileFdSource") { 76 sanitize = { 77 cfi = true 78 debug = false 79 } 80 deps = [ ":filefdsource" ] 81 relative_install_dir = "media/histreamer_plugins" 82 subsystem_name = "multimedia" 83 part_name = "multimedia_histreamer" 84 } 85} 86