gstreamermm
1.10.0
|
Interface for multi child elements. More...
#include <gstreamermm/childproxy.h>
Public Member Functions | |
ChildProxy (ChildProxy&& src) noexcept | |
ChildProxy& | operator= (ChildProxy&& src) noexcept |
~ChildProxy () noexcept override | |
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... | |
bool | lookup (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... | |
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::SignalProxy< void, const Glib::RefPtr< Gst::Object >&, const Glib::ustring&> | signal_child_added () |
Glib::SignalProxy< void, const Glib::RefPtr< Gst::Object >&, const Glib::ustring&> | signal_child_removed () |
virtual Glib::RefPtr< Glib::Object > | get_child_by_name_vfunc (const Glib::ustring& name) const |
Virtual method to fetch the child by name. More... | |
virtual Glib::RefPtr< Glib::Object > | get_child_by_index_vfunc (guint index) const |
Virtual method to fetch the child by index. 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... | |
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... | |
Interface for multi child elements.
This interface abstracts handling of property sets for elements with children. Imagine elements such as mixers or polyphonic generators. They all have multiple Gst::Pad or some kind of voice objects. Another use case are container elements like Gst::Bin. 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 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" and "child2" implement the Gst::ChildProxy interface.
Last reviewed on 2016-05-16 (1.8.0)
|
protected |
You should derive from this class to use it.
|
noexcept |
|
overridenoexcept |
|
static |
void Gst::ChildProxy::child_added | ( | const Glib::RefPtr< Gst::Object >& | child, |
const Glib::ustring & | name | ||
) |
Emits the "child-added" signal.
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.
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.
name | The child's name. |
nullptr
if 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.
name | The child's name. |
nullptr
if not found. Unref after usage.MT safe.
Glib::RefPtr<Glib::Object> Gst::ChildProxy::get_child | ( | guint | index | ) |
Fetches a child by its number.
index | The child's position in the child list. |
nullptr
if 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.
index | The child's position in the child list. |
nullptr
if not found (index too high). Unref after usage.MT safe.
|
virtual |
Virtual method to fetch the child by index.
|
virtual |
Virtual method to fetch the child by name.
guint Gst::ChildProxy::get_children_count | ( | ) | const |
Gets the number of child objects this parent contains.
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.
name | The property to get. |
value | An empty Glib::ValueBase in which to store the property. |
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.
name | The property to get. |
value | An empty Glib::ValueBase in which to store the property. |
|
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.
bool Gst::ChildProxy::lookup | ( | const Glib::ustring & | name, |
Glib::RefPtr< Glib::Object > & | target, | ||
GParamSpec *& | pspec | ||
) |
Looks up which object and ParamSpec would be effected by the given name.
MT safe.
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. |
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 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().
|
noexcept |
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.
name | The property to get. |
value | The Glib::ValueBase to set the property to (non-empty). |
Glib::SignalProxy< void,const Glib::RefPtr<Gst::Object>&,const Glib::ustring& > Gst::ChildProxy::signal_child_added | ( | ) |
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.
object | The Object that was added. |
name | The name of the new child. |
Glib::SignalProxy< void,const Glib::RefPtr<Gst::Object>&,const Glib::ustring& > Gst::ChildProxy::signal_child_removed | ( | ) |
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.
object | The Object that was removed. |
name | The name of the old child. |
|
related |
A Glib::wrap() method for this object.
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. |