GNOME Bugzilla – Bug 643301
Adding a buffer to a buffer list iterates the list
Last modified: 2011-03-11 13:38:32 UTC
Adding a buffer to the end of a GstBufferList is supposed to be a fast operation, but it is not since the iterator does not advance its nextpointer when adding buffers and GList does not have a tail pointer.
Created attachment 181922 [details] [review] Use a GQueue instead of a GList 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.
Created attachment 181923 [details] [review] Use a GQueue instead of a GList 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.
commit c4c06a2b883388d39c9a9ed5d6cb09110812226e Author: Jonas Holmberg <jonas.holmberg@axis.com> Date: Fri Feb 25 16:20:49 2011 +0100 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.