Interface BufferListFunc

All Superinterfaces:
FunctionPointer
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface @Generated("org.javagi.JavaGI") public interface BufferListFunc extends FunctionPointer

Functional interface declaration of the BufferListFunc callback.

See Also:
  • Method Details

    • run

      boolean run(@Nullable Out<Buffer> buffer, int idx)

      A function that will be called from gst_buffer_list_foreach(). The buffer field will point to a the reference of the buffer at idx.

      When this function returns true, the next buffer will be returned. When false is returned, gst_buffer_list_foreach() will return.

      When buffer is set to null, the item will be removed from the bufferlist. When buffer has been made writable, the new buffer reference can be assigned to buffer. This function is responsible for unreffing the old buffer when removing or modifying.

      Parameters:
      buffer - pointer to the buffer
      idx - the index of buffer
      Returns:
      false when gst_buffer_list_foreach() should stop
    • upcall

      default int upcall(MemorySegment buffer, int idx, MemorySegment userData)
      The upcall method is called from native code. The parameters are marshaled and run(Out, int) is executed.
    • toCallback

      default MemorySegment toCallback(Arena arena)
      Creates a native function pointer to the upcall(MemorySegment, int, MemorySegment) method.
      Specified by:
      toCallback in interface FunctionPointer
      Parameters:
      arena - the arena in which the function pointer is allocated
      Returns:
      the native function pointer