Class (GI Struct)

Gst-1.0GstBufferList

Buffer lists are an object containing a list of buffers.

Buffer lists are created with gst_buffer_list_new() and filled with data using gst_buffer_list_insert().

Buffer lists can be pushed on a srcpad with gst_pad_push_list(). This is interesting when multiple buffers need to be pushed in one go because it can reduce the amount of overhead for pushing each buffer individually.

Index

Constructors

Properties

$gtype: GType<BufferList>

Methods

  • Calculates the size of the data contained in list by adding the size of all buffers.

    Returns number

    the size of the data contained in list in bytes.

  • Creates a shallow copy of the given buffer list. This will make a newly allocated copy of the source list with copies of buffer pointers. The refcount of buffers pointed to will be increased by one.

    Returns BufferList

    a new copy of list.

  • Creates a copy of the given buffer list. This will make a newly allocated copy of the buffers that the source buffer list contains.

    Returns BufferList

    a new copy of list.

  • Calls func with data for each buffer in list.

    func can modify the passed buffer pointer or its contents. The return value of func defines if this function returns or if the remaining buffers in the list should be skipped.

    Parameters

    Returns boolean

    true when func returned true for each buffer in list or when list is empty.

  • Gets the buffer at idx.

    You must make sure that idx does not exceed the number of buffers available.

    Parameters

    • idx: number

      the index

    Returns Gst.Buffer

    the buffer at idx in group. The returned buffer remains valid as long as list is valid and buffer is not removed from the list.

  • Gets the buffer at idx, ensuring it is a writable buffer.

    You must make sure that idx does not exceed the number of buffers available.

    Parameters

    • idx: number

      the index

    Returns Gst.Buffer

    the buffer at idx in group. The returned buffer remains valid as long as list is valid and the buffer is not removed from the list.

  • Inserts buffer at idx in list. Other buffers are moved to make room for this new buffer.

    A -1 value for idx will append the buffer at the end.

    Parameters

    Returns void

  • Tests if you can safely modify list. It is only safe to modify buffer list when there is only one owner of the buffer list - ie, the object is writable.

    Returns boolean

  • Returns the number of buffers in list.

    Returns number

    the number of buffers in the buffer list

  • Returns a writable copy of list.

    If there is only one reference count on list, the caller must be the owner, and so this function will return the buffer list object unchanged. If on the other hand there is more than one reference on the object, a new buffer list object will be returned. The caller's reference on list will be removed, and instead the caller will own a reference to the returned object.

    In short, this function unrefs the buffer_list in the argument and refs the buffer list that it returns. Don't access the argument after calling this function. See also: gst_buffer_list_ref().

    Returns BufferList

    a writable buffer list which may or may not be the same as buffer list

  • Increases the refcount of the given buffer list by one.

    Note that the refcount affects the writability of list and its data, see gst_buffer_list_make_writable(). It is important to note that keeping additional references to GstBufferList instances can potentially increase the number of memcpy operations in a pipeline.

    Returns BufferList

    list

  • Removes length buffers starting from idx in list. The following buffers are moved to close the gap.

    Parameters

    • idx: number

      the index

    • length: number

      the amount to remove

    Returns void

  • Decreases the refcount of the buffer list. If the refcount reaches 0, the buffer list will be freed.

    Returns void