Package org.freedesktop.gstreamer.app
Interface AppSink.TryPullPrerollCallback
- 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
TryPullPrerollCallback callback.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionrun(long timeout) Get the last preroll sample inappsink.This was the sample that caused the appsink to preroll in the PAUSED state.default MemorySegmenttoCallback(Arena arena) Creates a native function pointer to theupcall(java.lang.foreign.MemorySegment, long)method.default MemorySegmentupcall(MemorySegment sourceAppSink, long timeout) Theupcallmethod is called from native code.
-
Method Details
-
run
Get the last preroll sample inappsink.This was the sample that caused the appsink to preroll in the PAUSED state.This function is typically used when dealing with a pipeline in the PAUSED state. Calling this function after doing a seek will give the sample right after the seek position.
Calling this function will clear the internal reference to the preroll buffer.
Note that the preroll sample will also be returned as the first sample when calling gst_app_sink_pull_sample() or the "pull-sample" action signal.
If an EOS event was received before any buffers or the timeout expires, this function returns
null. Use gst_app_sink_is_eos () to check for the EOS condition.This function blocks until a preroll sample or EOS is received, the appsink element is set to the READY/NULL state, or the timeout expires.
- Since:
- 1.10
-
upcall
Theupcallmethod is called from native code. The parameters are marshaled andrun(long)is executed. -
toCallback
Creates a native function pointer to theupcall(java.lang.foreign.MemorySegment, long)method.- Specified by:
toCallbackin interfaceFunctionPointer- Parameters:
arena- the arena in which the function pointer is allocated- Returns:
- the native function pointer
-