Interface TypeFindHelperGetRangeFunction

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

Functional interface declaration of the TypeFindHelperGetRangeFunction callback.

See Also:
  • Method Details

    • run

      FlowReturn run(GstObject obj, @Nullable GstObject parent, long offset, int length, Out<Buffer> buffer)

      This function will be called by gst_type_find_helper_get_range() when typefinding functions request to peek at the data of a stream at certain offsets. If this function returns GST_FLOW_OK, the result buffer will be stored in buffer. The contents of buffer is invalid for any other return value.

      This function is supposed to behave exactly like a GstPadGetRangeFunction.

      Parameters:
      obj - a GstObject that will handle the getrange request
      parent - the parent of obj or null
      offset - the offset of the range
      length - the length of the range
      buffer - a memory location to hold the result buffer
      Returns:
      GST_FLOW_OK for success
    • upcall

      default int upcall(MemorySegment obj, MemorySegment parent, long offset, int length, MemorySegment buffer)
      The upcall method is called from native code. The parameters are marshaled and run(GstObject, GstObject, long, int, Out) is executed.
    • toCallback

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