Interface AppSink.NewSerializedEventCallback

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.NewSerializedEventCallback extends FunctionPointer

Functional interface declaration of the NewSerializedEventCallback callback.

See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    run()
    Signal that a new downstream serialized event is available.
    Creates a native function pointer to the upcall(MemorySegment) method.
    default int
    upcall(MemorySegment sourceAppSink)
    The upcall method is called from native code.
  • Method Details

    • run

      boolean run()

      Signal that a new downstream serialized event is available.

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

      The new event can be retrieved with the "try-pull-object" action signal or gst_app_sink_pull_object() either from this signal callback or from any other thread.

      EOS will not be notified using this signal, use GstAppSink::eos instead. EOS cannot be pulled either, use gst_app_sink_is_eos() to check for it.

      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.

      The callback should return true if the event has been handled, which will skip basesink handling of the event, false otherwise.

      Since:
      1.20
    • 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