* these into gap buffers with matching PTS and duration. It will also
* flag these buffers with GST_BUFFER_FLAG_GAP and GST_BUFFER_FLAG_DROPPABLE
* to ease their identification and subsequent processing.
+ * In addition, if the gap event was flagged with GST_GAP_FLAG_MISSING_DATA,
+ * a custom meta is added to the resulting gap buffer (GstAggregatorMissingDataMeta).
*
* * Subclasses must use (a subclass of) #GstAggregatorPad for both their
* sink and source pads.
GstClockTime pts, endpts;
GstClockTime duration;
GstBuffer *gapbuf;
+ GstGapFlags flags = 0;
gst_event_parse_gap (event, &pts, &duration);
GST_BUFFER_FLAG_SET (gapbuf, GST_BUFFER_FLAG_GAP);
GST_BUFFER_FLAG_SET (gapbuf, GST_BUFFER_FLAG_DROPPABLE);
+ gst_event_parse_gap_flags (event, &flags);
+ if (flags & GST_GAP_FLAG_MISSING_DATA) {
+ gst_buffer_add_custom_meta (gapbuf, "GstAggregatorMissingDataMeta");
+ }
+
/* Remove GAP event so we can replace it with the buffer */
PAD_LOCK (aggpad);
if (g_queue_peek_tail (&aggpad->priv->data) == event)
{
GObjectClass *gobject_class = (GObjectClass *) klass;
GstElementClass *gstelement_class = (GstElementClass *) klass;
+ static const gchar *meta_tags[] = { NULL };
aggregator_parent_class = g_type_class_peek_parent (klass);
GST_TYPE_SEGMENT | G_SIGNAL_TYPE_STATIC_SCOPE, GST_TYPE_CLOCK_TIME,
GST_TYPE_CLOCK_TIME, GST_TYPE_CLOCK_TIME,
GST_TYPE_STRUCTURE | G_SIGNAL_TYPE_STATIC_SCOPE);
+
+ gst_meta_register_custom ("GstAggregatorMissingDataMeta", meta_tags, NULL,
+ NULL, NULL);
}
static inline gpointer