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