From a2b3cc97c1c40a35c8850282113bd813c502e121 Mon Sep 17 00:00:00 2001 From: Sangchul Lee Date: Thu, 24 Apr 2025 08:52:48 +0900 Subject: [PATCH] isomp4: Exclude unused elements Elements below have been excluded. : qtmoovrecover, rtpxqtdepay, ismlmux, mj2mux [Version] 1.24.11-13 [Issue Type] lightweighting Change-Id: Iec1feb8064edb49a8368631041ff85830217e50c Signed-off-by: Sangchul Lee --- packaging/gstreamer.spec | 2 +- .../gst-plugins-good/gst/isomp4/gstqtmuxmap.c | 8 +++++++ .../gst/isomp4/isomp4-plugin.c | 4 ++++ .../gst-plugins-good/gst/isomp4/meson.build | 22 +++++++++++++++++++ 4 files changed, 35 insertions(+), 1 deletion(-) diff --git a/packaging/gstreamer.spec b/packaging/gstreamer.spec index f4a9bacdcb..cf63514d03 100644 --- a/packaging/gstreamer.spec +++ b/packaging/gstreamer.spec @@ -61,7 +61,7 @@ Name: %{_name} Version: 1.24.11 -Release: 12 +Release: 13 Summary: Streaming-Media Framework Runtime License: LGPL-2.0+ Group: Multimedia/Framework diff --git a/subprojects/gst-plugins-good/gst/isomp4/gstqtmuxmap.c b/subprojects/gst-plugins-good/gst/isomp4/gstqtmuxmap.c index 88bc6da2ba..3ab13d5d21 100644 --- a/subprojects/gst-plugins-good/gst/isomp4/gstqtmuxmap.c +++ b/subprojects/gst-plugins-good/gst/isomp4/gstqtmuxmap.c @@ -41,6 +41,10 @@ * SOFTWARE. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include "gstqtmuxmap.h" #include "fourcc.h" @@ -239,6 +243,7 @@ GstQTMuxFormatProp gst_qt_mux_format_list[] = { GST_STATIC_CAPS (TEXT_UTF8), GST_STATIC_CAPS_NONE} , +#ifndef TIZEN_FEATURE_EXCLUDE_UNUSED_ELEMENTS /* Microsoft Smooth Streaming fmp4/isml */ /* TODO add WMV/WMA support */ { @@ -253,6 +258,7 @@ GstQTMuxFormatProp gst_qt_mux_format_list[] = { GST_STATIC_CAPS_NONE, GST_STATIC_CAPS_NONE} , +#endif /* 3GPP Technical Specification 26.244 V7.3.0 * (extended in 3GPP2 File Formats for Multimedia Services) */ { @@ -267,6 +273,7 @@ GstQTMuxFormatProp gst_qt_mux_format_list[] = { GST_STATIC_CAPS (TEXT_UTF8), GST_STATIC_CAPS_NONE} , +#ifndef TIZEN_FEATURE_EXCLUDE_UNUSED_ELEMENTS /* ISO 15444-3: Motion-JPEG-2000 (also ISO base media extension) */ { GST_QT_MUX_FORMAT_MJ2, @@ -281,6 +288,7 @@ GstQTMuxFormatProp gst_qt_mux_format_list[] = { GST_STATIC_CAPS_NONE, GST_STATIC_CAPS_NONE} , +#endif { GST_QT_MUX_FORMAT_NONE, } diff --git a/subprojects/gst-plugins-good/gst/isomp4/isomp4-plugin.c b/subprojects/gst-plugins-good/gst/isomp4/isomp4-plugin.c index c401c5a8c7..f5213d12eb 100644 --- a/subprojects/gst-plugins-good/gst/isomp4/isomp4-plugin.c +++ b/subprojects/gst-plugins-good/gst/isomp4/isomp4-plugin.c @@ -33,9 +33,13 @@ plugin_init (GstPlugin * plugin) gboolean ret = FALSE; ret |= GST_ELEMENT_REGISTER (qtdemux, plugin); +#ifndef TIZEN_FEATURE_EXCLUDE_UNUSED_ELEMENTS ret |= GST_ELEMENT_REGISTER (rtpxqtdepay, plugin); +#endif ret |= GST_ELEMENT_REGISTER (qtmux, plugin); +#ifndef TIZEN_FEATURE_EXCLUDE_UNUSED_ELEMENTS ret |= GST_ELEMENT_REGISTER (qtmoovrecover, plugin); +#endif return ret; } diff --git a/subprojects/gst-plugins-good/gst/isomp4/meson.build b/subprojects/gst-plugins-good/gst/isomp4/meson.build index 19137be4e3..afe48b69a3 100644 --- a/subprojects/gst-plugins-good/gst/isomp4/meson.build +++ b/subprojects/gst-plugins-good/gst/isomp4/meson.build @@ -1,3 +1,24 @@ +if get_option('exclude-unused-elements') # Not using the method of adding list to make it easy to upgrade opensource codes +# remove unused 'gstrtpxqtdepay.c', 'gstqtmoovrecover.c' from the original sources +mp4_sources = [ + 'isomp4-plugin.c', + 'gstisomp4element.c', + 'qtdemux.c', + 'qtdemux_types.c', + 'qtdemux_dump.c', + 'qtdemux_lang.c', + 'qtdemux_tags.c', + 'qtdemux_tree.c', + 'qtdemux-webvtt.c', + 'gstisoff.c', + 'gstqtmux.c', + 'atoms.c', + 'atomsrecovery.c', + 'descriptors.c', + 'properties.c', + 'gstqtmuxmap.c' +] +else mp4_sources = [ 'isomp4-plugin.c', 'gstisomp4element.c', @@ -18,6 +39,7 @@ mp4_sources = [ 'properties.c', 'gstqtmuxmap.c' ] +endif gstisomp4 = library('gstisomp4', mp4_sources, -- 2.34.1