summaryrefslogtreecommitdiff
path: root/gst/gstpad.c
diff options
context:
space:
mode:
authorJan Schmidt <jan@centricular.com>2016-03-14 14:20:42 +1100
committerJan Schmidt <jan@centricular.com>2016-07-25 20:22:20 +1000
commit9fd2101b367d89861defa0e6ad2e66d521bce131 (patch)
tree795e50636d32b0fd512ea2e29d809f904cc47a3d /gst/gstpad.c
parenteead9cf827018288d9f883ac339331f4d30c2ce9 (diff)
events: Implement the stream-group-done event
A new event which precedes EOS in situations where we need downstream to unblock any pads waiting on a stream before we can send EOS. E.g, decodebin draining a chain so it can switch pads. https://bugzilla.gnome.org/show_bug.cgi?id=768995
Diffstat (limited to 'gst/gstpad.c')
-rw-r--r--gst/gstpad.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/gst/gstpad.c b/gst/gstpad.c
index 3f5afd6b06..cd9fff1926 100644
--- a/gst/gstpad.c
+++ b/gst/gstpad.c
@@ -5035,8 +5035,9 @@ store_sticky_event (GstPad * pad, GstEvent * event)
/* Unset the EOS flag when received STREAM_START event, so pad can
* store sticky event and then push it later */
if (type == GST_EVENT_STREAM_START) {
- GST_LOG_OBJECT (pad, "Removing pending EOS events");
+ GST_LOG_OBJECT (pad, "Removing pending EOS and StreamGroupDone events");
remove_event_by_type (pad, GST_EVENT_EOS);
+ remove_event_by_type (pad, GST_EVENT_STREAM_GROUP_DONE);
GST_OBJECT_FLAG_UNSET (pad, GST_PAD_FLAG_EOS);
}
@@ -5202,6 +5203,7 @@ gst_pad_push_event_unchecked (GstPad * pad, GstEvent * event,
/* Remove sticky EOS events */
GST_LOG_OBJECT (pad, "Removing pending EOS events");
remove_event_by_type (pad, GST_EVENT_EOS);
+ remove_event_by_type (pad, GST_EVENT_STREAM_GROUP_DONE);
remove_event_by_type (pad, GST_EVENT_SEGMENT);
GST_OBJECT_FLAG_UNSET (pad, GST_PAD_FLAG_EOS);
pad->ABI.abi.last_flowret = GST_FLOW_OK;
@@ -5526,6 +5528,7 @@ gst_pad_send_event_unchecked (GstPad * pad, GstEvent * event,
/* Remove pending EOS events */
GST_LOG_OBJECT (pad, "Removing pending EOS and SEGMENT events");
remove_event_by_type (pad, GST_EVENT_EOS);
+ remove_event_by_type (pad, GST_EVENT_STREAM_GROUP_DONE);
remove_event_by_type (pad, GST_EVENT_SEGMENT);
GST_OBJECT_FLAG_UNSET (pad, GST_PAD_FLAG_EOS);
pad->ABI.abi.last_flowret = GST_FLOW_OK;
@@ -5553,6 +5556,7 @@ gst_pad_send_event_unchecked (GstPad * pad, GstEvent * event,
/* Remove sticky EOS events */
GST_LOG_OBJECT (pad, "Removing pending EOS events");
remove_event_by_type (pad, GST_EVENT_EOS);
+ remove_event_by_type (pad, GST_EVENT_STREAM_GROUP_DONE);
GST_OBJECT_FLAG_UNSET (pad, GST_PAD_FLAG_EOS);
break;
default: