Interface AppSink.NewSampleCallback

All Superinterfaces:
FunctionPointer
Enclosing class:
AppSink
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 AppSink.NewSampleCallback extends FunctionPointer

Functional interface declaration of the NewSampleCallback callback.

See Also:
  • Method Details

    • run

      FlowReturn run()

      Signal that a new sample is available.

      This signal is emitted from the streaming thread and only when the "emit-signals" property is true.

      The new sample can be retrieved with the "pull-sample" action signal or gst_app_sink_pull_sample() either from this signal callback or from any other thread.

      Note that this signal is only emitted when the "emit-signals" property is set to true, which it is not by default for performance reasons.

    • upcall

      default int upcall(MemorySegment sourceAppSink)
      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