| GStreamer 0.10 Core Reference Manual | ||||
|---|---|---|---|---|
#include <gst/gst.h> guint gst_child_proxy_get_children_count (GstChildProxy *parent); GstObject* gst_child_proxy_get_child_by_name (GstChildProxy *parent, const gchar *name); GstObject* gst_child_proxy_get_child_by_index (GstChildProxy *parent, guint index); gboolean gst_child_proxy_lookup (GstObject *object, const gchar *name, GstObject **target, GParamSpec **pspec); void gst_child_proxy_get_property (GstObject *object, const gchar *name, GValue *value); void gst_child_proxy_get_valist (GstObject *object, const gchar *first_property_name, va_list var_args); void gst_child_proxy_get (GstObject *object, const gchar *first_property_name, ...); void gst_child_proxy_set_property (GstObject *object, const gchar *name, const GValue *value); void gst_child_proxy_set_valist (GstObject *object, const gchar *first_property_name, va_list var_args); void gst_child_proxy_set (GstObject *object, const gchar *first_property_name, ...); void gst_child_proxy_child_added (GstObject *object, GstObject *child); void gst_child_proxy_child_removed (GstObject *object, GstObject *child);
This interface abstracts handling of property sets for child elements. Imagine elements such as mixers or polyphonic generators. They all have multiple GstPad 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 GstChildProxy interface.
guint gst_child_proxy_get_children_count
(GstChildProxy *parent);
Gets the number of child objects this parent contains.
parent :parent the parent object
the parent object
Returns :Returns the number of child objects
MT safe.
the number of child objects
MT safe.
parent : |
the parent object |
| Returns : | the number of child objects MT safe. |
GstObject* gst_child_proxy_get_child_by_name (GstChildProxy *parent, const gchar *name);
Looks up a child element by the given name.
Implementors can use GstObject together with gst_object_get_name()
parent :parent the parent object to get the child from
the parent object to get the child from
name :name the childs name
the childs name
Returns :Returns the child object or NULL if not found. Unref after usage.
MT safe.
the child object or NULL if not found. Unref after usage.
MT safe.
NULLNULL
parent : |
the parent object to get the child from |
name : |
the childs name |
| Returns : | the child object or NULL if not found. Unref after usage.
MT safe.
|
GstObject* gst_child_proxy_get_child_by_index (GstChildProxy *parent, guint index);
Fetches a child by its number.
parent :parent the parent object to get the child from
the parent object to get the child from
index :index the childs position in the child list
the childs position in the child list
Returns :Returns the child object or NULL if not found (index too high). Unref
after usage.
MT safe.
the child object or NULL if not found (index too high). Unref
after usage.
MT safe.
NULLNULL
parent : |
the parent object to get the child from |
index : |
the childs position in the child list |
| Returns : | the child object or NULL if not found (index too high). Unref
after usage.
MT safe.
|
gboolean gst_child_proxy_lookup (GstObject *object, const gchar *name, GstObject **target, GParamSpec **pspec);
Looks up which object and GParamSpec would be effected by the given name.
object :object object to lookup the property in
object to lookup the property in
name :name name of the property to look up
name of the property to look up
target :target pointer to a GstObject that takes the real object to set property on
pointer to a GstObject that takes the real object to set property on
GstObjectGstObjectpspec :pspec pointer to take the GParamSpec describing the property
pointer to take the GParamSpec describing the property
GParamSpecGParamSpecReturns :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.
MT safe.
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.
targetpspecpspectargettarget
object : |
object to lookup the property in |
name : |
name of the property to look up |
target : |
pointer to a GstObject that takes the real object to set property on |
pspec : |
pointer 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.
MT safe.
|
void gst_child_proxy_get_property (GstObject *object, const gchar *name, GValue *value);
Gets a single property using the GstChildProxy mechanism.
You are responsible for for freeing it by calling g_value_unset()
object :object object to query
object to query
name :name name of the property
name of the property
value :value an uninitialized GValue that should take the result.
an uninitialized GValue that should take the result.
GValueGValue
object : |
object to query |
name : |
name of the property |
value : |
an uninitialized GValue that should take the result. |
void gst_child_proxy_get_valist (GstObject *object, const gchar *first_property_name, va_list var_args);
Gets properties of the parent object and its children.
object :object the object to query
the object to query
first_property_name :first_property_name name of the first property to get
name of the first property to get
var_args :var_args return location for the first property, followed optionally by more name/return location pairs, followed by NULL
return location for the first property, followed optionally by more name/return location pairs, followed by NULL
object : |
the object to query |
first_property_name : |
name of the first property to get |
var_args : |
return location for the first property, followed optionally by more name/return location pairs, followed by NULL |
void gst_child_proxy_get (GstObject *object, const gchar *first_property_name, ...);
Gets properties of the parent object and its children.
object :object the parent object
the parent object
first_property_name :first_property_name name of the first property to get
name of the first property to get
... :... return location for the first property, followed optionally by more name/return location pairs, followed by NULL
return location for the first property, followed optionally by more name/return location pairs, followed by NULL
object : |
the parent object |
first_property_name : |
name of the first property to get |
... : |
return location for the first property, followed optionally by more name/return location pairs, followed by NULL |
void gst_child_proxy_set_property (GstObject *object, const gchar *name, const GValue *value);
Sets a single property using the GstChildProxy mechanism.
object :object the parent object
the parent object
name :name name of the property to set
name of the property to set
value :value new GValue for the property
new GValue for the property
GValueGValue
object : |
the parent object |
name : |
name of the property to set |
value : |
new GValue for the property |
void gst_child_proxy_set_valist (GstObject *object, const gchar *first_property_name, va_list var_args);
Sets properties of the parent object and its children.
object :object the parent object
the parent object
first_property_name :first_property_name name of the first property to set
name of the first property to set
var_args :var_args value for the first property, followed optionally by more name/value pairs, followed by NULL
value for the first property, followed optionally by more name/value pairs, followed by NULL
object : |
the parent object |
first_property_name : |
name of the first property to set |
var_args : |
value for the first property, followed optionally by more name/value pairs, followed by NULL |
void gst_child_proxy_set (GstObject *object, const gchar *first_property_name, ...);
Sets properties of the parent object and its children.
object :object the parent object
the parent object
first_property_name :first_property_name name of the first property to set
name of the first property to set
... :... value for the first property, followed optionally by more name/value pairs, followed by NULL
value for the first property, followed optionally by more name/value pairs, followed by NULL
object : |
the parent object |
first_property_name : |
name of the first property to set |
... : |
value for the first property, followed optionally by more name/value pairs, followed by NULL |
void gst_child_proxy_child_added (GstObject *object, GstObject *child);
Emits the "child-added" signal.
object :object the parent object
the parent object
child :child the newly added child
the newly added child
object : |
the parent object |
child : |
the newly added child |
void gst_child_proxy_child_removed (GstObject *object, GstObject *child);
Emits the "child-removed" signal.
object :object the parent object
the parent object
child :child the newly added child
the newly added child
object : |
the parent object |
child : |
the newly added child |