From a3843b65d3aa0d524bb63e9208c93f29aabb055e Mon Sep 17 00:00:00 2001 From: Sangchul Lee Date: Thu, 24 Apr 2025 08:40:19 +0900 Subject: [PATCH] rtp: Exclude unused elements 60 elements of payloader/depayloader have been excluded. 'exclude-unused-elements' meson option has been added to gst-plugins-good. [Version] 1.24.11-12 [Issue Type] lightweighting Change-Id: I433f73523abbc6773007cdf2af8f08ed06cf1448 Signed-off-by: Sangchul Lee --- packaging/gstreamer.spec | 2 +- subprojects/gst-plugins-good/gst/rtp/gstrtp.c | 16 ++++++ .../gst-plugins-good/gst/rtp/meson.build | 54 +++++++++++++++++++ subprojects/gst-plugins-good/meson.build | 4 ++ .../gst-plugins-good/meson_options.txt | 2 + 5 files changed, 77 insertions(+), 1 deletion(-) diff --git a/packaging/gstreamer.spec b/packaging/gstreamer.spec index 2e757fe234..f4a9bacdcb 100644 --- a/packaging/gstreamer.spec +++ b/packaging/gstreamer.spec @@ -61,7 +61,7 @@ Name: %{_name} Version: 1.24.11 -Release: 11 +Release: 12 Summary: Streaming-Media Framework Runtime License: LGPL-2.0+ Group: Multimedia/Framework diff --git a/subprojects/gst-plugins-good/gst/rtp/gstrtp.c b/subprojects/gst-plugins-good/gst/rtp/gstrtp.c index 180a3f634d..ec1649e842 100644 --- a/subprojects/gst-plugins-good/gst/rtp/gstrtp.c +++ b/subprojects/gst-plugins-good/gst/rtp/gstrtp.c @@ -33,6 +33,7 @@ plugin_init (GstPlugin * plugin) ret |= GST_ELEMENT_REGISTER (rtpac3depay, plugin); ret |= GST_ELEMENT_REGISTER (rtpac3pay, plugin); +#ifndef TIZEN_FEATURE_EXCLUDE_UNUSED_ELEMENTS ret |= GST_ELEMENT_REGISTER (rtpbvdepay, plugin); ret |= GST_ELEMENT_REGISTER (rtpbvpay, plugin); ret |= GST_ELEMENT_REGISTER (rtpceltdepay, plugin); @@ -55,17 +56,21 @@ plugin_init (GstPlugin * plugin) ret |= GST_ELEMENT_REGISTER (rtpgsmpay, plugin); ret |= GST_ELEMENT_REGISTER (rtpamrdepay, plugin); ret |= GST_ELEMENT_REGISTER (rtpamrpay, plugin); +#endif ret |= GST_ELEMENT_REGISTER (rtppcmadepay, plugin); ret |= GST_ELEMENT_REGISTER (rtppcmudepay, plugin); ret |= GST_ELEMENT_REGISTER (rtppcmupay, plugin); ret |= GST_ELEMENT_REGISTER (rtppcmapay, plugin); +#ifndef TIZEN_FEATURE_EXCLUDE_UNUSED_ELEMENTS ret |= GST_ELEMENT_REGISTER (rtpmpadepay, plugin); ret |= GST_ELEMENT_REGISTER (rtpmpapay, plugin); ret |= GST_ELEMENT_REGISTER (rtpmparobustdepay, plugin); ret |= GST_ELEMENT_REGISTER (rtpmpvdepay, plugin); ret |= GST_ELEMENT_REGISTER (rtpmpvpay, plugin); +#endif ret |= GST_ELEMENT_REGISTER (rtpopusdepay, plugin); ret |= GST_ELEMENT_REGISTER (rtpopuspay, plugin); +#ifndef TIZEN_FEATURE_EXCLUDE_UNUSED_ELEMENTS ret |= GST_ELEMENT_REGISTER (rtppassthroughpay, plugin); ret |= GST_ELEMENT_REGISTER (rtph261pay, plugin); ret |= GST_ELEMENT_REGISTER (rtph261depay, plugin); @@ -73,14 +78,18 @@ plugin_init (GstPlugin * plugin) ret |= GST_ELEMENT_REGISTER (rtph263pdepay, plugin); ret |= GST_ELEMENT_REGISTER (rtph263depay, plugin); ret |= GST_ELEMENT_REGISTER (rtph263pay, plugin); +#endif ret |= GST_ELEMENT_REGISTER (rtph264depay, plugin); ret |= GST_ELEMENT_REGISTER (rtph264pay, plugin); ret |= GST_ELEMENT_REGISTER (rtph265depay, plugin); ret |= GST_ELEMENT_REGISTER (rtph265pay, plugin); +#ifndef TIZEN_FEATURE_EXCLUDE_UNUSED_ELEMENTS ret |= GST_ELEMENT_REGISTER (rtpj2kdepay, plugin); ret |= GST_ELEMENT_REGISTER (rtpj2kpay, plugin); +#endif ret |= GST_ELEMENT_REGISTER (rtpjpegdepay, plugin); ret |= GST_ELEMENT_REGISTER (rtpjpegpay, plugin); +#ifndef TIZEN_FEATURE_EXCLUDE_UNUSED_ELEMENTS ret |= GST_ELEMENT_REGISTER (rtpklvdepay, plugin); ret |= GST_ELEMENT_REGISTER (rtpklvpay, plugin); ret |= GST_ELEMENT_REGISTER (rtpL8pay, plugin); @@ -92,6 +101,7 @@ plugin_init (GstPlugin * plugin) ret |= GST_ELEMENT_REGISTER (rtpldacpay, plugin); ret |= GST_ELEMENT_REGISTER (asteriskh263, plugin); ret |= GST_ELEMENT_REGISTER (rtpmp1sdepay, plugin); +#endif ret |= GST_ELEMENT_REGISTER (rtpmp2tdepay, plugin); ret |= GST_ELEMENT_REGISTER (rtpmp2tpay, plugin); ret |= GST_ELEMENT_REGISTER (rtpmp4vpay, plugin); @@ -100,6 +110,7 @@ plugin_init (GstPlugin * plugin) ret |= GST_ELEMENT_REGISTER (rtpmp4adepay, plugin); ret |= GST_ELEMENT_REGISTER (rtpmp4gdepay, plugin); ret |= GST_ELEMENT_REGISTER (rtpmp4gpay, plugin); +#ifndef TIZEN_FEATURE_EXCLUDE_UNUSED_ELEMENTS ret |= GST_ELEMENT_REGISTER (rtpqcelpdepay, plugin); ret |= GST_ELEMENT_REGISTER (rtpqdm2depay, plugin); ret |= GST_ELEMENT_REGISTER (rtpsbcdepay, plugin); @@ -109,6 +120,7 @@ plugin_init (GstPlugin * plugin) ret |= GST_ELEMENT_REGISTER (rtpspeexpay, plugin); ret |= GST_ELEMENT_REGISTER (rtpspeexdepay, plugin); ret |= GST_ELEMENT_REGISTER (rtpsv3vdepay, plugin); +#endif ret |= GST_ELEMENT_REGISTER (rtptheoradepay, plugin); ret |= GST_ELEMENT_REGISTER (rtptheorapay, plugin); ret |= GST_ELEMENT_REGISTER (rtpvorbisdepay, plugin); @@ -117,12 +129,16 @@ plugin_init (GstPlugin * plugin) ret |= GST_ELEMENT_REGISTER (rtpvp8pay, plugin); ret |= GST_ELEMENT_REGISTER (rtpvp9depay, plugin); ret |= GST_ELEMENT_REGISTER (rtpvp9pay, plugin); +#ifndef TIZEN_FEATURE_EXCLUDE_UNUSED_ELEMENTS ret |= GST_ELEMENT_REGISTER (rtpvrawdepay, plugin); ret |= GST_ELEMENT_REGISTER (rtpvrawpay, plugin); +#endif ret |= GST_ELEMENT_REGISTER (rtpstreampay, plugin); ret |= GST_ELEMENT_REGISTER (rtpstreamdepay, plugin); +#ifndef TIZEN_FEATURE_EXCLUDE_UNUSED_ELEMENTS ret |= GST_ELEMENT_REGISTER (rtpisacpay, plugin); ret |= GST_ELEMENT_REGISTER (rtpisacdepay, plugin); +#endif ret |= GST_ELEMENT_REGISTER (rtpredenc, plugin); ret |= GST_ELEMENT_REGISTER (rtpreddec, plugin); ret |= GST_ELEMENT_REGISTER (rtpulpfecdec, plugin); diff --git a/subprojects/gst-plugins-good/gst/rtp/meson.build b/subprojects/gst-plugins-good/gst/rtp/meson.build index 000b91d7ef..370705b861 100644 --- a/subprojects/gst-plugins-good/gst/rtp/meson.build +++ b/subprojects/gst-plugins-good/gst/rtp/meson.build @@ -1,3 +1,56 @@ +if get_option('exclude-unused-elements') # Not using the method of adding list to make it easy to upgrade opensource codes +rtp_sources = [ + 'dboolhuff.c', + 'fnv1hash.c', + 'gstbuffermemory.c', + 'gstrtpelement.c', + 'gstrtp.c', + 'gstrtpchannels.c', + 'gstrtpac3depay.c', + 'gstrtpac3pay.c', + 'gstrtpopuspay.c', + 'gstrtpopusdepay.c', + 'gstrtppcmadepay.c', + 'gstrtppcmudepay.c', + 'gstrtppcmupay.c', + 'gstrtppcmapay.c', + 'gstrtphdrext-colorspace.c', + 'gstrtph264depay.c', + 'gstrtph264pay.c', + 'gstrtph265depay.c', + 'gstrtph265pay.c', + 'gstrtpjpegdepay.c', + 'gstrtpjpegpay.c', + 'gstrtpmp2tdepay.c', + 'gstrtpmp2tpay.c', + 'gstrtpmp4vdepay.c', + 'gstrtpmp4vpay.c', + 'gstrtpmp4gdepay.c', + 'gstrtpmp4gpay.c', + 'gstrtpmp4adepay.c', + 'gstrtpmp4apay.c', + 'gstrtptheoradepay.c', + 'gstrtptheorapay.c', + 'gstrtpvorbisdepay.c', + 'gstrtpvorbispay.c', + 'gstrtpvp8depay.c', + 'gstrtpvp8pay.c', + 'gstrtpvp9depay.c', + 'gstrtpvp9pay.c', + 'gstrtpstreampay.c', + 'gstrtpstreamdepay.c', + 'gstrtputils.c', + 'rtpulpfeccommon.c', + 'gstrtpulpfecdec.c', + 'gstrtpulpfecenc.c', + 'rtpredcommon.c', + 'gstrtpredenc.c', + 'gstrtpreddec.c', + 'rtpstorage.c', + 'rtpstoragestream.c', + 'gstrtpstorage.c', +] +else rtp_sources = [ 'dboolhuff.c', 'fnv1hash.c', @@ -109,6 +162,7 @@ rtp_sources = [ 'gstrtpisacdepay.c', 'gstrtpisacpay.c', ] +endif rtp_args = [ '-Dvp8_norm=gst_rtpvp8_vp8_norm', diff --git a/subprojects/gst-plugins-good/meson.build b/subprojects/gst-plugins-good/meson.build index 5b47ec6d6c..bea91896d0 100644 --- a/subprojects/gst-plugins-good/meson.build +++ b/subprojects/gst-plugins-good/meson.build @@ -488,6 +488,10 @@ if get_option('tv-profile') cdata.set('TIZEN_FEATURE_TRUSTZONE', true) endif +if get_option('exclude-unused-elements') + cdata.set('TIZEN_FEATURE_EXCLUDE_UNUSED_ELEMENTS', true) +endif + # TIZEN_GLOBAL_BUILD_OPTION cdata.set('TIZEN_FEATURE_BASEPARSE_MODIFICATION', true) cdata.set('TIZEN_FEATURE_WAYLAND_ENHANCEMENT', true) diff --git a/subprojects/gst-plugins-good/meson_options.txt b/subprojects/gst-plugins-good/meson_options.txt index 37a51b9469..4fa5170a9b 100644 --- a/subprojects/gst-plugins-good/meson_options.txt +++ b/subprojects/gst-plugins-good/meson_options.txt @@ -142,3 +142,5 @@ option('tbm', type : 'boolean', value : true, description : 'tizen buffer manager') option('tv-profile', type : 'boolean', value : false, description : 'tv-profile') +option('exclude-unused-elements', type : 'boolean', value : true, + description : 'exclude-unused-elements') -- 2.34.1