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