Gst::ChildProxy Class Reference

Gst::ChildProxy — An interface for multi child elements. More...

#include <childproxy.h>

Inheritance diagram for Gst::ChildProxy:

Gst::Bin Gst::Pipeline

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 ()
 Gets the number of child objects this parent contains.
Glib::RefPtr<Gst::Objectget_child (const Glib::ustring& name)
 Looks up a child element by the given name.
Glib::RefPtr<Gst::Objectget_child (guint index)
 Fetches a child by its number.
Glib::RefPtr<ChildProxyget_proxy_property (const Glib::ustring& name, Glib::ValueBase& value)
 Gets a single property using the Gst::ChildProxy mechanism.
void get_proxy_valist (const Glib::ustring& first_prop_name, va_list& var_args)
 Gets properties of the parent object and its children.
Glib::RefPtr<ChildProxyset_proxy_property (const Glib::ustring& name, const Glib::ValueBase& value)
 Sets a single property using the Gst::ChildProxy mechanism.
void set_proxy_valist (const Glib::ustring& first_prop_name, const va_list& var_args)
 Sets properties of the parent object and its children.
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::Objectget_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)

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::ChildProxywrap (GstChildProxy* object, bool take_copy=false)
 A Glib::wrap() method for this object.


Detailed Description

Gst::ChildProxy — 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]

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

Provides access to the underlying C GObject.

Reimplemented in Gst::Bin, and Gst::Pipeline.

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

Provides access to the underlying C GObject.

Reimplemented in Gst::Bin, and Gst::Pipeline.

guint Gst::ChildProxy::get_children_count (  ) 

Gets the number of child objects this parent contains.

Returns:
The number of child objects
MT safe.

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

Glib::RefPtr<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 gotten if needed

void Gst::ChildProxy::get_proxy_valist ( const Glib::ustring &  first_prop_name,
va_list &  var_args 
)

Gets properties of the parent object and its children.

Parameters:
first_prop_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

Glib::RefPtr<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

void Gst::ChildProxy::set_proxy_valist ( const Glib::ustring &  first_prop_name,
const va_list &  var_args 
)

Sets properties of the parent object and its children.

Parameters:
first_prop_name name of the first property to set
var_args alue for the first property, followed optionally by more name/value pairs, followed by NULL

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::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)

virtual Glib::RefPtr<Gst::Object> Gst::ChildProxy::get_child_by_index_vfunc ( guint  index  )  const [virtual]

virtual method to fetch the child

virtual guint Gst::ChildProxy::get_children_count_vfunc (  )  const [virtual]

virtual method to get the children count

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]


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:

Generated on Thu Jun 12 17:20:08 2008 for gstreamermm by  doxygen 1.5.6