Interface ChildProxy
- All Superinterfaces:
Proxy
- All Known Implementing Classes:
Bin
,ChildProxy.ChildProxyImpl
,Pipeline
GstPad
or some kind of voice objects. Another use case are
container elements like GstBin
.
The element implementing the interface acts as a parent for those child
objects.
By implementing this interface the child properties can be accessed from the parent element by using gst_child_proxy_get() and gst_child_proxy_set().
Property names are written as child-name::property-name
. The whole naming
scheme is recursive. Thus child1::child2::property
is valid too, if
child1
and child2
implement the GstChildProxy
interface.
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic interface
Functional interface declaration of theChildAddedCallback
callback.static class
The ChildProxyImpl type represents a native instance of the ChildProxy interface.static class
GstChildProxy
interface.static interface
Functional interface declaration of theChildRemovedCallback
callback. -
Method Summary
Modifier and TypeMethodDescriptiondefault void
childAdded
(GObject child, String name) Emits theGstChildProxy
::child-added signal.default void
childRemoved
(GObject child, String name) Emits theGstChildProxy
::child-removed signal.default void
emitChildAdded
(GObject object, String name) Emits the "child-added" signal.default void
emitChildRemoved
(GObject object, String name) Emits the "child-removed" signal.default void
Gets properties of the parent object and its children.default GObject
getChildByIndex
(int index) Fetches a child by its number.default GObject
getChildByName
(String name) Looks up a child element by the given name.default GObject
getChildByNameRecurse
(String name) Looks up a child element by the given full-path name.default int
Gets the number of child objects this parent contains.default void
getProperty
(String name, Value value) Gets a single property using the GstChildProxy mechanism.static Type
getType()
Get the GType of the ChildProxy classdefault boolean
Looks up which object andGParamSpec
would be effected by the givenname
.Will be emitted after theobject
was added to thechildProxy
.Will be emitted after theobject
was removed from thechildProxy
.default void
Sets properties of the parent object and its children.default void
setProperty
(String name, Value value) Sets a single property using the GstChildProxy mechanism.
-
Method Details
-
getType
-
childAdded
-
childRemoved
-
get
Gets properties of the parent object and its children.- Parameters:
firstPropertyName
- name of the first property to getvarargs
- return location for the first property, followed optionally by more name/return location pairs, followed bynull
-
getChildByIndex
Fetches a child by its number.- Parameters:
index
- the child's position in the child list- Returns:
- the child object or
null
if not found (index too high).
-
getChildByName
Looks up a child element by the given name.This virtual method has a default implementation that uses
GstObject
together with gst_object_get_name(). If the interface is to be used withGObjects
, this methods needs to be overridden.- Parameters:
name
- the child's name- Returns:
- the child object or
null
if not found.
-
getChildByNameRecurse
Looks up a child element by the given full-path name.Similar to gst_child_proxy_get_child_by_name(), this method searches and returns a child given a name. The difference is that this method allows a hierarchical path in the form of child1::child2::child3. In the later example this method would return a reference to child3, if found. The name should be made of element names only and should not contain any property names.
- Parameters:
name
- the full-path child's name- Returns:
- the child object or
null
if not found.
-
getChildrenCount
default int getChildrenCount()Gets the number of child objects this parent contains.- Returns:
- the number of child objects
-
getProperty
-
lookup
default boolean lookup(String name, @Nullable @Nullable Out<GObject> target, @Nullable @Nullable Out<ParamSpec> pspec) Looks up which object andGParamSpec
would be effected by the givenname
.- Parameters:
name
- name of the property to look uptarget
- pointer to aGObject
that takes the real object to set property onpspec
- pointer to take theGParamSpec
describing the property- Returns:
true
iftarget
andpspec
could be found.false
otherwise. In that case the values forpspec
andtarget
are not modified. Unreftarget
after usage. For plainGObject
target
is the same as this ChildProxy.
-
set
-
setProperty
-
onChildAdded
default SignalConnection<ChildProxy.ChildAddedCallback> onChildAdded(ChildProxy.ChildAddedCallback handler) Will be emitted after theobject
was added to thechildProxy
.- Parameters:
handler
- the signal handler- Returns:
- a signal handler ID to keep track of the signal connection
- See Also:
-
emitChildAdded
Emits the "child-added" signal. SeeonChildAdded(org.freedesktop.gstreamer.gst.ChildProxy.ChildAddedCallback)
. -
onChildRemoved
default SignalConnection<ChildProxy.ChildRemovedCallback> onChildRemoved(ChildProxy.ChildRemovedCallback handler) Will be emitted after theobject
was removed from thechildProxy
.- Parameters:
handler
- the signal handler- Returns:
- a signal handler ID to keep track of the signal connection
- See Also:
-
emitChildRemoved
Emits the "child-removed" signal. SeeonChildRemoved(org.freedesktop.gstreamer.gst.ChildProxy.ChildRemovedCallback)
.
-