Gst::GhostPad Class Reference

A class that represents pseudo link pads. More...

Inherits Gst::Pad.

Collaboration diagram for Gst::GhostPad:
Collaboration graph
[legend]

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

Protected Member Functions

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

A class that represents 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::RefPtr< Gst::Pad >&  target,
const Glib::ustring &  name 
) [protected]

Creates a Gst::GhostPad from a target pad.

Parameters:
target The target pad.
name The name of the Gst::GhostPad.
Exceptions:
std::runtime_error if Gst::GhostPad construction fails.
Gst::GhostPad::GhostPad ( PadDirection  direction,
const Glib::ustring &  name 
) [protected]

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

Parameters:
direction The direction of the Gst::GhostPad.
name The name of the Gst::GhostPad.
Exceptions:
std::runtime_error if Gst::GhostPad construction fails.
Gst::GhostPad::GhostPad ( const Glib::RefPtr< Gst::Pad >&  target,
const Glib::RefPtr< Gst::PadTemplate >&  templ,
const Glib::ustring &  name 
) [protected]

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

Parameters:
target The target pad.
templ The pad template.
name The name of the Gst::GhostPad.
Exceptions:
std::runtime_error if Gst::GhostPad construction fails.
Gst::GhostPad::GhostPad ( const Glib::RefPtr< Gst::PadTemplate >&  templ,
const Glib::ustring &  name 
) [protected]

Creates a Gst::GhostPad from a pad template.

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

Member Function Documentation

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

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

The direction will be taken from templ.

Parameters:
templ The Gst::PadTemplate to create the Gst::GhostPad from.
name The (optional) name of the new Gst::GhostPad.
Returns:
A new Gst::GhostPad, or an empty RefPtr in case of an error.
Exceptions:
std::runtime_error if Gst::GhostPad construction fails.
static Glib::RefPtr<GhostPad> Gst::GhostPad::create ( const Glib::RefPtr< Gst::Pad >&  target,
const Glib::RefPtr< Gst::PadTemplate >&  templ,
const Glib::ustring &  name = Glib::ustring() 
) [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:
target The pad to ghost.
templ The Gst::PadTemplate to use on the Gst::GhostPad.
name The (optional) name of the new Gst::GhostPad.
Returns:
A new Gst::GhostPad, or an empty RefPtr in case of an error.
Exceptions:
std::runtime_error if Gst::GhostPad construction fails.
static Glib::RefPtr<GhostPad> Gst::GhostPad::create ( PadDirection  dir,
const Glib::ustring &  name = Glib::ustring() 
) [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:
dir The direction of the Gst::GhostPad.
name The (optional) name of the new Gst::GhostPad.
Returns:
A new Gst::GhostPad, or an empty RefPtr in case of an error.
Exceptions:
std::runtime_error if Gst::GhostPad construction fails.
static Glib::RefPtr<GhostPad> Gst::GhostPad::create ( const Glib::RefPtr< Gst::Pad >&  target,
const Glib::ustring &  name = Glib::ustring() 
) [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:
target The pad to ghost.
name The (optional) name of the new pad.
Returns:
A new Gst::GhostPad, or an empty RefPtr in case of an error.
Exceptions:
std::runtime_error if Gst::GhostPad construction fails.
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.
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.
const GstGhostPad* Gst::GhostPad::gobj (  )  const [inline]

Provides access to the underlying C GObject.

Reimplemented from Gst::Pad.

GstGhostPad* Gst::GhostPad::gobj (  )  [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.

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.

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 Mon May 24 15:28:36 2010 for gstreamermm by  doxygen 1.6.3