Gst::GhostPad Class Reference

Gst::GhostPad - Pseudo link pads. More...

#include <ghostpad.h>

Inheritance diagram for Gst::GhostPad:

Gst::Pad Gst::Object

List of all members.

Public Member Functions

virtual ~GhostPad ()
GstGhostPad* gobj ()
 Provides access to the underlying C GObject.
const GstGhostPad* gobj () const
 Provides access to the underlying C GObject.
GstGhostPad* gobj_copy ()
 Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
bool set_target (const Glib::RefPtr<Gst::Pad>& newtarget)
 Set the new target of the ghostpad gpad.
Glib::RefPtr<Gst::Padget_target ()
 Get the target pad of gpad.
Glib::RefPtr<const Gst::Padget_target () const
 Get the target pad of gpad.

Static Public Member Functions

static Glib::RefPtr<GhostPadcreate (const Glib::ustring& name, const Glib::RefPtr<Gst::Pad>& target)
 Create a new Gst::GhostPad with target as the target.
static Glib::RefPtr<GhostPadcreate (const Glib::ustring& name, PadDirection dir)
 Create a new Gst::GhostPad without a target with the given direction.
static Glib::RefPtr<GhostPadcreate (const Glib::ustring& name, const Glib::RefPtr<Gst::Pad>& target, const Glib::RefPtr<Gst::PadTemplate>& templ)
 Create a new Gst::GhostPad with target as the target.
static Glib::RefPtr<GhostPadcreate (const Glib::ustring& name, const Glib::RefPtr<Gst::PadTemplate>& templ)
 Create a new Gst::GhostPad based on templ, without setting a target.

Protected Member Functions

 GhostPad (const Glib::ustring& name, const Glib::RefPtr<Gst::Pad>& target)
 Creates a Gst::GhostPad from a target pad.
 GhostPad (const Glib::ustring& name, PadDirection direction)
 Creates a Gst::GhostPad with a specified name and direction.
 GhostPad (const Glib::ustring& name, const Glib::RefPtr<Gst::Pad>& target, const Glib::RefPtr<Gst::PadTemplate>& templ)
 Creates a Gst::GhostPad from a target pad and a pad template.
 GhostPad (const Glib::ustring& name, const Glib::RefPtr<Gst::PadTemplate>& templ)
 Creates a Gst::GhostPad from a pad template.

Related Functions

(Note that these are not member functions.)

Glib::RefPtr<Gst::GhostPadwrap (GstGhostPad* object, bool take_copy=false)
 A Glib::wrap() method for this object.


Detailed Description

Gst::GhostPad - Pseudo link pads.

Gst::GhostPad are useful when organizing pipelines with Gst::Bin like elements. The idea here is to create hierarchical element graphs. The bin element contains a sub-graph. Now one would like to treat the bin-element like another Gst::Element. This is where Gst::GhostPad come into play. A Gst::GhostPad acts as a proxy for another pad. Thus the bin can have sink and source ghost-pads that are associated with sink and source pads of the child elements.

If the target pad is known at creation time, create() with a Gst::Pad argument is the method to use to get a ghost-pad. Otherwise one can use create() with a Gst::PadDirection argument to create the ghost-pad and use set_target() to establish the association later on.

Note that Gst::GhostPad add overhead to the data processing of a pipeline.

Last reviewed on 2005-11-18 (0.9.5)


Constructor & Destructor Documentation

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

Gst::GhostPad::GhostPad ( const Glib::ustring &  name,
const Glib::RefPtr<Gst::Pad>&  target 
) [protected]

Creates a Gst::GhostPad from a target pad.

Parameters:
name The name of the Gst::GhostPad.
target The target pad.
Exceptions:
std::runtime_error if Gst::GhostPad construction fails.

Gst::GhostPad::GhostPad ( const Glib::ustring &  name,
PadDirection  direction 
) [protected]

Creates a Gst::GhostPad with a specified name and direction.

Parameters:
name The name of the Gst::GhostPad.
direction The direction of the Gst::GhostPad.
Exceptions:
std::runtime_error if Gst::GhostPad construction fails.

Gst::GhostPad::GhostPad ( const Glib::ustring &  name,
const Glib::RefPtr<Gst::Pad>&  target,
const Glib::RefPtr<Gst::PadTemplate>&  templ 
) [protected]

Creates a Gst::GhostPad from a target pad and a pad template.

Parameters:
name The name of the Gst::GhostPad.
target The target pad.
templ The pad template.
Exceptions:
std::runtime_error if Gst::GhostPad construction fails.

Gst::GhostPad::GhostPad ( const Glib::ustring &  name,
const Glib::RefPtr<Gst::PadTemplate>&  templ 
) [protected]

Creates a Gst::GhostPad from a pad template.

Parameters:
name The name of the Gst::GhostPad.
templ The pad template.
Exceptions:
std::runtime_error if Gst::GhostPad construction fails.


Member Function Documentation

GstGhostPad* Gst::GhostPad::gobj (  )  [inline]

Provides access to the underlying C GObject.

Reimplemented from Gst::Pad.

const GstGhostPad* Gst::GhostPad::gobj (  )  const [inline]

Provides access to the underlying C GObject.

Reimplemented from Gst::Pad.

GstGhostPad* Gst::GhostPad::gobj_copy (  ) 

Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.

Reimplemented from Gst::Pad.

static Glib::RefPtr<GhostPad> Gst::GhostPad::create ( const Glib::ustring &  name,
const Glib::RefPtr<Gst::Pad>&  target 
) [static]

Create a new Gst::GhostPad with target as the target.

The direction will be taken from the target pad. target must be unlinked.

Parameters:
name The name of the new pad.
target The pad to ghost.
Returns:
A new Gst::GhostPad, or an empty RefPtr in case of an error.

static Glib::RefPtr<GhostPad> Gst::GhostPad::create ( const Glib::ustring &  name,
PadDirection  dir 
) [static]

Create a new Gst::GhostPad without a target with the given direction.

A target can be set on the Gst::GhostPad later with the set_target() function.

The created Gst::GhostPad will not have a padtemplate.

Parameters:
name The name of the new Gst::GhostPad.
dir The direction of the Gst::GhostPad.
Returns:
A new Gst::GhostPad, or an empty RefPtr in case of an error.

Reimplemented from Gst::Pad.

static Glib::RefPtr<GhostPad> Gst::GhostPad::create ( const Glib::ustring &  name,
const Glib::RefPtr<Gst::Pad>&  target,
const Glib::RefPtr<Gst::PadTemplate>&  templ 
) [static]

Create a new Gst::GhostPad with target as the target.

The direction will be taken from the target pad. The template used on the Gst::GhostPad will be template.

Parameters:
name The name of the new Gst::GhostPad.
target The pad to ghost.
templ The Gst::PadTemplate to use on the Gst::GhostPad.
Returns:
A new Gst::GhostPad, or an empty RefPtr in case of an error.

static Glib::RefPtr<GhostPad> Gst::GhostPad::create ( const Glib::ustring &  name,
const Glib::RefPtr<Gst::PadTemplate>&  templ 
) [static]

Create a new Gst::GhostPad based on templ, without setting a target.

The direction will be taken from templ.

Parameters:
name The name of the new Gst::GhostPad.
templ The Gst::PadTemplate to create the Gst::GhostPad from.
Returns:
A new Gst::GhostPad, or an empty RefPtr in case of an error.

bool Gst::GhostPad::set_target ( const Glib::RefPtr<Gst::Pad>&  newtarget  ) 

Set the new target of the ghostpad gpad.

Any existing target is unlinked and links to the new target are established. if newtarget is 0 the target will be cleared.

Parameters:
newtarget The new pad target.
Returns:
true if the new target could be set. This function can return false when the internal pads could not be linked.

Glib::RefPtr<Gst::Pad> Gst::GhostPad::get_target (  ) 

Get the target pad of gpad.

Unref target pad after usage.

Returns:
The target Gst::Pad, can be 0 if the ghostpad has no target set. Unref target pad after usage.

Glib::RefPtr<const Gst::Pad> Gst::GhostPad::get_target (  )  const

Get the target pad of gpad.

Unref target pad after usage.

Returns:
The target Gst::Pad, can be 0 if the ghostpad has no target set. Unref target pad after usage.


Friends And Related Function Documentation

Glib::RefPtr<Gst::GhostPad> wrap ( GstGhostPad *  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 Wed May 20 14:43:45 2009 for gstreamermm by  doxygen 1.5.6