gstreamermm 0.10.10
|
A class that represents pseudo link pads. More...
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::Pad > | get_target () |
Get the target pad of gpad. | |
Glib::RefPtr< const Gst::Pad > | get_target () const |
Get the target pad of gpad. | |
Static Public Member Functions | |
static Glib::RefPtr< GhostPad > | create (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< GhostPad > | create (PadDirection dir, const Glib::ustring& name=Glib::ustring()) |
Create a new Gst::GhostPad without a target with the given direction. | |
static Glib::RefPtr< GhostPad > | create (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< GhostPad > | create (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::GhostPad > | wrap (GstGhostPad* object, bool take_copy=false) |
A Glib::wrap() method for this object. |
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)
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.
target | The target pad. |
name | The name of the Gst::GhostPad. |
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.
direction | The direction of the Gst::GhostPad. |
name | The name of the Gst::GhostPad. |
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.
target | The target pad. |
templ | The pad template. |
name | The name of the Gst::GhostPad. |
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.
templ | The pad template. |
name | The name of the Gst::GhostPad. |
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.
target | The pad to ghost. |
name | The (optional) name of the new pad. |
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.
dir | The direction of the Gst::GhostPad. |
name | The (optional) name of the new Gst::GhostPad. |
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.
target | The pad to ghost. |
templ | The Gst::PadTemplate to use on the Gst::GhostPad. |
name | The (optional) name of the new Gst::GhostPad. |
std::runtime_error | if Gst::GhostPad construction fails. |
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.
templ | The Gst::PadTemplate to create the Gst::GhostPad from. |
name | The (optional) name of the new Gst::GhostPad. |
std::runtime_error | if Gst::GhostPad construction fails. |
Glib::RefPtr<Gst::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<const Gst::Pad> Gst::GhostPad::get_target | ( | ) | const |
Get the target pad of gpad.
Unref target pad after usage.
0
if the ghostpad has no target set. Unref target pad after usage. 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.
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.
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< 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. |