Interface BufferForeachMetaFunc

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

Functional interface declaration of the BufferForeachMetaFunc callback.

See Also:
  • Method Details

    • run

      boolean run(Buffer buffer, @Nullable Out<Meta> meta)

      A function that will be called from gst_buffer_foreach_meta(). The meta field will point to a the reference of the meta.

      buffer should not be modified from this callback.

      When this function returns true, the next meta will be returned. When false is returned, gst_buffer_foreach_meta() will return.

      When meta is set to null, the item will be removed from the buffer.

      Parameters:
      buffer - a GstBuffer
      meta - a pointer to a GstMeta
      Returns:
      false when gst_buffer_foreach_meta() should stop
    • upcall

      default int upcall(MemorySegment buffer, MemorySegment meta, MemorySegment userData)
      The upcall method is called from native code. The parameters are marshaled and run(Buffer, Out) is executed.
    • toCallback

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