Package org.freedesktop.gstreamer.app
Interface AppSink.PullSampleCallback
- 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
PullSampleCallback callback.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionrun()This function blocks until a sample or EOS becomes available or the appsink element is set to the READY/NULL state.default MemorySegmenttoCallback(Arena arena) Creates a native function pointer to theupcall(java.lang.foreign.MemorySegment)method.default MemorySegmentupcall(MemorySegment sourceAppSink) Theupcallmethod is called from native code.
-
Method Details
-
run
Sample run()This function blocks until a sample or EOS becomes available or the appsink element is set to the READY/NULL state.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, this function returns
null. Use gst_app_sink_is_eos () to check for the EOS condition. -
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
-