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") 15group("plugin_file_source") { 16 deps = [ ":histreamer_plugin_FileSource" ] 17} 18 19group("plugin_file_fd_source") { 20 deps = [ ":histreamer_plugin_FileFdSource" ] 21} 22 23ohos_source_set("filesource") { 24 subsystem_name = "multimedia" 25 part_name = "media_foundation" 26 include_dirs = [ "//foundation/multimedia/media_foundation/engine/include" ] 27 sources = [ "file_source_plugin.cpp" ] 28 public_configs = 29 [ "//foundation/multimedia/media_foundation:histreamer_presets" ] 30 public_deps = [ 31 "//foundation/multimedia/media_foundation/engine/foundation:histreamer_foundation", 32 "//foundation/multimedia/media_foundation/engine/plugin:histreamer_plugin_base", 33 ] 34 if (hst_is_standard_sys) { 35 external_deps = [ 36 "graphic_surface:surface", 37 "hilog:libhilog", 38 "ipc:ipc_core", 39 ] 40 } 41} 42 43ohos_source_set("filefdsource") { 44 subsystem_name = "multimedia" 45 part_name = "media_foundation" 46 include_dirs = [ "//foundation/multimedia/media_foundation/engine/include" ] 47 sources = [ "file_fd_source_plugin.cpp" ] 48 public_configs = 49 [ "//foundation/multimedia/media_foundation:histreamer_presets" ] 50 public_deps = [ 51 "//foundation/multimedia/media_foundation/engine/foundation:histreamer_foundation", 52 "//foundation/multimedia/media_foundation/engine/plugin:histreamer_plugin_base", 53 ] 54 if (hst_is_standard_sys) { 55 external_deps = [ 56 "graphic_surface:surface", 57 "hilog:libhilog", 58 "ipc:ipc_core", 59 ] 60 } 61} 62 63if (hst_is_lite_sys) { 64 # lite 65 import("//build/lite/config/component/lite_component.gni") 66 lite_library("histreamer_plugin_FileSource") { 67 if (hst_is_mini_sys) { 68 target_type = "static_library" 69 } else { 70 target_type = "shared_library" 71 } 72 sources = [] 73 deps = [ ":filesource" ] 74 } 75 76 lite_library("histreamer_plugin_FileFdSource") { 77 if (hst_is_mini_sys) { 78 target_type = "static_library" 79 } else { 80 target_type = "shared_library" 81 } 82 sources = [] 83 deps = [ ":filefdsource" ] 84 } 85} else { 86 # standard 87 import("//build/ohos.gni") 88 ohos_shared_library("histreamer_plugin_FileSource") { 89 subsystem_name = "multimedia" 90 part_name = "media_foundation" 91 deps = [ ":filesource" ] 92 external_deps = [ "hilog:libhilog" ] 93 sanitize = { 94 cfi = true 95 cfi_cross_dso = true 96 debug = false 97 integer_overflow = true 98 } 99 relative_install_dir = "media/histreamer_plugins" 100 } 101 102 ohos_shared_library("histreamer_plugin_FileFdSource") { 103 subsystem_name = "multimedia" 104 part_name = "media_foundation" 105 deps = [ ":filefdsource" ] 106 external_deps = [ "hilog:libhilog" ] 107 sanitize = { 108 cfi = true 109 cfi_cross_dso = true 110 debug = false 111 integer_overflow = true 112 } 113 relative_install_dir = "media/histreamer_plugins" 114 } 115} 116