Interface ChildProxy
- All Superinterfaces:
Proxy
- All Known Implementing Classes:
Bin,ChildProxy.ChildProxy$Impl,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
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceFunctional interface declaration of theChildAddedCallbackcallback.static classThe ChildProxy$Impl type represents a native instance of the ChildProxy interface.static classGstChildProxyinterface.static interfaceFunctional interface declaration of theChildRemovedCallbackcallback. -
Method Summary
Modifier and TypeMethodDescriptiondefault voidchildAdded(GObject child, String name) Emits theGstChildProxy::child-added signal.default voidchildRemoved(GObject child, String name) Emits theGstChildProxy::child-removed signal.default voidemitChildAdded(@Nullable GObject object, String name) Emits the "child-added" signal.default voidemitChildRemoved(@Nullable GObject object, String name) Emits the "child-removed" signal.default voidGets properties of the parent object and its children.default @Nullable GObjectgetChildByIndex(int index) Fetches a child by its number.default @Nullable GObjectgetChildByName(String name) Looks up a child element by the given name.default @Nullable GObjectgetChildByNameRecurse(String name) Looks up a child element by the given full-path name.default intGets the number of child objects this parent contains.default voidgetProperty(String name, Value value) Gets a single property using the GstChildProxy mechanism.static @Nullable TypegetType()Get the GType of the ChildProxy classdefault booleanLooks up which object andGParamSpecwould be effected by the givenname.Will be emitted after theobjectwas added to thechildProxy.Will be emitted after theobjectwas removed from thechildProxy.default voidSets properties of the parent object and its children.default voidsetProperty(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
nullif not found (index too high).
-
getChildByName
Looks up a child element by the given name.This virtual method has a default implementation that uses
GstObjecttogether 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
nullif 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
nullif not found. - Since:
- 1.22
-
getChildrenCount
default int getChildrenCount()Gets the number of child objects this parent contains.- Returns:
- the number of child objects
-
getProperty
-
lookup
Looks up which object andGParamSpecwould be effected by the givenname.- Parameters:
name- name of the property to look uptarget- pointer to aGObjectthat takes the real object to set property onpspec- pointer to take theGParamSpecdescribing the property- Returns:
trueiftargetandpspeccould be found.falseotherwise. In that case the values forpspecandtargetare not modified. Unreftargetafter usage. For plainGObjecttargetis the same asobject.
-
set
-
setProperty
-
onChildAdded
default SignalConnection<ChildProxy.ChildAddedCallback> onChildAdded(ChildProxy.ChildAddedCallback handler) Will be emitted after theobjectwas 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 theobjectwas 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).
-