Interface MemoryMapFullFunction

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

Functional interface declaration of the MemoryMapFullFunction callback.

See Also:
  • Method Details

    • run

      MemorySegment run(Memory mem, MapInfo info, long maxsize)
      Get the memory of mem that can be accessed according to the mode specified in info's flags. The function should return a pointer that contains at least maxsize bytes.
      Parameters:
      mem - a GstMemory
      info - the GstMapInfo to map with
      maxsize - size to map
      Returns:
      a pointer to memory of which at least maxsize bytes can be accessed according to the access pattern in info's flags.
    • upcall

      default MemorySegment upcall(MemorySegment mem, MemorySegment info, long maxsize)
      The upcall method is called from native code. The parameters are marshaled and run(Memory, MapInfo, long) is executed.
    • toCallback

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