From 919d663fe40643e8bc99eff14da30c454a5461fd Mon Sep 17 00:00:00 2001 From: Sangchul Lee Date: Fri, 25 Apr 2025 10:03:31 +0900 Subject: [PATCH] playback: Exclude unused elements on tv-profile Elements below have been excluded. : decodebin3, uridecodebin3, playbin3 [Version] 1.24.11-15 [Issue Type] lightweighting Change-Id: If294d3dd34b8a5e5ec5bb704b6b9fc9073d2f83b Signed-off-by: Sangchul Lee --- packaging/gstreamer.spec | 2 +- .../gst/playback/gstplaybackplugin.c | 9 ++++++++ .../gst-plugins-base/gst/playback/meson.build | 22 +++++++++++++++++++ subprojects/gst-plugins-base/meson.build | 4 ++++ .../gst-plugins-base/meson_options.txt | 2 ++ 5 files changed, 38 insertions(+), 1 deletion(-) diff --git a/packaging/gstreamer.spec b/packaging/gstreamer.spec index 3a5f616e6a..296f7bbd80 100644 --- a/packaging/gstreamer.spec +++ b/packaging/gstreamer.spec @@ -61,7 +61,7 @@ Name: %{_name} Version: 1.24.11 -Release: 14 +Release: 15 Summary: Streaming-Media Framework Runtime License: LGPL-2.0+ Group: Multimedia/Framework diff --git a/subprojects/gst-plugins-base/gst/playback/gstplaybackplugin.c b/subprojects/gst-plugins-base/gst/playback/gstplaybackplugin.c index 7f9c2c3faa..bb8ea40364 100644 --- a/subprojects/gst-plugins-base/gst/playback/gstplaybackplugin.c +++ b/subprojects/gst-plugins-base/gst/playback/gstplaybackplugin.c @@ -34,6 +34,9 @@ #include "gstplaybackelements.h" +#if !defined(TIZEN_FEATURE_EXCLUDE_UNUSED_ELEMENTS) || !defined(TIZEN_PROFILE_TV) +#define TIZEN_FEATURE_INCLUDE_ELEMENTS +#endif static gboolean plugin_init (GstPlugin * plugin) @@ -41,14 +44,20 @@ plugin_init (GstPlugin * plugin) gboolean res = FALSE; res |= GST_ELEMENT_REGISTER (playbin, plugin); +#ifdef TIZEN_FEATURE_INCLUDE_ELEMENTS res |= GST_ELEMENT_REGISTER (playbin3, plugin); +#endif res |= GST_ELEMENT_REGISTER (playsink, plugin); res |= GST_ELEMENT_REGISTER (subtitleoverlay, plugin); res |= GST_ELEMENT_REGISTER (streamsynchronizer, plugin); res |= GST_ELEMENT_REGISTER (decodebin, plugin); +#ifdef TIZEN_FEATURE_INCLUDE_ELEMENTS res |= GST_ELEMENT_REGISTER (decodebin3, plugin); +#endif res |= GST_ELEMENT_REGISTER (uridecodebin, plugin); +#ifdef TIZEN_FEATURE_INCLUDE_ELEMENTS res |= GST_ELEMENT_REGISTER (uridecodebin3, plugin); +#endif res |= GST_ELEMENT_REGISTER (urisourcebin, plugin); res |= GST_ELEMENT_REGISTER (parsebin, plugin); diff --git a/subprojects/gst-plugins-base/gst/playback/meson.build b/subprojects/gst-plugins-base/gst/playback/meson.build index 05358fa2a5..b040c58e2e 100644 --- a/subprojects/gst-plugins-base/gst/playback/meson.build +++ b/subprojects/gst-plugins-base/gst/playback/meson.build @@ -1,3 +1,24 @@ +if get_option('exclude-unused-elements') and get_option('tv-profile') +# Not using the method of adding list to make it easy to upgrade opensource codes +# remove unused 'gstdecodebin3.c', 'gsturidecodebin3.c', 'gstplaybin3.c' from the original sources +playback_sources = [ + 'gstdecodebin2.c', + 'gsturidecodebin.c', + 'gsturisourcebin.c', + 'gstparsebin.c', + 'gstplaybackplugin.c', + 'gstplaybackelement.c', + 'gstplaybackutils.c', + 'gstplaybin2.c', + 'gstplaysink.c', + 'gstplay-enum.c', + 'gstsubtitleoverlay.c', + 'gstplaysinkvideoconvert.c', + 'gstplaysinkaudioconvert.c', + 'gstplaysinkconvertbin.c', + 'gststreamsynchronizer.c' +] +else playback_sources = [ 'gstdecodebin2.c', 'gstdecodebin3.c', @@ -18,6 +39,7 @@ playback_sources = [ 'gstplaysinkconvertbin.c', 'gststreamsynchronizer.c' ] +endif gstplayback = library('gstplayback', playback_sources, diff --git a/subprojects/gst-plugins-base/meson.build b/subprojects/gst-plugins-base/meson.build index a454537fd5..e3b2758104 100644 --- a/subprojects/gst-plugins-base/meson.build +++ b/subprojects/gst-plugins-base/meson.build @@ -422,6 +422,10 @@ else core_conf.set('TIZEN_FEATURE_RESOURCE_MANAGER', true) endif +if get_option('exclude-unused-elements') + core_conf.set('TIZEN_FEATURE_EXCLUDE_UNUSED_ELEMENTS', true) +endif + # TIZEN_GLOBAL_BUILD_OPTION core_conf.set('TIZEN_FEATURE_BASEPARSE_MODIFICATION', true) diff --git a/subprojects/gst-plugins-base/meson_options.txt b/subprojects/gst-plugins-base/meson_options.txt index e91505c9b5..7a9f828ecd 100644 --- a/subprojects/gst-plugins-base/meson_options.txt +++ b/subprojects/gst-plugins-base/meson_options.txt @@ -97,3 +97,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