# Copyright (c) 2021-2022 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. import("//build/ohos.gni") group("gstplugins_base_packages") { deps = [ ":gstapp", ":gstaudioconvert", ":gstaudioresample", ":gstplayback", ":gstriff", ":gsttypefindfunctions", ":gstvideoconvert", ":gstvideoscale", ] } config("gst_plugins_config") { visibility = [ ":*" ] include_dirs = [ ".", "./gst-libs", "../gst_dfx/", "//third_party/gstreamer/gstreamer", "//third_party/gstreamer/gstreamer/libs", "//third_party/glib/glib", "//third_party/glib", "//third_party/glib/gmodule", "//third_party/zlib/", ] cflags = [ "-Wall", "-Werror", #"-DBUILDING_GST", "-DGST_DISABLE_DEPRECATED", "-DHAVE_CONFIG_H", "-DCOLORSPACE=\"videoconvert\"", "-DLICENSE_TRANSLATIONS_PATH=\"./gst-libs/gst/tag/license-translations.dict\"", "-fno-strict-aliasing", "-Wno-sign-compare", "-Wno-builtin-requires-header", "-DOHOS_EXT_FUNC", "-DOHOS_OPT_COMPAT", "-DOHOS_OPT_CVE", "-DOHOS_OPT_PERFORMANCE", "-DOHOS_OPT_MEMLEAK", "-DOHOS_GLIB_COMPATIBLE", "-Wno-implicit-fallthrough", "-DG_LOG_DOMAIN=\"GStreamer\"", ] } ohos_source_set("gstplayback_source") { sources = [ "gst/playback/gstdecodebin2.c", "gst/playback/gstplay-enum.c", "gst/playback/gstplaybackelement.c", "gst/playback/gstplaybackplugin.c", "gst/playback/gstplaybackutils.c", "gst/playback/gstplaybin2.c", "gst/playback/gstplaysink.c", "gst/playback/gstplaysinkaudioconvert.c", "gst/playback/gstplaysinkconvertbin.c", "gst/playback/gstplaysinkvideoconvert.c", "gst/playback/gststreamsynchronizer.c", "gst/playback/gstsubtitleoverlay.c", "gst/playback/gsturidecodebin.c", ] configs = [ ":gst_plugins_config" ] } ohos_shared_library("gstplayback") { deps = [ ":gstaudio", ":gstpbutils", ":gstplayback_source", ":gstvideo", "//third_party/glib:glib", "//third_party/glib:gobject", "//third_party/gstreamer/gstreamer:gstreamer", ] relative_install_dir = "media/plugins" part_name = "gstreamer" subsystem_name = "thirdparty" } ohos_source_set("gstpbutils_source") { sources = [ "gst-libs/gst/pbutils/codec-utils.c", "gst-libs/gst/pbutils/descriptions.c", "gst-libs/gst/pbutils/encoding-profile.c", "gst-libs/gst/pbutils/encoding-target.c", "gst-libs/gst/pbutils/gstaudiovisualizer.c", "gst-libs/gst/pbutils/gstdiscoverer-types.c", "gst-libs/gst/pbutils/gstdiscoverer.c", "gst-libs/gst/pbutils/gstpluginsbaseversion.c", "gst-libs/gst/pbutils/install-plugins.c", "gst-libs/gst/pbutils/missing-plugins.c", "gst-libs/gst/pbutils/pbutils-enumtypes.c", "gst-libs/gst/pbutils/pbutils.c", ] configs = [ ":gst_plugins_config" ] } ohos_shared_library("gstpbutils") { deps = [ ":gstaudio", ":gstpbutils_source", ":gsttag", ":gstvideo", "//third_party/glib:glib", "//third_party/glib:gobject", "//third_party/gstreamer/gstreamer:gstbase", "//third_party/gstreamer/gstreamer:gstreamer", ] part_name = "gstreamer" subsystem_name = "thirdparty" } ohos_source_set("gsttag_source") { sources = [ "gst-libs/gst/tag/gstid3tag.c", "gst-libs/gst/tag/gsttageditingprivate.c", "gst-libs/gst/tag/gstvorbistag.c", "gst-libs/gst/tag/gstxmptag.c", "gst-libs/gst/tag/id3v2.c", "gst-libs/gst/tag/id3v2frames.c", "gst-libs/gst/tag/lang.c", "gst-libs/gst/tag/licenses.c", "gst-libs/gst/tag/tag-enumtypes.c", "gst-libs/gst/tag/tags.c", "gst-libs/gst/tag/xmpwriter.c", ] configs = [ ":gst_plugins_config" ] } ohos_shared_library("gsttag") { deps = [ ":gsttag_source", "//third_party/glib:glib", "//third_party/glib:gobject", "//third_party/gstreamer/gstreamer:gstbase", "//third_party/gstreamer/gstreamer:gstreamer", "//third_party/zlib:libz", ] part_name = "gstreamer" subsystem_name = "thirdparty" } ohos_source_set("gstfft_source") { sources = [ "gst-libs/gst/fft/gstfft.c", "gst-libs/gst/fft/gstfftf32.c", "gst-libs/gst/fft/gstfftf64.c", "gst-libs/gst/fft/gstffts16.c", "gst-libs/gst/fft/gstffts32.c", "gst-libs/gst/fft/kiss_fft_f32.c", "gst-libs/gst/fft/kiss_fft_f64.c", "gst-libs/gst/fft/kiss_fft_s16.c", "gst-libs/gst/fft/kiss_fft_s32.c", "gst-libs/gst/fft/kiss_fftr_f32.c", "gst-libs/gst/fft/kiss_fftr_f64.c", "gst-libs/gst/fft/kiss_fftr_s16.c", "gst-libs/gst/fft/kiss_fftr_s32.c", ] configs = [ ":gst_plugins_config" ] } ohos_shared_library("gstfft") { deps = [ ":gstfft_source", "//third_party/glib:glib", ] part_name = "gstreamer" subsystem_name = "thirdparty" } ohos_source_set("gstvideo_source") { sources = [ "gst-libs/gst/video/colorbalance.c", "gst-libs/gst/video/colorbalancechannel.c", "gst-libs/gst/video/convertframe.c", "gst-libs/gst/video/gstvideocodecalphameta.c", "gst-libs/gst/video/gstvideodecoder.c", "gst-libs/gst/video/gstvideoencoder.c", "gst-libs/gst/video/gstvideofilter.c", "gst-libs/gst/video/gstvideometa.c", "gst-libs/gst/video/gstvideopool.c", "gst-libs/gst/video/gstvideotimecode.c", "gst-libs/gst/video/gstvideoutils.c", "gst-libs/gst/video/gstvideoutilsprivate.c", "gst-libs/gst/video/navigation.c", "gst-libs/gst/video/video-anc.c", "gst-libs/gst/video/video-chroma.c", "gst-libs/gst/video/video-color.c", "gst-libs/gst/video/video-converter.c", "gst-libs/gst/video/video-dither.c", "gst-libs/gst/video/video-enumtypes.c", "gst-libs/gst/video/video-event.c", "gst-libs/gst/video/video-format.c", "gst-libs/gst/video/video-frame.c", "gst-libs/gst/video/video-hdr.c", "gst-libs/gst/video/video-info.c", "gst-libs/gst/video/video-multiview.c", "gst-libs/gst/video/video-orc-dist.c", "gst-libs/gst/video/video-resampler.c", "gst-libs/gst/video/video-scaler.c", "gst-libs/gst/video/video-tile.c", "gst-libs/gst/video/video.c", "gst-libs/gst/video/videooverlay.c", ] configs = [ ":gst_plugins_config" ] } ohos_shared_library("gstvideo") { deps = [ ":gstvideo_source", "../gst_dfx:gst_trace", "//third_party/glib:glib", "//third_party/glib:gobject", "//third_party/gstreamer/gstreamer:gstbase", "//third_party/gstreamer/gstreamer:gstreamer", ] part_name = "gstreamer" subsystem_name = "thirdparty" } ohos_source_set("gstaudio_source") { sources = [ "gst-libs/gst/audio/audio-buffer.c", "gst-libs/gst/audio/audio-channel-mixer.c", "gst-libs/gst/audio/audio-channels.c", "gst-libs/gst/audio/audio-converter.c", "gst-libs/gst/audio/audio-enumtypes.c", "gst-libs/gst/audio/audio-format.c", "gst-libs/gst/audio/audio-info.c", "gst-libs/gst/audio/audio-quantize.c", "gst-libs/gst/audio/audio-resampler.c", "gst-libs/gst/audio/audio.c", "gst-libs/gst/audio/gstaudioaggregator.c", "gst-libs/gst/audio/gstaudiodecoder.c", "gst-libs/gst/audio/gstaudioencoder.c", "gst-libs/gst/audio/gstaudiofilter.c", "gst-libs/gst/audio/gstaudiometa.c", "gst-libs/gst/audio/gstaudiopack-dist.c", "gst-libs/gst/audio/gstaudioutilsprivate.c", "gst-libs/gst/audio/streamvolume.c", ] configs = [ ":gst_plugins_config" ] } ohos_shared_library("gstaudio") { deps = [ ":gstaudio_source", "//third_party/glib:glib", "//third_party/glib:gobject", "//third_party/gstreamer/gstreamer:gstbase", "//third_party/gstreamer/gstreamer:gstreamer", ] part_name = "gstreamer" subsystem_name = "thirdparty" } ohos_source_set("audioconvert_source") { sources = [ "gst/audioconvert/gstaudioconvert.c", "gst/audioconvert/plugin.c", ] configs = [ ":gst_plugins_config" ] } ohos_shared_library("gstaudioconvert") { deps = [ ":audioconvert_source", ":gstaudio", "//third_party/glib:glib", "//third_party/glib:gobject", "//third_party/gstreamer/gstreamer:gstbase", "//third_party/gstreamer/gstreamer:gstreamer", ] relative_install_dir = "media/plugins" part_name = "gstreamer" subsystem_name = "thirdparty" } ohos_source_set("typefind_source") { sources = [ "gst/typefind/gsttypefindfunctions.c", "gst/typefind/gsttypefindfunctionsdata.c", "gst/typefind/gsttypefindfunctionsplugin.c", "gst/typefind/gsttypefindfunctionsriff.c", "gst/typefind/gsttypefindfunctionsstartwith.c", ] configs = [ ":gst_plugins_config" ] } ohos_shared_library("gsttypefindfunctions") { deps = [ ":typefind_source", "//third_party/glib:glib", "//third_party/gstreamer/gstreamer:gstreamer", ] relative_install_dir = "media/plugins" part_name = "gstreamer" subsystem_name = "thirdparty" } ohos_source_set("subparse_source") { sources = [ "gst/subparse/gstssaparse.c", "gst/subparse/gstsubparse.c", "gst/subparse/gstsubparseelement.c", "gst/subparse/gstsubparseplugin.c", "gst/subparse/mpl2parse.c", "gst/subparse/qttextparse.c", "gst/subparse/samiparse.c", "gst/subparse/tmplayerparse.c", ] configs = [ ":gst_plugins_config" ] } ohos_shared_library("gstsubparse") { deps = [ ":subparse_source", "//third_party/glib:glib", "//third_party/glib:gobject", "//third_party/gstreamer/gstreamer:gstbase", "//third_party/gstreamer/gstreamer:gstreamer", ] relative_install_dir = "media/plugins" part_name = "gstreamer" subsystem_name = "thirdparty" } ohos_source_set("audioresample_source") { sources = [ "gst/audioresample/gstaudioresample.c" ] configs = [ ":gst_plugins_config" ] } ohos_shared_library("gstaudioresample") { deps = [ ":audioresample_source", ":gstaudio", "//third_party/glib:glib", "//third_party/glib:gobject", "//third_party/gstreamer/gstreamer:gstbase", "//third_party/gstreamer/gstreamer:gstreamer", ] relative_install_dir = "media/plugins" part_name = "gstreamer" subsystem_name = "thirdparty" } ohos_source_set("audiorate_source") { sources = [ "gst/audiorate/gstaudiorate.c" ] configs = [ ":gst_plugins_config" ] } ohos_shared_library("gstaudiorate") { deps = [ ":audiorate_source", ":gstaudio", "//third_party/glib:glib", "//third_party/glib:gobject", "//third_party/gstreamer/gstreamer:gstreamer", ] relative_install_dir = "media/plugins" part_name = "gstreamer" subsystem_name = "thirdparty" } ohos_source_set("audiomixer_source") { sources = [ "gst/audiomixer/gstaudiointerleave.c", "gst/audiomixer/gstaudiomixer.c", "gst/audiomixer/gstaudiomixerelement.c", "gst/audiomixer/gstaudiomixerorc-dist.c", ] configs = [ ":gst_plugins_config" ] } ohos_shared_library("gstaudiomixer") { deps = [ ":audiomixer_source", ":gstaudio", "//third_party/glib:glib", "//third_party/glib:gobject", "//third_party/gstreamer/gstreamer:gstbase", "//third_party/gstreamer/gstreamer:gstreamer", ] relative_install_dir = "media/plugins" part_name = "gstreamer" subsystem_name = "thirdparty" } ohos_source_set("rawparse_source") { sources = [ "gst/rawparse/gstrawaudioparse.c", "gst/rawparse/gstrawbaseparse.c", "gst/rawparse/gstrawvideoparse.c", "gst/rawparse/gstunalignedaudioparse.c", "gst/rawparse/gstunalignedvideoparse.c", "gst/rawparse/plugin.c", ] configs = [ ":gst_plugins_config" ] } ohos_shared_library("gstrawparse") { deps = [ ":gstaudio", ":gstvideo", ":rawparse_source", "//third_party/glib:glib", "//third_party/glib:gobject", "//third_party/gstreamer/gstreamer:gstbase", "//third_party/gstreamer/gstreamer:gstreamer", ] relative_install_dir = "media/plugins" part_name = "gstreamer" subsystem_name = "thirdparty" } ohos_source_set("riff_source") { sources = [ "gst-libs/gst/riff/riff-media.c", "gst-libs/gst/riff/riff-read.c", "gst-libs/gst/riff/riff.c", ] configs = [ ":gst_plugins_config" ] } ohos_shared_library("gstriff") { deps = [ ":gstaudio", ":riff_source", "//third_party/glib:glib", "//third_party/glib:gobject", "//third_party/gstreamer/gstplugins_base:gsttag", "//third_party/gstreamer/gstreamer:gstreamer", ] part_name = "gstreamer" subsystem_name = "thirdparty" } ohos_source_set("rtp_source") { sources = [ "gst-libs/gst/rtp/gstrtcpbuffer.c", "gst-libs/gst/rtp/gstrtp-enumtypes.c", "gst-libs/gst/rtp/gstrtpbaseaudiopayload.c", "gst-libs/gst/rtp/gstrtpbasedepayload.c", "gst-libs/gst/rtp/gstrtpbasepayload.c", "gst-libs/gst/rtp/gstrtpbuffer.c", "gst-libs/gst/rtp/gstrtphdrext.c", "gst-libs/gst/rtp/gstrtpmeta.c", "gst-libs/gst/rtp/gstrtppayloads.c", ] configs = [ ":gst_plugins_config" ] } ohos_shared_library("gstrtp") { deps = [ ":rtp_source", "//third_party/glib:glib", "//third_party/glib:gobject", "//third_party/gstreamer/gstreamer:gstbase", "//third_party/gstreamer/gstreamer:gstreamer", ] part_name = "gstreamer" subsystem_name = "thirdparty" } ohos_source_set("videoconvert_source") { sources = [ "gst/videoconvert/gstvideoconvert.c" ] configs = [ ":gst_plugins_config" ] } ohos_shared_library("gstvideoconvert") { deps = [ ":gstvideo", ":videoconvert_source", "//third_party/glib:glib", "//third_party/glib:gobject", "//third_party/gstreamer/gstreamer:gstbase", "//third_party/gstreamer/gstreamer:gstreamer", ] relative_install_dir = "media/plugins" part_name = "gstreamer" subsystem_name = "thirdparty" } ohos_source_set("videoscale_source") { sources = [ "gst/videoscale/gstvideoscale.c" ] configs = [ ":gst_plugins_config" ] } ohos_shared_library("gstvideoscale") { deps = [ ":gstvideo", ":videoscale_source", "//third_party/glib:glib", "//third_party/glib:gobject", "//third_party/gstreamer/gstreamer:gstbase", "//third_party/gstreamer/gstreamer:gstreamer", ] relative_install_dir = "media/plugins" part_name = "gstreamer" subsystem_name = "thirdparty" } ohos_source_set("app_source") { sources = [ "gst/app/gstapp.c", "gst/app/gstappsink.c", "gst/app/gstappsrc.c", ] configs = [ ":gst_plugins_config" ] } ohos_shared_library("gstapp") { deps = [ ":app_source", ":gstapp_plugin", "//third_party/glib:glib", "//third_party/glib:gobject", "//third_party/gstreamer/gstreamer:gstbase", "//third_party/gstreamer/gstreamer:gstreamer", ] relative_install_dir = "media/plugins" part_name = "gstreamer" subsystem_name = "thirdparty" } ohos_source_set("app_source_plugin") { sources = [ "gst-libs/gst/app/app-enumtypes.c", "gst-libs/gst/app/gstappsink.c", "gst-libs/gst/app/gstappsrc.c", ] configs = [ ":gst_plugins_config" ] } ohos_shared_library("gstapp_plugin") { deps = [ ":app_source_plugin", "//third_party/glib:glib", "//third_party/glib:gobject", "//third_party/gstreamer/gstreamer:gstbase", "//third_party/gstreamer/gstreamer:gstreamer", ] part_name = "gstreamer" subsystem_name = "thirdparty" }