Interface MemoryCopyFunction

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

Functional interface declaration of the MemoryCopyFunction callback.

See Also:
  • Method Details

    • run

      Memory run(Memory mem, long offset, long size)
      Copy size bytes from mem starting at offset and return them wrapped in a new GstMemory object. If size is set to -1, all bytes starting at offset are copied.
      Parameters:
      mem - a GstMemory
      offset - an offset
      size - a size or -1
      Returns:
      a new GstMemory object wrapping a copy of the requested region in mem.
    • upcall

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

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