gstreamermm: Gst::ChildProxy Class Reference
An interface for multi child elements. More...


Public Member Functions | |
| virtual | ~ChildProxy () |
| GstChildProxy* | gobj () |
| Provides access to the underlying C GObject. More... | |
| const GstChildProxy* | gobj () const |
| Provides access to the underlying C GObject. More... | |
| guint | get_children_count () const |
| Gets the number of child objects this parent contains. More... | |
| Glib::RefPtr< Gst::Object > | get_child (const Glib::ustring& name) |
| Looks up a child element by the given name. More... | |
| Glib::RefPtr< const Gst::Object > | get_child (const Glib::ustring& name) const |
| Looks up a child element by the given name. More... | |
| Glib::RefPtr< Glib::Object > | get_child (guint index) |
| Fetches a child by its number. More... | |
| Glib::RefPtr< const Glib::Object > | get_child (guint index) const |
| Fetches a child by its number. More... | |
| Glib::RefPtr< Gst::ChildProxy > | get_proxy_property (const Glib::ustring& name, Glib::ValueBase& value) |
| Gets a single property using the Gst::ChildProxy mechanism. More... | |
| Glib::RefPtr< const Gst::ChildProxy > | get_proxy_property (const Glib::ustring& name, Glib::ValueBase& value) const |
| Gets a single property using the Gst::ChildProxy mechanism. More... | |
| Glib::RefPtr< Gst::ChildProxy > | set_proxy_property (const Glib::ustring& name, const Glib::ValueBase& value) |
| Sets a single property using the Gst::ChildProxy mechanism. More... | |
| void | child_added (const Glib::RefPtr< Gst::Object >& child, const Glib::ustring& name) |
| Emits the "child-added" signal. More... | |
| void | child_removed (const Glib::RefPtr< Gst::Object >& child, const Glib::ustring& name) |
| Emits the "child-removed" signal. More... | |
| Glib::SignalProxy2< void, const Glib::RefPtr < Gst::Object >&, const Glib::ustring& > | signal_child_added () |
| Glib::SignalProxy2< void, const Glib::RefPtr < Gst::Object >&, const Glib::ustring& > | signal_child_removed () |
| virtual Glib::RefPtr < Glib::Object > | get_child_by_index_vfunc (guint index) const |
| Virtual method to fetch the child. More... | |
| virtual guint | get_children_count_vfunc () const |
| Virtual method to get the children count. More... | |
Static Public Member Functions | |
| static void | add_interface (GType gtype_implementer) |
| static GType | get_type () |
| Get the GType for this class, for use with the underlying GObject type system. More... | |
| static bool | lookup (const Glib::RefPtr< Gst::ChildProxy >& object, const Glib::ustring& name, Glib::RefPtr< Glib::Object >& target, GParamSpec*& pspec) |
| Looks up which object and ParamSpec would be effected by the given name. More... | |
Protected Member Functions | |
| ChildProxy () | |
| You should derive from this class to use it. More... | |
| virtual void | on_child_added (const Glib::RefPtr< Gst::Object >& object, const Glib::ustring& name) |
| This is a default handler for the signal signal_child_added(). More... | |
| virtual void | on_child_removed (const Glib::RefPtr< Gst::Object >& object, const Glib::ustring& name) |
| This is a default handler for the signal signal_child_removed(). More... | |
Related Functions | |
(Note that these are not member functions.) | |
| Glib::RefPtr< Gst::ChildProxy > | wrap (GstChildProxy* object, bool take_copy=false) |
| A Glib::wrap() method for this object. More... | |
Detailed Description
An interface for multi child elements.
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 get_proxy_property() and set_proxy_property().
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::ChildProxy interface.
Constructor & Destructor Documentation
|
protected |
You should derive from this class to use it.
|
virtual |
Member Function Documentation
|
static |
| void Gst::ChildProxy::child_added | ( | const Glib::RefPtr< Gst::Object >& | child, |
| const Glib::ustring & | name | ||
| ) |
Emits the "child-added" signal.
- Parameters
-
child The newly added child. name The name of the new child.
| void Gst::ChildProxy::child_removed | ( | const Glib::RefPtr< Gst::Object >& | child, |
| const Glib::ustring & | name | ||
| ) |
Emits the "child-removed" signal.
- Parameters
-
child The removed child. name The name of the old child.
| Glib::RefPtr<Gst::Object> Gst::ChildProxy::get_child | ( | const Glib::ustring & | name | ) |
Looks up a child element by the given name.
This virtual method has a default implementation that uses Gst::Object together with Gst::Object::get_name(). If the interface is to be used with Objects, this methods needs to be overridden.
- Parameters
-
name The childs name.
- Returns
- The child object or
0if not found. Unref after usage.
MT safe.
| Glib::RefPtr<const Gst::Object> Gst::ChildProxy::get_child | ( | const Glib::ustring & | name | ) | const |
Looks up a child element by the given name.
This virtual method has a default implementation that uses Gst::Object together with Gst::Object::get_name(). If the interface is to be used with Objects, this methods needs to be overridden.
- Parameters
-
name The childs name.
- Returns
- The child object or
0if not found. Unref after usage.
MT safe.
| Glib::RefPtr<Glib::Object> Gst::ChildProxy::get_child | ( | guint | index | ) |
Fetches a child by its number.
- Parameters
-
index The childs position in the child list.
- Returns
- The child object or
0if not found (index too high). Unref after usage.
MT safe.
| Glib::RefPtr<const Glib::Object> Gst::ChildProxy::get_child | ( | guint | index | ) | const |
Fetches a child by its number.
- Parameters
-
index The childs position in the child list.
- Returns
- The child object or
0if not found (index too high). Unref after usage.
MT safe.
|
virtual |
Virtual method to fetch the child.
| guint Gst::ChildProxy::get_children_count | ( | ) | const |
Gets the number of child objects this parent contains.
- Returns
- The number of child objects
MT safe.
|
virtual |
Virtual method to get the children count.
| Glib::RefPtr<Gst::ChildProxy> Gst::ChildProxy::get_proxy_property | ( | const Glib::ustring & | name, |
| Glib::ValueBase & | value | ||
| ) |
Gets a single property using the Gst::ChildProxy mechanism.
- Parameters
-
name The property to get. value An empty Glib::ValueBase in which to store the property.
- Returns
- This Gst::ChildProxy so more properties can be retrieved if needed.
| Glib::RefPtr<const Gst::ChildProxy> Gst::ChildProxy::get_proxy_property | ( | const Glib::ustring & | name, |
| Glib::ValueBase & | value | ||
| ) | const |
Gets a single property using the Gst::ChildProxy mechanism.
- Parameters
-
name The property to get. value An empty Glib::ValueBase in which to store the property.
- Returns
- This Gst::ChildProxy so more properties can be retrieved if needed.
|
static |
Get the GType for this class, for use with the underlying GObject type system.
|
inline |
Provides access to the underlying C GObject.
|
inline |
Provides access to the underlying C GObject.
|
static |
Looks up which object and ParamSpec would be effected by the given name.
MT safe.
- Parameters
-
name Name of the property to look up. target Pointer to a Object that takes the real object to set property on. pspec Pointer to take the ParamSpec describing the property.
- Returns
trueif target and pspec could be found.falseotherwise. In that case the values for pspec and target are not modified. Unref target after usage. For plain GObjects target is the same as object.
|
protectedvirtual |
This is a default handler for the signal signal_child_added().
|
protectedvirtual |
This is a default handler for the signal signal_child_removed().
| Glib::RefPtr<Gst::ChildProxy> Gst::ChildProxy::set_proxy_property | ( | const Glib::ustring & | name, |
| const Glib::ValueBase & | value | ||
| ) |
Sets a single property using the Gst::ChildProxy mechanism.
- Parameters
-
name The property to get. value The Glib::ValueBase to set the property to (non-empty).
- Returns
- This Gst::ChildProxy so more properties can be set.
| Glib::SignalProxy2< void,const Glib::RefPtr<Gst::Object>&,const Glib::ustring& > Gst::ChildProxy::signal_child_added | ( | ) |
- Slot Prototype:
void on_my_child_added(const Glib::RefPtr<Gst::Object>& object, const Glib::ustring& name)
Will be emitted after the object was added to the child_proxy.
- Parameters
-
object The Object that was added. name The name of the new child.
| Glib::SignalProxy2< void,const Glib::RefPtr<Gst::Object>&,const Glib::ustring& > Gst::ChildProxy::signal_child_removed | ( | ) |
- Slot Prototype:
void on_my_child_removed(const Glib::RefPtr<Gst::Object>& object, const Glib::ustring& name)
Will be emitted after the object was removed from the child_proxy.
- Parameters
-
object The Object that was removed. name The name of the old child.
Friends And Related Function Documentation
|
related |
A Glib::wrap() method for this object.
- Parameters
-
object The C instance. take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
- Returns
- A C++ instance that wraps this C instance.
The documentation for this class was generated from the following file:
- gstreamermm/childproxy.h
