playback: fix autoplugging block issue 66/288266/3 accepted/tizen/unified/20230215.155637
authorEunhye Choi <eunhae1.choi@samsung.com>
Tue, 14 Feb 2023 08:08:19 +0000 (17:08 +0900)
committerEunhye Choi <eunhae1.choi@samsung.com>
Tue, 14 Feb 2023 08:18:23 +0000 (17:18 +0900)
- autoplugging is blocked by blocking pad.
- parsebin: if expose_pad is called even if end_pad already exist,
            parsebin srcpad is locked and never be unlocked.
- decodebin3: if identity state is changed to ready, the sinkpad
              is not activated and autoplugging is blocked.

Change-Id: I335914d2d90783bdc1dd05dc3badd8fa7277378d

packaging/gstreamer.spec
subprojects/gst-plugins-base/gst/playback/gstdecodebin3.c
subprojects/gst-plugins-base/gst/playback/gstparsebin.c
subprojects/gst-plugins-base/meson.build

index 81aa0e6..17ef711 100644 (file)
@@ -62,7 +62,7 @@
 
 Name:           %{_name}
 Version:        1.22.0
-Release:        10
+Release:        11
 Summary:        Streaming-Media Framework Runtime
 License:        LGPL-2.0+
 Group:          Multimedia/Framework
index b2350a0..d803554 100644 (file)
@@ -1404,7 +1404,11 @@ setup_identify_for_input (GstDecodebin3 * dbin, DecodebinInput * input,
   gst_object_unref (idsrc);
   gst_object_unref (idsink);
   gst_ghost_pad_set_target (GST_GHOST_PAD (input->ghost_sink), idsink);
+#ifdef TIZEN_FEATURE_FIX_PAD_BLOCK
+  gst_element_set_state (input->identity, GST_STATE_PAUSED);
+#else
   gst_element_sync_state_with_parent (input->identity);
+#endif
 }
 
 static gboolean
index 9ea753b..f80d153 100644 (file)
@@ -1893,7 +1893,16 @@ connect_pad (GstParseBin * parsebin, GstElement * src, GstParsePad * parsepad,
       case GST_AUTOPLUG_SELECT_EXPOSE:
         GST_DEBUG_OBJECT (parsebin, "autoplug select requested expose");
         /* expose the pad, we don't have the source element */
+#ifdef TIZEN_FEATURE_FIX_PAD_BLOCK
+        CHAIN_MUTEX_LOCK (chain);
+        if (chain->endpad == NULL)
+          expose_pad (parsebin, src, parsepad, pad, caps, chain);
+        else
+          GST_WARNING_OBJECT (parsebin, "endpad already exist %" GST_PTR_FORMAT, chain->endpad);
+        CHAIN_MUTEX_UNLOCK (chain);
+#else
         expose_pad (parsebin, src, parsepad, pad, caps, chain);
+#endif
         res = TRUE;
         goto beach;
       case GST_AUTOPLUG_SELECT_SKIP:
index 72c952b..4c815f6 100644 (file)
@@ -397,6 +397,7 @@ core_conf.set('TIZEN_FEATURE_FORCE_SW_DECODER', true)
 core_conf.set('TIZEN_FEATURE_PLAYBIN3_MODIFICATION', true)
 core_conf.set('TIZEN_FEATURE_DISABLE_EOS_DROP', true)
 core_conf.set('TIZEN_FEATURE_MANUAL_BUFFERING_CTRL', true)
+core_conf.set('TIZEN_FEATURE_FIX_PAD_BLOCK', true)
 
 tbm_dep = dependency('libtbm', required : get_option('tbm'))
 if tbm_dep.found()