playback: Exclude unused elements on tv-profile 67/323267/1
authorSangchul Lee <sc11.lee@samsung.com>
Fri, 25 Apr 2025 01:03:31 +0000 (10:03 +0900)
committerSangchul Lee <sc11.lee@samsung.com>
Fri, 25 Apr 2025 01:17:44 +0000 (10:17 +0900)
Elements below have been excluded.
 : decodebin3, uridecodebin3, playbin3

[Version] 1.24.11-15
[Issue Type] lightweighting

Change-Id: If294d3dd34b8a5e5ec5bb704b6b9fc9073d2f83b
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
packaging/gstreamer.spec
subprojects/gst-plugins-base/gst/playback/gstplaybackplugin.c
subprojects/gst-plugins-base/gst/playback/meson.build
subprojects/gst-plugins-base/meson.build
subprojects/gst-plugins-base/meson_options.txt

index 3a5f616e6a6877c79ab0613b59fb23e4a05fe5da..296f7bbd804915f53482f97e81a1b306da377e43 100644 (file)
@@ -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
index 7f9c2c3faaef958e65606e6679a3334acb4bf4cd..bb8ea403646aaa32c8599daf8b0bc26972da201f 100644 (file)
@@ -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);
 
index 05358fa2a55b874997546d804230687a6e4a0de2..b040c58e2eb45dda06cc9a9b340bf9b6189ce4ba 100644 (file)
@@ -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,
index a454537fd5c963b6c0bf444fef2a2929e4fa11db..e3b2758104b58a128e4b044a2d926688a4ea4979 100644 (file)
@@ -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)
 
index e91505c9b5008db99bc41b77a87cce6a9ca48e1a..7a9f828ecdb3854a467e68eb31fa0a7144e60d47 100644 (file)
@@ -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')