bufferlist: pass index as gint to _insert

Make the idx argument of _insert() a gint because we allow -1 as a value.
Improve annotation.
This commit is contained in:
Wim Taymans 2012-07-23 16:27:34 +02:00
parent a21575d640
commit fe17539f66
2 changed files with 3 additions and 3 deletions

View file

@ -256,7 +256,7 @@ gst_buffer_list_get (GstBufferList * list, guint idx)
* gst_buffer_list_insert:
* @list: a #GstBufferList
* @idx: the index
* @buffer: a #GstBuffer
* @buffer: (transfer full): a #GstBuffer
*
* Insert @buffer at @idx in @list. Other buffers are moved to make room for
* this new buffer.
@ -264,7 +264,7 @@ gst_buffer_list_get (GstBufferList * list, guint idx)
* A -1 value for @idx will append the buffer at the end.
*/
void
gst_buffer_list_insert (GstBufferList * list, guint idx, GstBuffer * buffer)
gst_buffer_list_insert (GstBufferList * list, gint idx, GstBuffer * buffer)
{
g_return_if_fail (GST_IS_BUFFER_LIST (list));
g_return_if_fail (buffer != NULL);

View file

@ -152,7 +152,7 @@ GstBufferList * gst_buffer_list_new_sized (guint size) G_GN
guint gst_buffer_list_length (GstBufferList *list);
GstBuffer * gst_buffer_list_get (GstBufferList *list, guint idx);
void gst_buffer_list_insert (GstBufferList *list, guint idx, GstBuffer *buffer);
void gst_buffer_list_insert (GstBufferList *list, gint idx, GstBuffer *buffer);
void gst_buffer_list_remove (GstBufferList *list, guint idx, guint length);
gboolean gst_buffer_list_foreach (GstBufferList *list,