Top | ![]() |
![]() |
![]() |
![]() |
guint | gst_child_proxy_get_children_count () |
GstObject * | gst_child_proxy_get_child_by_name () |
GstObject * | gst_child_proxy_get_child_by_index () |
gboolean | gst_child_proxy_lookup () |
void | gst_child_proxy_get_property () |
void | gst_child_proxy_get_valist () |
void | gst_child_proxy_get () |
void | gst_child_proxy_set_property () |
void | gst_child_proxy_set_valist () |
void | gst_child_proxy_set () |
void | gst_child_proxy_child_added () |
void | gst_child_proxy_child_removed () |
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_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" and "child2" implement the GstChildProxy interface.
guint
gst_child_proxy_get_children_count (GstChildProxy *parent
);
Gets the number of child objects this parent contains.
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()
GstObject * gst_child_proxy_get_child_by_index (GstChildProxy *parent
,guint index
);
Fetches a child by its number.
parent |
the parent object to get the child from |
|
index |
the childs position in the child list |
the child object or NULL
if not found (index
too high). Unref after usage.
MT safe.
[transfer full]
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 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. |
[out][allow-none][transfer full] |
pspec |
pointer to take the GParamSpec describing the property. |
[out][allow-none][transfer full] |
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 freeing it by calling g_value_unset()
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.
void gst_child_proxy_get (GstObject *object
,const gchar *first_property_name
,...
);
Gets properties of the parent object and its children.
void gst_child_proxy_set_property (GstObject *object
,const gchar *name
,const GValue *value
);
Sets a single property using the GstChildProxy mechanism.
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.
void gst_child_proxy_set (GstObject *object
,const gchar *first_property_name
,...
);
Sets properties of the parent object and its children.
void gst_child_proxy_child_added (GstObject *object
,GstObject *child
);
Emits the "child-added" signal.
struct GstChildProxyInterface { GTypeInterface parent; /* methods */ GstObject *(*get_child_by_index) (GstChildProxy * parent, guint index); guint (*get_children_count) (GstChildProxy * parent); };
GstChildProxy interface.
“child-added”
signalvoid user_function (GstChildProxy *child_proxy, GObject *object, gpointer user_data)
Will be emitted after the object
was added to the child_proxy
.
child_proxy |
the GstChildProxy |
|
object |
the GObject that was added |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run First
“child-removed”
signalvoid user_function (GstChildProxy *child_proxy, GObject *object, gpointer user_data)
Will be emitted after the object
was removed from the child_proxy
.
child_proxy |
the GstChildProxy |
|
object |
the GObject that was removed |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run First