Interface MetaTransformFunction

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

Functional interface declaration of the MetaTransformFunction callback.

See Also:
  • Method Details

    • run

      boolean run(Buffer transbuf, Meta meta, Buffer buffer, Quark type, @Nullable MemorySegment data)

      Function called for each meta in buffer as a result of performing a transformation on transbuf. Additional type specific transform data is passed to the function as data.

      Implementations should check the type of the transform and parse additional type specific fields in data that should be used to update the metadata on transbuf.

      Parameters:
      transbuf - a GstBuffer
      meta - a GstMeta
      buffer - a GstBuffer
      type - the transform type
      data - transform specific data.
      Returns:
      true if the transform could be performed
    • upcall

      default int upcall(MemorySegment transbuf, MemorySegment meta, MemorySegment buffer, int type, MemorySegment data)
      The upcall method is called from native code. The parameters are marshaled and run(Buffer, Meta, Buffer, Quark, MemorySegment) is executed.
    • toCallback

      default MemorySegment toCallback(Arena arena)
      Creates a native function pointer to the upcall(MemorySegment, MemorySegment, 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