mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-18 04:05:34 +00:00
aggregator: implement gap handling
https://bugzilla.gnome.org/show_bug.cgi?id=746249
This commit is contained in:
parent
e73a173224
commit
c955254758
1 changed files with 17 additions and 3 deletions
|
@ -946,9 +946,23 @@ gst_aggregator_default_sink_event (GstAggregator * self,
|
|||
}
|
||||
case GST_EVENT_GAP:
|
||||
{
|
||||
/* FIXME: need API to handle GAP events properly */
|
||||
GST_FIXME_OBJECT (self, "implement support for GAP events");
|
||||
/* don't forward GAP events downstream */
|
||||
GstClockTime pts;
|
||||
GstClockTime duration;
|
||||
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;
|
||||
}
|
||||
case GST_EVENT_TAG:
|
||||
|
|
Loading…
Reference in a new issue