aggregator: implement gap handling

https://bugzilla.gnome.org/show_bug.cgi?id=746249
This commit is contained in:
Reynaldo H. Verdejo Pinochet 2015-03-17 22:13:06 -03:00 committed by Tim-Philipp Müller
parent e73a173224
commit c955254758

View file

@ -946,9 +946,23 @@ gst_aggregator_default_sink_event (GstAggregator * self,
} }
case GST_EVENT_GAP: case GST_EVENT_GAP:
{ {
/* FIXME: need API to handle GAP events properly */ GstClockTime pts;
GST_FIXME_OBJECT (self, "implement support for GAP events"); GstClockTime duration;
/* don't forward GAP events downstream */ GstBuffer *gapbuf;
gst_event_parse_gap (event, &pts, &duration);
gapbuf = gst_buffer_new ();
GST_BUFFER_PTS (gapbuf) = pts;
GST_BUFFER_DURATION (gapbuf) = duration;
GST_BUFFER_FLAG_SET (gapbuf, GST_BUFFER_FLAG_GAP);
GST_BUFFER_FLAG_SET (gapbuf, GST_BUFFER_FLAG_DROPPABLE);
if (gst_pad_chain (pad, gapbuf) != GST_FLOW_OK) {
GST_WARNING_OBJECT (self, "Failed to chain gap buffer");
res = FALSE;
}
goto eat; goto eat;
} }
case GST_EVENT_TAG: case GST_EVENT_TAG: