Package org.freedesktop.gstreamer.app
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.
Functional interface declaration of the
NewSampleCallback callback.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionrun()Signal that a new sample is available.default MemorySegmenttoCallback(Arena arena) Creates a native function pointer to theupcall(java.lang.foreign.MemorySegment)method.default intupcall(MemorySegment sourceAppSink) Theupcallmethod is called from native code.
-
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
Theupcallmethod is called from native code. The parameters are marshaled andrun()is executed. -
toCallback
Creates a native function pointer to theupcall(java.lang.foreign.MemorySegment)method.- Specified by:
toCallbackin interfaceFunctionPointer- Parameters:
arena- the arena in which the function pointer is allocated- Returns:
- the native function pointer
-