Gst.ChildProxy¶
- Implementations:
Methods¶
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
|
|
|
|
|
|
|
|
Properties¶
None
Signals¶
Name |
Short Description |
|---|---|
Will be emitted after the object was added to the child_proxy. |
|
Will be emitted after the object was removed from the child_proxy. |
Fields¶
None
Class Details¶
- class Gst.ChildProxy¶
- Bases:
- Structure:
This interface abstracts handling of property sets for elements with children. Imagine elements such as mixers or polyphonic generators. They all have multiple
Gst.Pador some kind of voice objects. Another use case are container elements likeGst.Bin. 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. Thuschild1::child2::propertyis valid too, ifchild1andchild2implement theGst.ChildProxyinterface.- child_added(child, name)[source]¶
- Parameters:
child (
GObject.Object) – the newly added childname (
str) – the name of the new child
Emits the
Gst.ChildProxy::child-addedsignal.
- child_removed(child, name)[source]¶
- Parameters:
child (
GObject.Object) – the removed childname (
str) – the name of the old child
Emits the
Gst.ChildProxy::child-removedsignal.
- get_child_by_index(index)[source]¶
- Parameters:
index (
int) – the child’s position in the child list- Returns:
the child object or
Noneif not found (index too high).- Return type:
Fetches a child by its number.
- get_child_by_name(name)[source]¶
- Parameters:
name (
str) – the child’s name- Returns:
the child object or
Noneif not found.- Return type:
Looks up a child element by the given name.
This virtual method has a default implementation that uses
Gst.Objecttogether withGst.Object.get_name(). If the interface is to be used withGObject.Objects, this methods needs to be overridden.
- get_child_by_name_recurse(name)[source]¶
- Parameters:
name (
str) – the full-path child’s name- Returns:
the child object or
Noneif not found.- Return type:
Looks up a child element by the given full-path name.
Similar to
Gst.ChildProxy.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:py:func:::child3<Gst.ChildProxy.signals.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.New in version 1.22.
- get_children_count()[source]¶
- Returns:
the number of child objects
- Return type:
Gets the number of child objects this parent contains.
- get_property(name)[source]¶
- Parameters:
name (
str) – name of the property- Returns:
a
GObject.Valuethat should take the result.- Return type:
value:
GObject.Value
Gets a single property using the
Gst.ChildProxymechanism. You are responsible for freeing it by callingGObject.Value.unset()
- lookup(name)[source]¶
- Parameters:
name (
str) – name of the property to look up- Returns:
Trueif target and pspec could be found.Falseotherwise. In that case the values for pspec and target are not modified. Unref target after usage. For plainGObject.Objecttarget is the same as self.- target:
pointer to a
GObject.Objectthat takes the real object to set property on- pspec:
pointer to take the
GObject.ParamSpecdescribing the property
- Return type:
(
bool, target:GObject.Object, pspec:GObject.ParamSpec)
Looks up which object and
GObject.ParamSpecwould be effected by the given name.
- set_property(name, value)[source]¶
- Parameters:
name (
str) – name of the property to setvalue (
GObject.Value) – newGObject.Valuefor the property
Sets a single property using the
Gst.ChildProxymechanism.
- do_child_added(child, name) virtual¶
- Parameters:
child (
GObject.Object) – the newly added childname (
str) – the name of the new child
Emits the
Gst.ChildProxy::child-addedsignal.
- do_child_removed(child, name) virtual¶
- Parameters:
child (
GObject.Object) – the removed childname (
str) – the name of the old child
Emits the
Gst.ChildProxy::child-removedsignal.
- do_get_child_by_index(index) virtual¶
- Parameters:
index (
int) – the child’s position in the child list- Returns:
the child object or
Noneif not found (index too high).- Return type:
Fetches a child by its number.
- do_get_child_by_name(name) virtual¶
- Parameters:
name (
str) – the child’s name- Returns:
the child object or
Noneif not found.- Return type:
Looks up a child element by the given name.
This virtual method has a default implementation that uses
Gst.Objecttogether withGst.Object.get_name(). If the interface is to be used withGObject.Objects, this methods needs to be overridden.
Signal Details¶
- Gst.ChildProxy.signals.child_added(child_proxy, object, name)¶
- Signal Name:
child-added- Flags:
- Parameters:
child_proxy (
Gst.ChildProxy) – The object which received the signalobject (
GObject.Object) – theGObject.Objectthat was addedname (
str) – the name of the new child
Will be emitted after the object was added to the child_proxy.
- Gst.ChildProxy.signals.child_removed(child_proxy, object, name)¶
- Signal Name:
child-removed- Flags:
- Parameters:
child_proxy (
Gst.ChildProxy) – The object which received the signalobject (
GObject.Object) – theGObject.Objectthat was removedname (
str) – the name of the old child
Will be emitted after the object was removed from the child_proxy.