summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Schmidt <jan@centricular.com>2021-09-01 22:23:19 +1000
committerJan Schmidt <jan@centricular.com>2021-09-01 22:23:19 +1000
commit73f6df35d5ccd34a218d7b7a468760c8d627a641 (patch)
treeb182bb784efa9299a2b3fe1b761373be046b5dbd
parent9be72bdf8ceb18f0c54758db29c65397e4ec42aa (diff)
parsebin: Unblock pending pad on GAP event.delivery-20210924
Treat a GAP event like a buffer - as a signal that the element is finished adding pads for now, and we can unblock and exposure the group.
-rw-r--r--gst/playback/gstdecodebin3-parse.c29
1 files changed, 19 insertions, 10 deletions
diff --git a/gst/playback/gstdecodebin3-parse.c b/gst/playback/gstdecodebin3-parse.c
index 85e1de483..354ddb87c 100644
--- a/gst/playback/gstdecodebin3-parse.c
+++ b/gst/playback/gstdecodebin3-parse.c
@@ -423,20 +423,12 @@ remove_input_stream (GstDecodebin3 * dbin, DecodebinInputStream * stream)
g_free (stream);
}
-
-/* FIXME : HACK, REMOVE, USE INPUT CHAINS */
-static GstPadProbeReturn
-parsebin_buffer_probe (GstPad * pad, GstPadProbeInfo * info,
- DecodebinInput * input)
+static void
+unblock_pending_input (DecodebinInput * input)
{
GstDecodebin3 *dbin = input->dbin;
GList *tmp, *unused_slot = NULL;
- GST_DEBUG_OBJECT (pad, "Got a buffer ! UNBLOCK !");
-
- /* Any data out the demuxer means it's not creating pads
- * any more right now */
-
/* 1. Re-use existing streams if/when possible */
GST_FIXME_OBJECT (dbin, "Re-use existing input streams if/when possible");
@@ -525,6 +517,18 @@ parsebin_buffer_probe (GstPad * pad, GstPadProbeInfo * info,
if (unused_slot)
g_list_free_full (unused_slot, (GDestroyNotify) gst_object_unref);
+}
+
+/* FIXME : HACK, REMOVE, USE INPUT CHAINS */
+static GstPadProbeReturn
+parsebin_buffer_probe (GstPad * pad, GstPadProbeInfo * info,
+ DecodebinInput * input)
+{
+ /* Any data out the demuxer means it's not creating pads
+ * any more right now */
+ GST_DEBUG_OBJECT (pad, "Got a buffer ! UNBLOCK !");
+ unblock_pending_input (input);
+
return GST_PAD_PROBE_OK;
}
@@ -553,6 +557,11 @@ parsebin_pending_event_probe (GstPad * pad, GstPadProbeInfo * info,
SELECTION_UNLOCK (dbin);
}
break;
+ case GST_EVENT_GAP:
+ GST_DEBUG_OBJECT (pad, "Got a gap event! UNBLOCK !");
+ unblock_pending_input (ppad->input);
+ ret = GST_PAD_PROBE_OK;
+ break;
default:
break;
}