Package org.freedesktop.gstreamer.gst
Class Bin.Builder<B extends Bin.Builder<B>>
java.lang.Object
io.github.jwharm.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.Element.Builder<B>
org.freedesktop.gstreamer.gst.Bin.Builder<B>
- Type Parameters:
B
- the type of the Builder that is returned
- All Implemented Interfaces:
BuilderInterface
- Direct Known Subclasses:
Pipeline.Builder
- Enclosing class:
Bin
Inner class implementing a builder pattern to construct a GObject with
properties.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Finish building theBin
object.Will be emitted after the element was added tosubBin
.Will be emitted after the element was removed fromsubBin
.onDoLatency
(Bin.DoLatencyCallback handler) Will be emitted when the bin needs to perform latency calculations.onElementAdded
(Bin.ElementAddedCallback handler) Will be emitted after the element was added to the bin.Will be emitted after the element was removed from the bin.setAsyncHandling
(boolean asyncHandling) If set totrue
, the bin will handle asynchronous state changes.setMessageForward
(boolean messageForward) Forward all children messages, even those that would normally be filtered by the bin.Methods inherited from class org.freedesktop.gstreamer.gst.Element.Builder
onNoMorePads, onPadAdded, onPadRemoved
Methods inherited from class org.freedesktop.gstreamer.gst.GstObject.Builder
onDeepNotify, setName, setParent
Methods inherited from class org.gnome.gobject.GObject.Builder
onNotify
Methods inherited from class io.github.jwharm.javagi.gobject.Builder
addBuilderProperty, connect, connect, connectSignals, getArena, getNames, getValues
-
Constructor Details
-
Builder
protected Builder()Default constructor for aBuilder
object.
-
-
Method Details
-
build
Finish building theBin
object. 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 toBin
.- Overrides:
build
in classElement.Builder<B extends Bin.Builder<B>>
- Returns:
- a new instance of
Bin
with the properties that were set in the Builder object.
-
setAsyncHandling
If set totrue
, the bin will handle asynchronous state changes. This should be used only if the bin subclass is modifying the state of its children on its own.- Parameters:
asyncHandling
- the value for theasync-handling
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setMessageForward
Forward all children messages, even those that would normally be filtered by the bin. This can be interesting when one wants to be notified of the EOS state of individual elements, for example.The messages are converted to an ELEMENT message with the bin as the source. The structure of the message is named
GstBinForwarded
and contains a field namedmessage
that contains the original forwardedGstMessage
.- Parameters:
messageForward
- the value for themessage-forward
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
onDeepElementAdded
Will be emitted after the element was added tosubBin
.- Parameters:
handler
- the signal handler- Returns:
- the
Builder
instance is returned, to allow method chaining - See Also:
-
onDeepElementRemoved
Will be emitted after the element was removed fromsubBin
.- Parameters:
handler
- the signal handler- Returns:
- the
Builder
instance is returned, to allow method chaining - See Also:
-
onDoLatency
Will be emitted when the bin needs to perform latency calculations. This signal is only emitted for toplevel bins or whenGstBin
:async-handling is enabled.Only one signal handler is invoked. If no signals are connected, the default handler is invoked, which will query and distribute the lowest possible latency to all sinks.
Connect to this signal if the default latency calculations are not sufficient, like when you need different latencies for different sinks in the same pipeline.
- Parameters:
handler
- the signal handler- Returns:
- the
Builder
instance is returned, to allow method chaining - See Also:
-
onElementAdded
Will be emitted after the element was added to the bin.- Parameters:
handler
- the signal handler- Returns:
- the
Builder
instance is returned, to allow method chaining - See Also:
-
onElementRemoved
Will be emitted after the element was removed from the bin.- Parameters:
handler
- the signal handler- Returns:
- the
Builder
instance is returned, to allow method chaining - See Also:
-