Gjsify LogoGjsify Logo

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.

record

Hierarchy

  • BufferList

Index

Constructors

Properties

name: string

Methods

  • calculate_size(): number
  • 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

  • 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

  • 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

  • insert(idx: number, buffer: Gst.Buffer): void
  • 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

    • idx: number

      the index

    • buffer: Gst.Buffer

      a #GstBuffer

    Returns void

  • length(): number
  • remove(idx: number, length: number): void
  • 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

  • Creates a new, empty #GstBufferList. The list will have size space preallocated so that memory reallocations can be avoided.

    Parameters

    • size: number

      an initial reserved size

    Returns Gst.BufferList

  • Modifies a pointer to a #GstBufferList to point to a different #GstBufferList. The modification is done atomically (so this is useful for ensuring thread safety in some cases), and the reference counts are updated appropriately (the old buffer list is unreffed, the new is reffed).

    Either new_list or the #GstBufferList pointed to by old_list may be %NULL.

    Parameters

    • old_list: Gst.BufferList

      pointer to a pointer to a #GstBufferList to be replaced.

    • new_list: Gst.BufferList

      pointer to a #GstBufferList that will replace the buffer list pointed to by old_list.

    Returns [boolean, Gst.BufferList]

  • Modifies a pointer to a #GstBufferList to point to a different #GstBufferList. This function is similar to gst_buffer_list_replace() except that it takes ownership of new_list.

    Parameters

    • old_list: Gst.BufferList

      pointer to a pointer to a #GstBufferList to be replaced.

    • new_list: Gst.BufferList

      pointer to a #GstBufferList that will replace the bufferlist pointed to by old_list.

    Returns [boolean, Gst.BufferList]

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Type alias with type parameter
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method