bufferlist: Use a GQueue instead of a GList
authorJonas Holmberg <jonas.holmberg@axis.com>
Fri, 25 Feb 2011 15:20:49 +0000 (16:20 +0100)
committerWim Taymans <wim.taymans@collabora.co.uk>
Fri, 11 Mar 2011 13:31:14 +0000 (14:31 +0100)
commitc4c06a2b883388d39c9a9ed5d6cb09110812226e
tree92d303f0de7f4409f1879fe4d026b4ab2cbc7e71
parent90b4dc48696481f31306e16e5ad9d5edfd0062a4
bufferlist: Use a GQueue instead of a GList

Adding a buffer to the end of a GstBufferList is supposed to be a fast
operation, but it was not since the iterator does not advance its
nextpointer when adding buffers and GList does not have a tail pointer.
Using a GQueue to store the buffers makes it easier to add buffers to
the end of the list and this operation will now be much more efficient.

Adding an entire GList of buffers using
gst_buffer_list_iterator_add_list() will however have to iterate over
the list being added to be able to update the tail pointer in the
GQueue.
gst/gstbufferlist.c
tests/check/gst/gstbufferlist.c