Interface Bin.DoLatencyCallback

All Superinterfaces:
FunctionPointer
Enclosing class:
Bin
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public static interface Bin.DoLatencyCallback extends FunctionPointer

Functional interface declaration of the DoLatencyCallback callback.

See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    run()
    Will be emitted when the bin needs to perform latency calculations.
    Creates a native function pointer to the upcall(MemorySegment) method.
    default int
    upcall(MemorySegment sourceBin)
    The upcall method is called from native code.
  • Method Details

    • run

      boolean run()

      Will be emitted when the bin needs to perform latency calculations. This signal is only emitted for toplevel bins or when GstBin:async-handling is enabled.

      Only one signal handler is invoked. If no signals are connected, the default handler is invoked, which will query and distribute the lowest possible latency to all sinks.

      Connect to this signal if the default latency calculations are not sufficient, like when you need different latencies for different sinks in the same pipeline.

    • upcall

      default int upcall(MemorySegment sourceBin)
      The upcall method is called from native code. The parameters are marshaled and run() is executed.
    • toCallback

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