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.Pad
or 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::property
is valid too, ifchild1
andchild2
implement theGst.ChildProxy
interface.- 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-added
signal.
- child_removed(child, name)[source]¶
- Parameters:
child (
GObject.Object
) – the removed childname (
str
) – the name of the old child
Emits the
Gst.ChildProxy
::child-removed
signal.
- get_child_by_index(index)[source]¶
- Parameters:
index (
int
) – the child’s position in the child list- Returns:
the child object or
None
if 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
None
if not found.- Return type:
Looks up a child element by the given name.
This virtual method has a default implementation that uses
Gst.Object
together 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
None
if 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.Value
that should take the result.- Return type:
value:
GObject.Value
Gets a single property using the
Gst.ChildProxy
mechanism. You are responsible for freeing it by callingGObject.Value.unset
()
- lookup(name)[source]¶
- Parameters:
name (
str
) – name of the property to look up- Returns:
True
if target and pspec could be found.False
otherwise. In that case the values for pspec and target are not modified. Unref target after usage. For plainGObject.Object
target is the same as self.- target:
pointer to a
GObject.Object
that takes the real object to set property on- pspec:
pointer to take the
GObject.ParamSpec
describing the property
- Return type:
(
bool
, target:GObject.Object
, pspec:GObject.ParamSpec
)
Looks up which object and
GObject.ParamSpec
would be effected by the given name.
- set_property(name, value)[source]¶
- Parameters:
name (
str
) – name of the property to setvalue (
GObject.Value
) – newGObject.Value
for the property
Sets a single property using the
Gst.ChildProxy
mechanism.
- 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-added
signal.
- 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-removed
signal.
- do_get_child_by_index(index) virtual¶
- Parameters:
index (
int
) – the child’s position in the child list- Returns:
the child object or
None
if 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
None
if not found.- Return type:
Looks up a child element by the given name.
This virtual method has a default implementation that uses
Gst.Object
together 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.Object
that 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.Object
that was removedname (
str
) – the name of the old child
Will be emitted after the object was removed from the child_proxy.