Package org.freedesktop.gstreamer.gst
Class Bus.Builder<B extends Bus.Builder<B>>
java.lang.Object
org.javagi.gobject.Builder<B>
org.gnome.gobject.GObject.Builder<B>
org.gnome.gobject.InitiallyUnowned.Builder<B>
org.freedesktop.gstreamer.gst.GstObject.Builder<B>
org.freedesktop.gstreamer.gst.Bus.Builder<B>
- Type Parameters:
B- the type of the Builder that is returned
- All Implemented Interfaces:
BuilderInterface
- Enclosing class:
Bus
Inner class implementing a builder pattern to construct a GObject with
properties.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Finish building theBusobject.onMessage(@Nullable String detail, Bus.MessageCallback handler) A message has been posted on the bus.onSyncMessage(@Nullable String detail, Bus.SyncMessageCallback handler) A message has been posted on the bus.setEnableAsync(boolean enableAsync) Enables async message delivery support for bus watches, gst_bus_pop() and similar API.Methods inherited from class org.freedesktop.gstreamer.gst.GstObject.Builder
onDeepNotify, setName, setParentMethods inherited from class org.gnome.gobject.GObject.Builder
onNotifyMethods inherited from class org.javagi.gobject.Builder
addBuilderProperty, connect, connect, connectSignals, getArena, getNames, getValues
-
Constructor Details
-
Builder
protected Builder()Default constructor for aBuilderobject.
-
-
Method Details
-
build
Finish building theBusobject. This will callGObject.withProperties(org.gnome.glib.Type, java.lang.String[], org.gnome.gobject.Value[])to create a new GObject instance, which is then cast toBus.- Overrides:
buildin classGstObject.Builder<B extends Bus.Builder<B>>- Returns:
- a new instance of
Buswith the properties that were set in the Builder object.
-
setEnableAsync
Enables async message delivery support for bus watches, gst_bus_pop() and similar API. Without this only the synchronous message handlers are called.This property is used to create the child element buses in
GstBin.- Parameters:
enableAsync- the value for theenable-asyncproperty- Returns:
- the
Builderinstance is returned, to allow method chaining
-
onMessage
A message has been posted on the bus. This signal is emitted from aGSourceadded to the mainloop. this signal will only be emitted when there is aGMainLooprunning.- Parameters:
handler- the signal handler- Returns:
- the
Builderinstance is returned, to allow method chaining - See Also:
-
onSyncMessage
A message has been posted on the bus. This signal is emitted from the thread that posted the message so one has to be careful with locking.This signal will not be emitted by default, you have to call gst_bus_enable_sync_message_emission() before.
- Parameters:
handler- the signal handler- Returns:
- the
Builderinstance is returned, to allow method chaining - See Also:
-