GST_OBJECT_FLAG_SET (jitterbuffer, GST_ELEMENT_FLAG_PROVIDE_CLOCK);
}
+#define ITEM_TYPE_BUFFER 0
+#define ITEM_TYPE_LOST 1
+
static RTPJitterBufferItem *
-alloc_item (void)
+alloc_item (gpointer data, guint type, GstClockTime dts, GstClockTime pts,
+ guint seqnum, guint rtptime)
{
- return g_slice_new (RTPJitterBufferItem);
+ RTPJitterBufferItem *item;
+
+ item = g_slice_new (RTPJitterBufferItem);
+ item->data = data;
+ item->next = NULL;
+ item->prev = NULL;
+ item->type = type;
+ item->dts = dts;
+ item->pts = pts;
+ item->seqnum = seqnum;
+ item->rtptime = rtptime;
+
+ return item;
}
static void
}
}
- item = alloc_item ();
- item->data = buffer;
- item->next = NULL;
- item->prev = NULL;
- item->dts = dts;
- item->pts = pts;
- item->seqnum = seqnum;
- item->rtptime = rtptime;
+ item = alloc_item (buffer, ITEM_TYPE_BUFFER, dts, pts, seqnum, rtptime);
/* now insert the packet into the queue in sorted order. This function returns
* FALSE if a packet with the same seqnum was already in the queue, meaning we
* @data: the data of the item
* @next: pointer to next item
* @prev: pointer to previous item
+ * @type: the type of @data
* @dts: input DTS
* @pts: output PTS
* @seqnum: seqnum
gpointer data;
GList *next;
GList *prev;
+ guint type;
GstClockTime dts;
GstClockTime pts;
guint seqnum;