Package org.freedesktop.gstreamer.app
Interface AppSink.TryPullSampleCallback
- 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
TryPullSampleCallback callback.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionrun(long timeout) This function blocks until a sample or EOS becomes available or the appsink element is set to the READY/NULL state or the timeout expires.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
This function blocks until a sample or EOS becomes available or the appsink element is set to the READY/NULL state or the timeout expires.This function will only return samples when the appsink is in the PLAYING state. All rendered samples will be put in a queue so that the application can pull samples at its own rate.
Note that when the application does not pull samples fast enough, the queued samples could consume a lot of memory, especially when dealing with raw video frames. It's possible to control the behaviour of the queue with the "drop" and "max-buffers" / "max-bytes" / "max-time" set of properties.
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.- 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
-