Interface MiniObjectDisposeFunction

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 MiniObjectDisposeFunction extends FunctionPointer

Functional interface declaration of the MiniObjectDisposeFunction callback.

See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Function prototype for when a miniobject has lost its last refcount.
    Creates a native function pointer to the upcall(MemorySegment) method.
    default int
    The upcall method is called from native code.
  • Method Details

    • run

      boolean run(MiniObject obj)
      Function prototype for when a miniobject has lost its last refcount. Implementation of the mini object are allowed to revive the passed object by doing a gst_mini_object_ref(). If the object is not revived after the dispose function, the function should return true and the memory associated with the object is freed.
      Parameters:
      obj - MiniObject to dispose
      Returns:
      true if the object should be cleaned up.
    • upcall

      default int upcall(MemorySegment obj)
      The upcall method is called from native code. The parameters are marshaled and run(MiniObject) is executed.
    • toCallback

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