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 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

  • Returns the number of buffers in list.

    Returns number

    the number of buffers in the buffer 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