#include <ghostpad.h>
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<Pad>& newtarget) |
Set the new target of the ghostpad gpad. | |
Glib::RefPtr<Pad> | get_target () |
Get the target pad of gpad. | |
Static Public Member Functions | |
static Glib::RefPtr<GhostPad> | create (const Glib::ustring& name, const Glib::RefPtr<Pad>& target) |
Create a new ghostpad with target as the target. | |
static Glib::RefPtr<GhostPad> | create (const Glib::ustring& name, PadDirection dir) |
Create a new ghostpad without a target with the given direction. | |
static Glib::RefPtr<GhostPad> | create (const Glib::ustring& name, const Glib::RefPtr<Pad>& target, const Glib::RefPtr<PadTemplate>& templ) |
Create a new ghostpad with target as the target. | |
static Glib::RefPtr<GhostPad> | create (const Glib::ustring& name, const Glib::RefPtr<PadTemplate>& templ) |
Create a new ghostpad based on templ, without setting a target. | |
Protected Member Functions | |
GhostPad (const Glib::ustring& name, const Glib::RefPtr<Pad>& target) | |
GhostPad (const Glib::ustring& name, PadDirection dir) | |
GhostPad (const Glib::ustring& name, const Glib::RefPtr<Pad>& target, const Glib::RefPtr<PadTemplate>& templ) | |
GhostPad (const Glib::ustring& name, const Glib::RefPtr<PadTemplate>& templ) | |
Related Functions | |
(Note that these are not member functions.) | |
Glib::RefPtr<Gst::GhostPad> | wrap (GstGhostPad* object, bool take_copy=false) |
A Glib::wrap() method for this object. |
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)
virtual Gst::GhostPad::~GhostPad | ( | ) | [virtual] |
Gst::GhostPad::GhostPad | ( | const Glib::ustring & | name, | |
const Glib::RefPtr<Pad>& | target | |||
) | [explicit, protected] |
Gst::GhostPad::GhostPad | ( | const Glib::ustring & | name, | |
PadDirection | dir | |||
) | [explicit, protected] |
Gst::GhostPad::GhostPad | ( | const Glib::ustring & | name, | |
const Glib::RefPtr<Pad>& | target, | |||
const Glib::RefPtr<PadTemplate>& | templ | |||
) | [explicit, protected] |
Gst::GhostPad::GhostPad | ( | const Glib::ustring & | name, | |
const Glib::RefPtr<PadTemplate>& | templ | |||
) | [explicit, protected] |
GstGhostPad* Gst::GhostPad::gobj | ( | ) | [inline] |
const GstGhostPad* Gst::GhostPad::gobj | ( | ) | const [inline] |
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<Pad>& | target | |||
) | [static] |
Create a new ghostpad with target as the target.
The direction will be taken from the target pad. target must be unlinked.
Will ref the target.
name | the name of the new pad. | |
target | the pad to ghost. |
static Glib::RefPtr<GhostPad> Gst::GhostPad::create | ( | const Glib::ustring & | name, | |
PadDirection | dir | |||
) | [static] |
Create a new ghostpad without a target with the given direction.
A target can be set on the ghostpad later with the set_target() function.
The created ghostpad will not have a padtemplate.
name | the name of the new pad. | |
dir | the direction of the ghostpad |
Reimplemented from Gst::Pad.
static Glib::RefPtr<GhostPad> Gst::GhostPad::create | ( | const Glib::ustring & | name, | |
const Glib::RefPtr<Pad>& | target, | |||
const Glib::RefPtr<PadTemplate>& | templ | |||
) | [static] |
Create a new ghostpad with target as the target.
The direction will be taken from the target pad. The template used on the ghostpad will be template.
Will ref the target.
name | the name of the new pad. | |
target | the pad to ghost. | |
templ | the Gst::PadTemplate to use on the ghostpad. |
static Glib::RefPtr<GhostPad> Gst::GhostPad::create | ( | const Glib::ustring & | name, | |
const Glib::RefPtr<PadTemplate>& | templ | |||
) | [static] |
Create a new ghostpad based on templ, without setting a target.
The direction will be taken from the templ.
name | the name of the new pad. | |
templ | the Gst::PadTemplate to create the ghostpad from. |
bool Gst::GhostPad::set_target | ( | const Glib::RefPtr<Pad>& | newtarget | ) |
Set the new target of the ghostpad gpad.
Any existing target is unlinked and links to the new target are established.
newtarget | The new pad target. |
true
if the new target could be set. This function can return false
when the internal pads could not be linked. Glib::RefPtr<Pad> Gst::GhostPad::get_target | ( | ) |
Get the target pad of gpad.
Unref target pad after usage.
0
if the ghostpad has no target set. Unref target pad after usage.
Glib::RefPtr<Gst::GhostPad> wrap | ( | GstGhostPad * | object, | |
bool | take_copy = false | |||
) | [related] |
A Glib::wrap() method for this object.
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. |