gstreamermm  0.10.11
Public Member Functions | Static Public Member Functions | Protected Member Functions | Related Functions
Gst::ChildProxy Class Reference

An interface for multi child elements. More...

Inheritance diagram for Gst::ChildProxy:
Inheritance graph
[legend]
Collaboration diagram for Gst::ChildProxy:
Collaboration graph
[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::Objectget_child (const Glib::ustring& name)
 Looks up a child element by the given name.
Glib::RefPtr< const Gst::Objectget_child (const Glib::ustring& name) const
 Looks up a child element by the given name.
Glib::RefPtr< Gst::Objectget_child (guint index)
 Fetches a child by its number.
Glib::RefPtr< const Gst::Objectget_child (guint index) const
 Fetches a child by its number.
Glib::RefPtr< Gst::ChildProxyget_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::ChildProxyset_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 ()
Glib::SignalProxy1< void,
const Glib::RefPtr
< Gst::Object >& > 
signal_child_removed ()
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)
static GType get_type ()
 Get the GType for this class, for use with the underlying GObject type system.
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

 ChildProxy ()
 You should derive from this class to use it.
virtual void on_child_added (const Glib::RefPtr< Gst::Object >& object)
 This is a default handler for the signal signal_child_added().
virtual void on_child_removed (const Glib::RefPtr< Gst::Object >& object)
 This is a default handler for the signal signal_child_removed().

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

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

Gst::ChildProxy::ChildProxy ( ) [protected]

You should derive from this class to use it.

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

Member Function Documentation

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

Emits the "child-added" signal.

Parameters:
childThe newly added child.

Emits the "child-removed" signal.

Parameters:
childThe newly added child.

Looks up a child element by the given name.

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

Parameters:
nameThe childs name.
Returns:
The child object or 0 if not found. Unref after usage.

MT safe.

Looks up a child element by the given name.

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

Parameters:
nameThe childs name.
Returns:
The child object or 0 if not found. Unref after usage.

MT safe.

Fetches a child by its number.

Parameters:
indexThe 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 ( guint  index) const

Fetches a child by its number.

Parameters:
indexThe 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.

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.

Gets a single property using the Gst::ChildProxy mechanism.

Parameters:
nameThe property to get.
valueAn empty Glib::ValueBase in which to store the property.
Returns:
This Gst::ChildProxy so more properties can be retrieved if needed.

Gets a single property using the Gst::ChildProxy mechanism.

Parameters:
nameThe property to get.
valueAn empty Glib::ValueBase in which to store the property.
Returns:
This Gst::ChildProxy so more properties can be retrieved if needed.
static GType Gst::ChildProxy::get_type ( ) [static]

Get the GType for this class, for use with the underlying GObject type system.

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

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

Provides access to the underlying C GObject.

Reimplemented from Glib::Interface.

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

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

Provides access to the underlying C GObject.

Reimplemented from Glib::Interface.

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

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:
objectObject to lookup the property in.
nameName of the property to look up.
targetPointer to a Gst::Object that takes the real object to set property on.
pspecPointer 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]

This is a default handler for the signal signal_child_added().

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

This is a default handler for the signal signal_child_removed().

Sets a single property using the Gst::ChildProxy mechanism.

Parameters:
nameThe property to get.
valueThe Glib::ValueBase to set the property to (non-empty).
Returns:
This Gst::ChildProxy so more properties can be set.
Slot Prototype:
void on_my_child_added(const Glib::RefPtr<Gst::Object>& object)

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

Parameters:
objectThe Object that was added.
Slot Prototype:
void on_my_child_removed(const Glib::RefPtr<Gst::Object>& object)

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

Parameters:
objectThe Object that was removed.

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:
objectThe C instance.
take_copyFalse 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: