gstreamermm: Gst::ChildProxy Class Reference

gstreamermm 0.10.10

- Main Page
- Modules
- Namespaces
- Classes

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | Static Public Member Functions | Protected Member Functions | Related Functions

# Gst::ChildProxy Class Reference
gstreamermm Interfaces

An interface for multi child elements. More...

Inheritance diagram for Gst::ChildProxy:
[legend]
Collaboration diagram for Gst::ChildProxy:
[legend]

List of all members.

## Public Member Functions
virtual | ~ChildProxy ()
GstChildProxy* | gobj ()
| Provides access to the underlying C GObject.
const GstChildProxy* | gobj () const
| Provides access to the underlying C GObject.
guint | get_children_count () const
| Gets the number of child objects this parent contains.
Glib::RefPtr< Gst::Object > | get_child (const Glib::ustring& name)
| Looks up a child element by the given name.
Glib::RefPtr< const Gst::Object > | get_child (const Glib::ustring& name) const
| Looks up a child element by the given name.
Glib::RefPtr< Gst::Object > | get_child (guint index)
| Fetches a child by its number.
Glib::RefPtr< const Gst::Object > | get_child (guint index) const
| Fetches a child by its number.
Glib::RefPtr< Gst::ChildProxy > | get_proxy_property (const Glib::ustring& name, Glib::ValueBase&value)
| Gets a single property using the Gst::ChildProxy mechanism.
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.
Glib::RefPtr< Gst::ChildProxy > | set_proxy_property (const Glib::ustring& name, const Glib::ValueBase&value)
| Sets a single property using the Gst::ChildProxy mechanism.
void | child_added (const Glib::RefPtr< Gst::Object >& child)
| Emits the "child-added" signal.
void | child_removed (const Glib::RefPtr< Gst::Object >& child)
| Emits the "child-removed" signal.
Glib::SignalProxy1< void, const Glib::RefPtr < Gst::Object >& > | signal_child_added ()
| Will be emitted after the object was added to the child_proxy.
Glib::SignalProxy1< void, const Glib::RefPtr < Gst::Object >& > | signal_child_removed ()
| Will be emitted after the object was removed from the child_proxy.
virtual Glib::RefPtr< Gst::Object > | get_child_by_index_vfunc (guint index) const
| Virtual method to fetch the child.
virtual guint | get_children_count_vfunc () const
| Virtual method to get the children count.
## Static Public Member Functions
static void | add_interface (GType gtype_implementer)
static bool | lookup (const Glib::RefPtr< Gst::Object >& object, const Glib::ustring& name, Glib::RefPtr< Gst::Object >& target, GParamSpec*& pspec)
| Looks up which object and ParamSpec would be effected by the given name.
## Protected Member Functions
virtual void | on_child_added (const Glib::RefPtr< Gst::Object >& object)
virtual void | on_child_removed (const Glib::RefPtr< Gst::Object >& object)
## 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.

## 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

virtual Gst::ChildProxy::~ChildProxy | ( |  | ) | `[virtual]`

## Member Function Documentation

static void Gst::ChildProxy::add_interface | ( | GType | gtype_implementer | ) | `[static]`

void Gst::ChildProxy::child_added | ( | const Glib::RefPtr< Gst::Object >& | child | ) |

Emits the "child-added" signal.

Parameters:

  child | The newly added child.

void Gst::ChildProxy::child_removed | ( | const Glib::RefPtr< Gst::Object >& | child | ) |

Emits the "child-removed" signal.

Parameters:

  child | The newly added child.

Glib::RefPtr<Gst::Object> Gst::ChildProxy::get_child | ( | const Glib::ustring & | name | ) |

Looks up a child element by the given name.

Implementors can use Gst::Object together with Gst::Object::get_name()

Parameters:

  name | The childs name.

Returns:
  The child object or `0` if not found. Unref after usage.

MT safe.

Glib::RefPtr<const Gst::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 `0` if not found (index too high). 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.

Implementors can use Gst::Object together with Gst::Object::get_name()

Parameters:

  name | The childs name.

Returns:
  The child object or `0` if not found. Unref after usage.

MT safe.

Glib::RefPtr<Gst::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 `0` if not found (index too high). Unref after usage.

MT safe.

virtual Glib::RefPtr<Gst::Object> Gst::ChildProxy::get_child_by_index_vfunc | ( | guint | index | ) | const`[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 guint Gst::ChildProxy::get_children_count_vfunc | ( |  | ) | const`[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.

GstChildProxy* Gst::ChildProxy::gobj | ( |  | ) | `[inline]`

Provides access to the underlying C GObject.

Reimplemented from Glib::Interface.

Reimplemented in Gst::Bin, Gst::Pipeline, Gst::DecodeBin2, Gst::DecodeBin, Gst::PlayBin2, Gst::PlayBin, Gst::SubtitleOverlay, and Gst::UriDecodeBin.

const GstChildProxy* Gst::ChildProxy::gobj | ( |  | ) | const`[inline]`

Provides access to the underlying C GObject.

Reimplemented from Glib::Interface.

Reimplemented in Gst::Bin, Gst::Pipeline, Gst::DecodeBin2, Gst::DecodeBin, Gst::PlayBin2, Gst::PlayBin, Gst::SubtitleOverlay, and Gst::UriDecodeBin.

static bool Gst::ChildProxy::lookup | ( | const Glib::RefPtr< Gst::Object >& | object,
|  | const Glib::ustring & | name,
|  | Glib::RefPtr< Gst::Object >& | target,
|  | GParamSpec *& | pspec
| ) |  | `[static]`

Looks up which object and ParamSpec would be effected by the given name.

Parameters:

  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 ParamSpec 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.

virtual void Gst::ChildProxy::on_child_added | ( | const Glib::RefPtr< Gst::Object >& | object | ) | `[protected, virtual]`

virtual void Gst::ChildProxy::on_child_removed | ( | const Glib::RefPtr< Gst::Object >& | object | ) | `[protected, virtual]`

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::SignalProxy1< void,const Glib::RefPtr<Gst::Object>& > Gst::ChildProxy::signal_child_added | ( |  | ) |

Will be emitted after the object was added to the child_proxy.

Prototype:
  `void on_my_child_added(const Glib::RefPtr<Gst::Object>& object)`

Glib::SignalProxy1< void,const Glib::RefPtr<Gst::Object>& > Gst::ChildProxy::signal_child_removed | ( |  | ) |

Will be emitted after the object was removed from the child_proxy.

Prototype:
  `void on_my_child_removed(const Glib::RefPtr<Gst::Object>& object)`

## Friends And Related Function Documentation

Glib::RefPtr< Gst::ChildProxy > wrap | ( | GstChildProxy * | object,
|  | bool | take_copy = `false`
| ) |  | `[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