Package org.freedesktop.gstreamer.gst
Interface BusFunc
- All Superinterfaces:
FunctionPointer
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface
@Generated("io.github.jwharm.JavaGI")
public interface BusFunc
extends FunctionPointer
Functional interface declaration of the
BusFunc
callback.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Specifies the type of function passed to gst_bus_add_watch() or gst_bus_add_watch_full(), which is called from the mainloop when a message is available on the bus.default MemorySegment
toCallback
(Arena arena) Creates a native function pointer to theupcall(java.lang.foreign.MemorySegment, java.lang.foreign.MemorySegment, java.lang.foreign.MemorySegment)
method.default int
upcall
(MemorySegment bus, MemorySegment message, MemorySegment userData) Theupcall
method is called from native code.
-
Method Details
-
run
Specifies the type of function passed to gst_bus_add_watch() or gst_bus_add_watch_full(), which is called from the mainloop when a message is available on the bus.The message passed to the function will be unreffed after execution of this function so it should not be freed in the function.
Note that this function is used as a
GSourceFunc
which means that returningfalse
will remove theGSource
from the mainloop. -
upcall
Theupcall
method is called from native code. The parameters are marshaled andrun(org.freedesktop.gstreamer.gst.Bus, org.freedesktop.gstreamer.gst.Message)
is executed. -
toCallback
Creates a native function pointer to theupcall(java.lang.foreign.MemorySegment, java.lang.foreign.MemorySegment, java.lang.foreign.MemorySegment)
method.- Specified by:
toCallback
in interfaceFunctionPointer
- Parameters:
arena
- the function pointer will be allocated in this arena- Returns:
- the native function pointer
-