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# 14 15# build plugin interface 16import("//foundation/multimedia/media_foundation/config.gni") 17ohos_source_set("histreamer_pipeline_base") { 18 subsystem_name = "multimedia" 19 part_name = "media_foundation" 20 include_dirs = [ "//foundation/multimedia/media_foundation/engine/include" ] 21 sources = [ 22 "core/compatible_check.cpp", 23 "core/error_code.cpp", 24 "core/event.cpp", 25 "core/filter_base.cpp", 26 "core/media_sync_manager.cpp", 27 "core/pipeline_core.cpp", 28 "core/port.cpp", 29 "factory/filter_factory.cpp", 30 "filters/common/plugin_settings.cpp", 31 "filters/common/plugin_utils.cpp", 32 ] 33 public_configs = 34 [ "//foundation/multimedia/media_foundation:histreamer_presets" ] 35 public_deps = [ 36 "//foundation/multimedia/media_foundation/engine/foundation:histreamer_foundation", 37 "//foundation/multimedia/media_foundation/engine/plugin:histreamer_plugin_core", 38 ] 39 if (hst_is_standard_sys) { 40 external_deps = [ 41 "graphic_surface:surface", 42 "hilog:libhilog", 43 "hitrace:hitrace_meter", 44 "ipc:ipc_single", 45 ] 46 } 47} 48 49config("histreamer_base_external_config") { 50 include_dirs = [ 51 "//foundation/multimedia/media_foundation/engine/include/pipeline/core", 52 "//foundation/multimedia/media_foundation/engine/include/pipeline/factory", 53 "//foundation/multimedia/media_foundation/engine/include/plugin/common", 54 "//foundation/multimedia/media_foundation/engine/include/plugin/core", 55 "//foundation/multimedia/media_foundation/engine/include/plugin/factory", 56 "//foundation/multimedia/media_foundation/engine/include/plugin/interface", 57 ] 58} 59 60if (hst_is_lite_sys) { 61 import("//build/lite/config/component/lite_component.gni") 62 lite_library("histreamer_base") { 63 if (hst_is_mini_sys) { 64 target_type = "static_library" 65 } else { 66 target_type = "shared_library" 67 } 68 sources = [] 69 deps = [ ":histreamer_pipeline_base" ] 70 } 71} else { 72 import("//build/ohos.gni") 73 ohos_shared_library("histreamer_base") { 74 subsystem_name = "multimedia" 75 part_name = "media_foundation" 76 public_configs = [ ":histreamer_base_external_config" ] 77 public_external_deps = [ "player_framework:media_client" ] 78 deps = [ ":histreamer_pipeline_base" ] 79 external_deps = [ "hilog:libhilog" ] 80 sanitize = { 81 cfi = true 82 cfi_cross_dso = true 83 debug = false 84 integer_overflow = true 85 } 86 } 87} 88 89config("histreamer_codec_filters_external_config") { 90 include_dirs = [ 91 "//foundation/multimedia/media_foundation/engine/scene/standard", 92 "//foundation/multimedia/media_foundation/engine/include/pipeline/filters/codec/audio_decoder", 93 "//foundation/multimedia/media_foundation/engine/include/pipeline/filters/codec/audio_encoder", 94 "//foundation/multimedia/media_foundation/engine/include/pipeline/filters/codec/video_decoder", 95 "//foundation/multimedia/media_foundation/engine/include/pipeline/filters/codec/video_encoder", 96 ] 97} 98 99if (hst_is_lite_sys) { 100 import("//build/lite/config/component/lite_component.gni") 101 lite_library("histreamer_codec_filters") { 102 if (hst_is_mini_sys) { 103 target_type = "static_library" 104 } else { 105 target_type = "shared_library" 106 } 107 sources = [] 108 deps = [ "filters/codec:codec_filters" ] 109 } 110} else { 111 import("//build/ohos.gni") 112 ohos_shared_library("histreamer_codec_filters") { 113 subsystem_name = "multimedia" 114 part_name = "media_foundation" 115 public_configs = [ ":histreamer_codec_filters_external_config" ] 116 deps = [ "filters/codec:codec_filters" ] 117 external_deps = [ "hilog:libhilog" ] 118 sanitize = { 119 cfi = true 120 cfi_cross_dso = true 121 debug = false 122 integer_overflow = true 123 } 124 } 125} 126 127ohos_source_set("histreamer_pipeline") { 128 subsystem_name = "multimedia" 129 part_name = "media_foundation" 130 sources = [] 131 public_configs = 132 [ "//foundation/multimedia/media_foundation:histreamer_presets" ] 133 public_deps = [ 134 ":histreamer_codec_filters", 135 "filters/codec:codec_filters", 136 "filters/demux:demuxer_filter", 137 "filters/muxer:muxer_filter", 138 "filters/sink:audio_sink_filter", 139 "filters/sink:output_sink_filter", 140 "filters/source:audio_capture_filter", 141 "filters/source:media_source_filter", 142 ] 143 if (hst_is_standard_sys) { 144 external_deps = [ "hilog:libhilog" ] 145 } 146 if (media_foundation_enable_video) { 147 public_deps += [ "filters/sink:video_sink_filter" ] 148 if (media_foundation_enable_recorder) { 149 public_deps += [ "filters/source:video_capture_filter" ] 150 } 151 } 152} 153 154if (hst_is_lite_sys) { 155 import("//build/lite/config/component/lite_component.gni") 156 lite_library("histreamer_engine_filters") { 157 if (hst_is_mini_sys) { 158 target_type = "static_library" 159 } else { 160 target_type = "shared_library" 161 } 162 sources = [] 163 deps = [ ":histreamer_pipeline" ] 164 } 165} else { 166 import("//build/ohos.gni") 167 ohos_shared_library("histreamer_engine_filters") { 168 subsystem_name = "multimedia" 169 part_name = "media_foundation" 170 deps = [ ":histreamer_pipeline" ] 171 external_deps = [ "hilog:libhilog" ] 172 sanitize = { 173 cfi = true 174 cfi_cross_dso = true 175 debug = false 176 integer_overflow = true 177 } 178 } 179} 180