Commit 8d585ffd authored by HoonHee Lee's avatar HoonHee Lee

decodebin3: force to pushing custom stream-start when no stream-start in input stream

This is timing issue and it could be observed as below scenario.

1) parsebin0:src_0 is received EOS.
2) It is marked to custom EOS and pushed it to multiqueue0:src_0.
3) parsebin0:src_1 is received EOS and recognize ALL EOS state in multiqueue pre.
4) It is pushed to multiqueue0:src_1 as regular EOS.
5) Decodebin3 understand multiqueue pre and post are in ALL EOS when all drained.
6) Decodebin3 try to send custom stream-start and final EOS to multiqueue all sinkpads.

In normal case, we could get stored stream-start event from parsebin0:srcpads.
But we've got NULL stream-start event and it is rarely found.
Therefore, final EOS is propataged without custom stream-start and it is just handled
in multiqueue's sink_event and then final EOS is not delivered to multiqueue post
(e.g multiqueue_src_probe).

To fallback this symptom, we make manually custom stream-start event and push before
final EOS.

gstreamer/gst-plugins-base!121
parent 78431e78
......@@ -1691,13 +1691,46 @@ check_all_slot_for_eos (GstDecodebin3 * dbin)
s = (GstStructure *) gst_event_get_structure (custom_stream_start);
gst_structure_set (s, "decodebin3-flushing-stream-start",
G_TYPE_BOOLEAN, TRUE, NULL);
GST_DEBUG_OBJECT (peer,
"Pushing custom stream-start %" GST_PTR_FORMAT,
custom_stream_start);
gst_pad_send_event (peer, custom_stream_start);
} else if (GST_PAD_IS_EOS (peer)) {
GList *tmp;
/* FIXME: Forced forward custom STREAM_START event */
GST_DEBUG_OBJECT (peer,
"Make custom stream-start event when no stream-start in input stream");
for (tmp = dbin->slots; tmp; tmp = tmp->next) {
MultiQueueSlot *slot = (MultiQueueSlot *) tmp->data;
if (slot->input == input) {
GST_DEBUG_OBJECT (dbin, "Found slot: %d", slot->id);
if (slot->active_stream) {
GstStream *slot_stream = slot->active_stream;
GstStructure *s;
GstEvent *custom_stream_start =
gst_event_new_stream_start (gst_stream_get_stream_id
(slot_stream));
gst_event_set_stream (custom_stream_start, slot_stream);
s = (GstStructure *)
gst_event_get_structure (custom_stream_start);
gst_structure_set (s, "decodebin3-flushing-stream-start",
G_TYPE_BOOLEAN, TRUE, NULL);
GST_DEBUG_OBJECT (peer,
"Forced pushing custom stream-start %" GST_PTR_FORMAT,
custom_stream_start);
gst_pad_send_event (peer, custom_stream_start);
}
}
}
}
eos = gst_event_new_eos ();
gst_mini_object_set_qdata (GST_MINI_OBJECT_CAST (eos),
CUSTOM_FINAL_EOS_QUARK, (gchar *) CUSTOM_FINAL_EOS_QUARK_DATA,
NULL);
GST_DEBUG_OBJECT (peer, "Pushing final eos");
gst_pad_send_event (peer, eos);
gst_object_unref (peer);
} else
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment