gst.child_proxy_mixin

Module for [ChildProxy] interface mixin

Templates 2

tmplChildProxyT()

This interface abstracts handling of property sets for elements with children. Imagine elements such as mixers or polyphonic generators. They all have multiple #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.ChildProxy.get] and [gst.child_proxy.ChildProxy.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.

Functions
void childAdded(gobject.object.ObjectWrap child, string name)

Emits the #GstChildProxy::child-added signal.

Parameters

childthe newly added child
namethe name of the new child
void childRemoved(gobject.object.ObjectWrap child, string name)

Emits the #GstChildProxy::child-removed signal.

Parameters

childthe removed child
namethe name of the old child
gobject.object.ObjectWrap getChildByIndex(uint index)

Fetches a child by its number.

Parameters

indexthe child's position in the child list

Returns

the child object or null if

not found (index too high).

gobject.object.ObjectWrap getChildByName(string name)

Looks up a child element by the given name.

This virtual method has a default implementation that uses #GstObject together with [gst.object.ObjectWrap.getName]. If the interface is to be used with #GObjects, this methods needs to be overridden.

Parameters

namethe child's name

Returns

the child object or null if

not found.

gobject.object.ObjectWrap getChildByNameRecurse(string name)

Looks up a child element by the given full-path name.

Similar to [gst.child_proxy.ChildProxy.getChildByName], 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

namethe full-path child's name

Returns

the child object or null if

not found.

uint getChildrenCount()

Gets the number of child objects this parent contains.

Returns

the number of child objects
void getChildProxyProperty(string name, out gobject.value.Value value)

Gets a single property using the GstChildProxy mechanism. You are responsible for freeing it by calling [gobject.value.Value.unset]

Parameters

namename of the property
valuea #GValue that should take the result.
bool lookup(string name, out gobject.object.ObjectWrap target, out gobject.param_spec.ParamSpec pspec)

Looks up which object and #GParamSpec would be effected by the given name.

Parameters

namename of the property to look up
targetpointer to a #GObject that takes the real object to set property on
pspecpointer to take the #GParamSpec describing the property

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 plain #GObject target is the same as object.

void setProperty(string name, gobject.value.Value value)

Sets a single property using the GstChildProxy mechanism.

Parameters

namename of the property to set
valuenew #GValue for the property
gulong connectChildAdded(T)(T callback, Flag!"After" after = No.After) if (isCallable!T && is(ReturnType!T == void) && (Parameters!T.length < 1 || (ParameterStorageClassTuple!T[0] == ParameterStorageClass.none && is(Parameters!T[0] : gobject.object.ObjectWrap))) && (Parameters!T.length < 2 || (ParameterStorageClassTuple!T[1] == ParameterStorageClass.none && is(Parameters!T[1] == string))) && (Parameters!T.length < 3 || (ParameterStorageClassTuple!T[2] == ParameterStorageClass.none && is(Parameters!T[2] : gst.child_proxy.ChildProxy))) && Parameters!T.length < 4)

Connect to ChildAdded signal.

Will be emitted after the object was added to the child_proxy.

Parameters

callbacksignal callback delegate or function to connect void callback(gobject.object.ObjectWrap object, string name, gst.child_proxy.ChildProxy childProxy) object the #GObject that was added (optional) name the name of the new child (optional) childProxy the instance the signal is connected to (optional)
afterYes.After to execute callback after default handler, No.After to execute before (default)

Returns

Signal ID
gulong connectChildRemoved(T)(T callback, Flag!"After" after = No.After) if (isCallable!T && is(ReturnType!T == void) && (Parameters!T.length < 1 || (ParameterStorageClassTuple!T[0] == ParameterStorageClass.none && is(Parameters!T[0] : gobject.object.ObjectWrap))) && (Parameters!T.length < 2 || (ParameterStorageClassTuple!T[1] == ParameterStorageClass.none && is(Parameters!T[1] == string))) && (Parameters!T.length < 3 || (ParameterStorageClassTuple!T[2] == ParameterStorageClass.none && is(Parameters!T[2] : gst.child_proxy.ChildProxy))) && Parameters!T.length < 4)

Connect to ChildRemoved signal.

Will be emitted after the object was removed from the child_proxy.

Parameters

callbacksignal callback delegate or function to connect void callback(gobject.object.ObjectWrap object, string name, gst.child_proxy.ChildProxy childProxy) object the #GObject that was removed (optional) name the name of the old child (optional) childProxy the instance the signal is connected to (optional)
afterYes.After to execute callback after default handler, No.After to execute before (default)

Returns

Signal ID
tmplChildProxyGidBuilderT()