# Copyright (c) 2021-2021 Huawei Device Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # # build plugin interface import("//foundation/multimedia/histreamer/config.gni") ohos_source_set("histreamer_pipeline_base") { subsystem_name = "multimedia" part_name = "histreamer" include_dirs = [ "//foundation/multimedia/histreamer/engine/include" ] sources = [ "core/compatible_check.cpp", "core/error_code.cpp", "core/event.cpp", "core/filter_base.cpp", "core/media_sync_manager.cpp", "core/pipeline_core.cpp", "core/port.cpp", "factory/filter_factory.cpp", "filters/common/plugin_settings.cpp", "filters/common/plugin_utils.cpp", ] public_configs = [ "//foundation/multimedia/histreamer:histreamer_presets" ] public_deps = [ "//foundation/multimedia/histreamer/engine/foundation:histreamer_foundation", "//foundation/multimedia/histreamer/engine/plugin:histreamer_plugin_core", ] if (!hst_is_lite_sys) { external_deps = [ "graphic_2d:surface" ] } } config("histreamer_base_external_config") { include_dirs = [ "//foundation/multimedia/histreamer/engine/include/pipeline/core", "//foundation/multimedia/histreamer/engine/include/pipeline/factory", "//foundation/multimedia/histreamer/engine/include/plugin/common", "//foundation/multimedia/histreamer/engine/include/plugin/core", "//foundation/multimedia/histreamer/engine/include/plugin/factory", "//foundation/multimedia/histreamer/engine/include/plugin/interface", "//foundation/multimedia/player_framework/interfaces/inner_api/native", ] } if (hst_is_lite_sys) { import("//build/lite/config/component/lite_component.gni") lite_library("histreamer_base") { if (ohos_kernel_type == "liteos_m") { target_type = "static_library" } else { target_type = "shared_library" } sources = [] deps = [ ":histreamer_pipeline_base" ] } } else { import("//build/ohos.gni") ohos_shared_library("histreamer_base") { public_configs = [ ":histreamer_base_external_config" ] install_enable = true sanitize = { cfi = true cfi_cross_dso = true debug = false integer_overflow = true } deps = [ ":histreamer_pipeline_base" ] subsystem_name = "multimedia" part_name = "histreamer" } } config("histreamer_codec_filters_external_config") { include_dirs = [ "//foundation/multimedia/histreamer/engine/scene/standard", "//foundation/multimedia/histreamer/engine/include/pipeline/filters/codec/audio_decoder", "//foundation/multimedia/histreamer/engine/include/pipeline/filters/codec/audio_encoder", "//foundation/multimedia/histreamer/engine/include/pipeline/filters/codec/video_decoder", "//foundation/multimedia/histreamer/engine/include/pipeline/filters/codec/video_encoder", ] } if (hst_is_lite_sys) { import("//build/lite/config/component/lite_component.gni") lite_library("histreamer_codec_filters") { if (ohos_kernel_type == "liteos_m") { target_type = "static_library" } else { target_type = "shared_library" } sources = [] deps = [ "filters/codec:codec_filters" ] } } else { import("//build/ohos.gni") ohos_shared_library("histreamer_codec_filters") { public_configs = [ ":histreamer_codec_filters_external_config" ] install_enable = true sanitize = { cfi = true cfi_cross_dso = true debug = false integer_overflow = true } deps = [ "filters/codec:codec_filters" ] subsystem_name = "multimedia" part_name = "histreamer" } } ohos_source_set("histreamer_pipeline") { subsystem_name = "multimedia" part_name = "histreamer" sources = [] public_configs = [ "//foundation/multimedia/histreamer:histreamer_presets" ] public_deps = [ ":histreamer_codec_filters", "filters/codec:codec_filters", "filters/demux:demuxer_filter", "filters/muxer:muxer_filter", "filters/sink:audio_sink_filter", "filters/sink:output_sink_filter", "filters/source:audio_capture_filter", "filters/source:media_source_filter", ] if (histreamer_enable_video) { public_deps += [ "filters/sink:video_sink_filter" ] if (histreamer_enable_recorder) { public_deps += [ "filters/source:video_capture_filter" ] } } } if (hst_is_lite_sys) { import("//build/lite/config/component/lite_component.gni") lite_library("histreamer_engine_filters") { if (ohos_kernel_type == "liteos_m") { target_type = "static_library" } else { target_type = "shared_library" } sources = [] deps = [ ":histreamer_pipeline" ] } } else { import("//build/ohos.gni") ohos_shared_library("histreamer_engine_filters") { install_enable = true sanitize = { cfi = true cfi_cross_dso = true debug = false integer_overflow = true } deps = [ ":histreamer_pipeline" ] subsystem_name = "multimedia" part_name = "histreamer" } }