mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-20 00:31:13 +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:
|
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:
|
||||||
|
|
Loading…
Reference in a new issue