Next: , Previous: GstCaps, Up: Top


6 GstChildProxy

Interface for multi child elements.

6.1 Overview

This interface abstracts handling of property sets for child elements. Imagine elements such as mixers or polyphonic generators. They all have multiple <gst-pad> or some kind of voice objects. The element acts as a parent for those child objects. Each child has the same properties.

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" also implements the <gst-child-proxy> interface.

6.2 Usage

— Function: gst-child-proxy-get-children-count (self <gst-child-proxy*>)   (ret unsigned-int)

Gets the number of child objects this parent contains.

parent
the parent object
ret
the number of child objects MT safe.
— Function: gst-child-proxy-get-child-by-name (self <gst-child-proxy*>) (name mchars)   (ret <gst-object>)

Looks up a child element by the given name.

Implementors can use <gst-object> together with gst-object-get-name

parent
the parent object to get the child from
name
the childs name
ret
the child object or ‘#f’ if not found. Unref after usage. MT safe.
— Function: gst-child-proxy-get-child-by-index (self <gst-child-proxy*>) (index unsigned-int)   (ret <gst-object>)

Fetches a child by its number.

parent
the parent object to get the child from
index
the childs position in the child list
ret
the child object or ‘#f’ if not found (index too high). Unref after usage. MT safe.
— Function: gst-child-proxy-lookup (object <gst-object>) (name mchars) (target <gst-object**>) (pspec <g-param-spec**>)   (ret bool)

Looks up which object and <gparam> would be effected by the given name.

object
object to lookup the property in
name
name of the property to look up
target
pointer to a <gst-object> that takes the real object to set property on
pspec
pointer to take the <gparam> describing the property
ret
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. MT safe.
— Function: gst-child-proxy-get-property (object <gst-object>) (name mchars) (value <gvalue>)

Gets a single property using the GstChildProxy mechanism. You are responsible for for freeing it by calling g-value-unset

object
object to query
name
name of the property
value
a <gvalue> that should take the result.
— Function: gst-child-proxy-set-property (object <gst-object>) (name mchars) (value <gvalue>)

Sets a single property using the GstChildProxy mechanism.

object
the parent object
name
name of the property to set
value
new <gvalue> for the property
— Function: gst-child-proxy-child-added (object <gst-object>) (child <gst-object>)

Emits the "child-added" signal.

object
the parent object
child
the newly added child
— Function: gst-child-proxy-child-removed (object <gst-object>) (child <gst-object>)

Emits the "child-removed" signal.

object
the parent object
child
the newly added child