gstreamermm 1.10.0

Public Member Functions | Static Public Member Functions | Protected Member Functions | Related Functions | List of all members
Gst::GhostPad Class Reference

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

`#include <gstreamermm/ghostpad.h>`

Inheritance diagram for Gst::GhostPad:
[legend]

## Public Member Functions
| GhostPad (GhostPad&& src) noexcept
GhostPad& | operator= (GhostPad&& src) noexcept
| ~GhostPad () noexcept override
GstGhostPad* | gobj ()
| Provides access to the underlying C GObject. More...
const GstGhostPad* | gobj () const
| Provides access to the underlying C GObject. More...
GstGhostPad* | gobj_copy ()
| Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs. More...
bool | set_target (const Glib::RefPtr< Gst::Pad >& newtarget)
| Set the new target of the ghostpad gpad. More...
Glib::RefPtr< Gst::Pad > | get_target ()
| Get the target pad of gpad. More...
Glib::RefPtr< const Gst::Pad > | get_target () const
| Get the target pad of gpad. More...
Public Member Functions inherited from Gst::Pad
| Pad (Pad&& src) noexcept
Pad& | operator= (Pad&& src) noexcept
| ~Pad () noexcept override
GstPad* | gobj ()
| Provides access to the underlying C GObject. More...
const GstPad* | gobj () const
| Provides access to the underlying C GObject. More...
GstPad* | gobj_copy ()
| Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs. More...
Gst::PadMode | get_mode () const
Glib::RefPtr< Gst::Caps > | query_caps (Glib::RefPtr< Gst::Caps > caps)
| Gets the capabilities this pad can produce or consume. More...
Glib::RefPtr< const Gst::Caps > | query_caps (Glib::RefPtr< Gst::Caps > caps) const
| Gets the capabilities this pad can produce or consume. More...
PadDirection | get_direction () const
| Gets the direction of the pad. More...
Glib::RefPtr< Gst::Element > | get_parent_element ()
| Gets the parent of pad, cast to a Gst::Element. More...
Glib::RefPtr< const Gst::Element > | get_parent_element () const
| Gets the parent of pad, cast to a Gst::Element. More...
Glib::RefPtr< Gst::PadTemplate > | get_pad_template ()
| Gets the template for pad. More...
Glib::RefPtr< const Gst::PadTemplate > | get_pad_template () const
| Gets the template for pad. More...
PadLinkReturn | link (const Glib::RefPtr< Gst::Pad >& sink_pad)
| Links the source pad and the sink pad. More...
bool | unlink (const Glib::RefPtr< Gst::Pad >& sink_pad)
| Unlinks the source pad from the sink pad. More...
bool | is_linked () const
| Checks if a pad is linked to another pad or not. More...
bool | can_link (const Glib::RefPtr< const Gst::Pad >& other_pad) const
| Checks if the source pad and the sink pad are compatible so they can be linked. More...
Glib::RefPtr< Gst::Caps > | get_allowed_caps ()
| Gets the capabilities of the allowed media types that can flow through pad and its peer. More...
Glib::RefPtr< const Gst::Caps > | get_allowed_caps () const
| Gets the capabilities of the allowed media types that can flow through pad and its peer. More...
Glib::RefPtr< Gst::Caps > | get_pad_template_caps ()
| Gets the capabilities for pad's template. More...
Glib::RefPtr< const Gst::Caps > | get_pad_template_caps () const
| Gets the capabilities for pad's template. More...
gulong | add_probe (PadProbeType mask, const SlotProbe& slot)
void | remove_probe (gulong id)
| Remove the probe with id from pad. More...
Glib::RefPtr< Gst::Pad > | get_peer ()
| Gets the peer of pad. More...
Glib::RefPtr< const Gst::Pad > | get_peer () const
| Gets the peer of pad. More...
void | use_fixed_caps ()
| A helper function you can use that sets the FIXED_CAPS flag This way the default CAPS query will always return the negotiated caps or in case the pad is not negotiated, the padtemplate caps. More...
bool | is_active () const
| Query if a pad is active. More...
bool | is_blocked () const
| Checks if the pad is blocked or not. More...
bool | is_blocking () const
| Checks if the pad is blocking or not. More...
void | mark_reconfigure ()
| Mark a pad for needing reconfiguration. More...
bool | needs_reconfigure () const
| Check the Gst::PAD_FLAG_NEED_RECONFIGURE flag on pad and return `true` if the flag was set. More...
bool | check_reconfigure ()
| Check and clear the Gst::PAD_FLAG_NEED_RECONFIGURE flag on pad and return `true` if the flag was set. More...
bool | has_current_caps () const
| Check if pad has caps set on it with a Gst::EVENT_CAPS event. More...
Glib::ustring | create_stream_id (const Glib::RefPtr< Gst::Element >& parent, const Glib::ustring& stream_id)
| Creates a stream-id for the source Gst::Pad pad by combining the upstream information with the optional stream_id of the stream of pad. More...
Glib::ustring | get_stream_id () const
| Returns the current stream-id for the pad, or `nullptr` if none has been set yet, i.e. the pad has not received a stream-start event yet. More...
void | set_offset (gint64 offset)
| Set the offset that will be applied to the running time of pad. More...
gint64 | get_offset () const
| Get the offset applied to the running time of pad. More...
void | set_element_private (gpointer priv)
| Set the given private data gpointer on the pad. More...
gpointer | get_element_private ()
| Gets the private data of a pad. More...
FlowReturn | get_range (guint64 offset, guint size, Glib::RefPtr< Gst::Buffer >& buffer)
| When pad is flushing this function returns Gst::FLOW_WRONG_STATE immediatly. More...
bool | query_accept_caps (const Glib::RefPtr< const Gst::Caps >& caps) const
| Check if the given pad accepts the caps. More...
bool | proxy_query_caps (const Glib::RefPtr< Gst::Query >&query) const
| Calls query_caps() for all internally linked pads of pad and returns the intersection of the results. More...
bool | proxy_query_accept_caps (const Glib::RefPtr< Gst::Query >&query) const
| Checks if all internally linked pads of pad accepts the caps in query and returns the intersection of the results. More...
bool | peer_query_accept_caps (const Glib::RefPtr< const Gst::Caps >& caps) const
| Check if the peer of pad accepts caps. More...
bool | peer_query_position (Gst::Format format, gint64& cur) const
| Queries the peer of a given sink pad for the stream position. More...
bool | peer_query_duration (Gst::Format format, gint64& duration) const
| Queries the peer pad of a given sink pad for the total stream duration. More...
FlowReturn | push (Glib::RefPtr< Gst::Buffer >&& buffer)
| Pushes a buffer to the peer of pad. More...
bool | push_event (Glib::RefPtr< Gst::Event >&& event)
| Sends the event to the peer of the given pad. More...
bool | push_event (const Glib::RefPtr< Gst::Event >& event)
| A push_event() convenience overload. Allows to re-use event parameter after function call. More...
FlowReturn | pull_range (guint64 offset, guint size, Glib::RefPtr< Gst::Buffer >& buffer)
| Pulls a buffer from the peer pad. More...
bool | send_event (Glib::RefPtr< Gst::Event >&& event)
| Sends the event to the pad. More...
bool | send_event (const Glib::RefPtr< Gst::Event >& event)
| A send_event() convenience overload. Allows to re-use event parameter after function call. More...
bool | activate_mode (Gst::PadMode mode, bool active=true)
| Activates or deactivates the given pad in mode via dispatching to the pad's activatemodefunc. More...
bool | event_default (const Glib::RefPtr< Gst::Object >& parent, Glib::RefPtr< Gst::Event >&& event)
| Invokes the default event handler for the given pad. More...
bool | event_default (Glib::RefPtr< Gst::Event >&& event)
| A event_default() convenience overload. More...
bool | query (const Glib::RefPtr< Gst::Query >& query) const
| Dispatches a query to a pad. More...
bool | peer_query (const Glib::RefPtr< Gst::Query >&query) const
| Performs query() on the peer of pad. More...
Glib::RefPtr< Gst::Caps > | peer_query_caps (const Glib::RefPtr< Gst::Caps >& filter) const
| Gets the capabilities of the peer connected to this pad. More...
bool | query_default (const Glib::RefPtr< Gst::Object >& parent, const Glib::RefPtr< Gst::Query >&query) const
| Invokes the default query handler for the given pad. More...
bool | query_default (const Glib::RefPtr< Gst::Query >&query) const
| A query_default() convenience overload. More...
bool | query_position (Format format, gint64& position) const
| Queries a pad for the stream position. More...
bool | query_position (Format& format) const
| Queries a pad for the stream position parsing only the format. More...
bool | query_duration (Format format, gint64& duration) const
| Queries a pad for the total stream duration. More...
bool | query_duration (Format& format) const
| Queries a pad for the total stream duration parsing only the format. More...
bool | query_convert (Format src_format, gint64 src_value, Format dst_format, gint64& dst_value) const
| Queries a pad to convert src_value in src_format to dst_format. More...
bool | peer_query_convert (Format src_format, gint64 src_value, Format dst_format, gint64& dst_value) const
| Queries the peer pad of a given sink pad to convert src_value in src_format to dst_format. More...
Gst::Iterator< Gst::Pad > | iterate_internal_links ()
| Gets an iterator for the pads to which the given pad is linked to inside of the parent element. More...
Gst::Iterator< const Gst::Pad > | iterate_internal_links () const
| Gets an iterator for the pads to which the given pad is linked to inside of the parent element. More...
Gst::Iterator< Gst::Pad > | iterate_internal_links_default (const Glib::RefPtr< Gst::Object >& parent)
| Iterate the list of pads to which the given pad is linked to inside of the parent element. More...
Gst::Iterator< Gst::Pad > | iterate_internal_links_default ()
| A iterate_internal_links_default() convenience overload. More...
Gst::Iterator< const Gst::Pad > | iterate_internal_links_default (const Glib::RefPtr< Gst::Object >& parent) const
| Iterate the list of pads to which the given pad is linked to inside of the parent element. More...
Gst::Iterator< const Gst::Pad > | iterate_internal_links_default () const
| A iterate_internal_links_default() convenience overload. More...
Gst::FlowReturn | chain (Glib::RefPtr< Gst::Buffer >&& buffer)
| Chain a buffer to pad. More...
Glib::RefPtr< Gst::Caps > | get_current_caps ()
| Gets the capabilities currently configured on pad with the last Gst::EVENT_CAPS event. More...
bool | pause_task ()
| Pause the task of pad. More...
bool | stop_task ()
| Stop the task of pad. More...
bool | set_active (bool active=true)
| Activates or deactivates the given pad. More...
Gst::FlowReturn | get_last_flow_return () const
| Gets the Gst::FlowReturn return from the last data passed by this pad. More...
Glib::RefPtr< Gst::Event > | get_sticky_event (Gst::EventType event_type, guint idx) const
| Returns a new reference of the sticky event of type event_type from the event. More...
void | set_chain_function (const SlotChain& slot)
void | set_event_function (const SlotEvent& slot)
void | set_query_function (const SlotQuery& slot)
void | set_activate_function (const SlotActivate& slot)
void | set_activatemode_function (const SlotActivatemode& slot)
void | set_getrange_function (const SlotGetrange& slot)
Glib::SignalProxy< void, const Glib::RefPtr< Gst::Pad >&> | signal_linked ()
Glib::SignalProxy< void, const Glib::RefPtr< Gst::Pad >&> | signal_unlinked ()
Glib::PropertyProxy_ReadOnly< Glib::RefPtr< Gst::Caps > > | property_caps () const
| The capabilities of the pad. More...
Glib::PropertyProxy_ReadOnly< PadDirection > | property_direction () const
| The direction of the pad. More...
Glib::PropertyProxy< PadTemplate > | property_template ()
| The GstPadTemplate of this pad. More...
Glib::PropertyProxy_ReadOnly< PadTemplate > | property_template () const
| The GstPadTemplate of this pad. More...
Glib::PropertyProxy< gint64 > | property_offset ()
| The running time offset of the pad. More...
Glib::PropertyProxy_ReadOnly< gint64 > | property_offset () const
| The running time offset of the pad. More...
bool | is_ghost_pad () const
| Checks whether pad is a ghostpad. More...
bool | is_proxy_pad () const
void | exception_handler ()
| Handle exceptions occuring in callback methods. More...
Public Member Functions inherited from Gst::Object
| Object (Object&& src) noexcept
Object& | operator= (Object&& src) noexcept
| ~Object () noexcept override
GstObject* | gobj ()
| Provides access to the underlying C GObject. More...
const GstObject* | gobj () const
| Provides access to the underlying C GObject. More...
GstObject* | gobj_copy ()
| Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs. More...
bool | is_element () const
bool | is_element_factory () const
bool | is_pad () const
bool | is_pad_template () const
bool | is_bin () const
guint32 | get_flags () const
| Returns the entire set of flags for the object. More...
bool | set_name (const Glib::ustring& name)
| Sets the name of object, or gives object a guaranteed unique name (if name is `nullptr`). More...
Glib::ustring | get_name () const
| Returns a copy of the name of object. More...
bool | set_parent (const Glib::RefPtr< Gst::Object >& parent)
| Sets the parent of object to parent. More...
Glib::RefPtr< Gst::Object > | get_parent ()
| Returns the parent of object. More...
Glib::RefPtr< const Gst::Object > | get_parent () const
| Returns the parent of object. More...
void | unparent ()
| Clear the parent of object, removing the associated reference. More...
void | set_control_rate (Gst::ClockTime control_rate)
| Change the control-rate for this object. More...
Gst::ClockTime | get_control_rate () const
| Obtain the control-rate for this object. More...
Gst::ClockTime | suggest_next_sync () const
| Returns a suggestion for timestamps where buffers should be split to get best controller results. More...
bool | sync_values (Gst::ClockTime timestamp)
| Sets the properties of the object, according to the Gst::ControlSources that (maybe) handle them and for the given timestamp. More...
void | set_control_bindings_disabled (bool disabled)
| This function is used to disable all controlled properties of the object for some time, i.e. sync_values() will do nothing. More...
bool | has_asctive_control_bindings () const
| Check if the object has an active controlled properties. More...
bool | has_ancestor (const Glib::RefPtr< const Gst::Object >& ancestor) const
| Check if object has an ancestor ancestor somewhere up in the hierarchy. More...
bool | has_as_ancestor (const Glib::RefPtr< Gst::Object >& ancestor) const
| Check if object has an ancestor ancestor somewhere up in the hierarchy. More...
bool | has_as_parent (const Glib::RefPtr< Gst::Object >& parent) const
| Check if parent is the parent of object. More...
Glib::ustring | get_path_string ()
| Generates a string describing the path of object in the object hierarchy. More...
Glib::PropertyProxy< Glib::ustring > | property_name ()
| The name of the object. More...
Glib::PropertyProxy_ReadOnly< Glib::ustring > | property_name () const
| The name of the object. More...
Glib::PropertyProxy< Glib::RefPtr< Gst::Object > > | property_parent ()
| The parent of the object. More...
Glib::PropertyProxy_ReadOnly< Glib::RefPtr< Gst::Object > > | property_parent () const
| The parent of the object. More...
Glib::SignalProxy< void, const Glib::RefPtr< Gst::Object >&, GParamSpec*> | signal_deep_notify ()
int | get_refcount () const

## Static Public Member Functions
static GType | get_type ()
| Get the GType for this class, for use with the underlying GObject type system. More...
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. More...
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. More...
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. More...
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. More...
Static Public Member Functions inherited from Gst::Pad
static GType | get_type ()
| Get the GType for this class, for use with the underlying GObject type system. More...
static Glib::RefPtr< Pad > | create (const Glib::ustring& name, PadDirection dir)
| Creates a new pad with the given name in the given direction. More...
static Glib::RefPtr< Pad > | create (PadDirection dir)
| Creates a new pad with a guaranteed unique name (across all pads) in the given direction. More...
static Glib::RefPtr< Pad > | create (const Glib::RefPtr< const Gst::PadTemplate >& pad_template)
| Creates a new pad with the given name from the given template. More...
static Glib::RefPtr< Pad > | create (const Glib::RefPtr< const Gst::PadTemplate >& pad_template, const Glib::ustring& name)
| Creates a new pad with a guaranteed unique name (across all pads) from the given template. More...
static GstFlowReturn | Pad_Chain_gstreamermm_callback (GstPad* pad, GstObject* parent, GstBuffer* buffer)
static gboolean | Pad_Event_gstreamermm_callback (GstPad* pad, GstObject* parent, GstEvent* event)
static gboolean | Pad_Query_gstreamermm_callback (GstPad* pad, GstObject* parent, GstQuery*query)
static gboolean | Pad_Activate_gstreamermm_callback (GstPad* pad, GstObject* parent)
static gboolean | Pad_Activatemode_gstreamermm_callback (GstPad* pad, GstObject* parent, GstPadMode mode, gboolean active)
static GstFlowReturn | Pad_Getrange_gstreamermm_callback (GstPad* pad, GstObject* parent, guint64 offset, guint length, GstBuffer** buffer)
Static Public Member Functions inherited from Gst::Object
static GType | get_type ()
| Get the GType for this class, for use with the underlying GObject type system. More...
static bool | check_uniqueness (const Glib::ListHandle< const Gst::Object >& list, const Glib::ustring& name)
| Checks to see if there is any object named name in list. More...

## Protected Member Functions
| GhostPad (const Glib::RefPtr< Gst::Pad >& target, const Glib::ustring& name)
| Creates a Gst::GhostPad from a target pad. More...
| GhostPad (PadDirection direction, const Glib::ustring& name)
| Creates a Gst::GhostPad with a specified name and direction. More...
| 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. More...
| GhostPad (const Glib::RefPtr< Gst::PadTemplate >& templ, const Glib::ustring& name)
| Creates a Gst::GhostPad from a pad template. More...
Protected Member Functions inherited from Gst::Pad
| Pad (const Glib::ustring& name, PadDirection direction)
| Constructs a Pad given a name and a direction. More...
| Pad (PadDirection direction)
| Constructs a Pad given a direction without specifying a name. More...
| Pad (const Glib::RefPtr< const Gst::PadTemplate >& templ, const Glib::ustring& name)
| Constructs a Pad from a PadTemplate with the specified name. More...
| Pad (const Glib::RefPtr< const Gst::PadTemplate >& templ)
| Constructs a Pad from a PadTemplate without specifying a name. More...
virtual void | on_linked (const Glib::RefPtr< Gst::Pad >& peer_pad)
| This is a default handler for the signal signal_linked(). More...
virtual void | on_unlinked (const Glib::RefPtr< Gst::Pad >& peer_pad)
| This is a default handler for the signal signal_unlinked(). More...
Protected Member Functions inherited from Gst::Object
virtual void | on_deep_notify (const Glib::RefPtr< Gst::Object >& prop_object, GParamSpec* prop)
| This is a default handler for the signal signal_deep_notify(). More...

## 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. More...
Related Functions inherited from Gst::Pad
Glib::RefPtr< Gst::Pad > | wrap (GstPad* object, bool take_copy=false)
| A Glib::wrap() method for this object. More...
Related Functions inherited from Gst::Object
Glib::RefPtr< Gst::Object > | wrap (GstObject* object, bool take_copy=false)
| A Glib::wrap() method for this object. More...

## Additional Inherited Members
Public Types inherited from Gst::Pad
typedef sigc::slot< PadProbeReturn, const Glib::RefPtr< Gst::Pad >&, const Gst::PadProbeInfo&> | SlotProbe
| For example, bool on_have_data(const Glib::RefPtr<Gst::Pad>& pad, const Glib::RefPtr<Gst::MiniObjec>& data);. More...
typedef sigc::slot< Gst::FlowReturn, const Glib::RefPtr< Gst::Pad >&, Glib::RefPtr< Gst::Buffer >&> | SlotChain
typedef sigc::slot< gboolean, const Glib::RefPtr< Gst::Pad >&, Glib::RefPtr< Gst::Event >&> | SlotEvent
typedef sigc::slot< gboolean, const Glib::RefPtr< Gst::Pad >&, Glib::RefPtr< Gst::Query >&> | SlotQuery
typedef sigc::slot< bool, const Glib::RefPtr< Gst::Pad >&> | SlotActivate
typedef sigc::slot< bool, const Glib::RefPtr< Gst::Pad >&, Gst::PadMode, bool > | SlotActivatemode
typedef sigc::slot< Gst::FlowReturn, const Glib::RefPtr< Gst::Pad >&, guint64, guint, Glib::RefPtr< Gst::Buffer >&> | SlotGetrange

## 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 2016-06-05 (1.8.0)

## Constructor & Destructor Documentation

## ◆ GhostPad() [1/5]

Gst::GhostPad::GhostPad | ( | GhostPad&& | src | ) |
| noexcept

## ◆ ~GhostPad()

Gst::GhostPad::~GhostPad | ( |  | ) |
| override noexcept

## ◆ GhostPad() [2/5]

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.

## ◆ GhostPad() [3/5]

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.

## ◆ GhostPad() [4/5]

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.

## ◆ GhostPad() [5/5]

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

## ◆ create() [1/4]

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.

## ◆ create() [2/4]

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.

## ◆ create() [3/4]

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.

## ◆ create() [4/4]

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.

## ◆ get_target() [1/2]

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 `nullptr` if the ghostpad has no target set. Unref target pad after usage.

## ◆ get_target() [2/2]

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 `nullptr` if the ghostpad has no target set. Unref target pad after usage.

## ◆ get_type()

static GType Gst::GhostPad::get_type | ( |  | ) |
| static

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

## ◆ gobj() [1/2]

GstGhostPad* Gst::GhostPad::gobj | ( |  | ) |
| inline

Provides access to the underlying C GObject.

## ◆ gobj() [2/2]

const GstGhostPad* Gst::GhostPad::gobj | ( |  | ) | const
| inline

Provides access to the underlying C GObject.

## ◆ gobj_copy()

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.

## ◆ operator=()

GhostPad& Gst::GhostPad::operator= | ( | GhostPad&& | src | ) |
| noexcept

## ◆ set_target()

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 `nullptr` 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

## ◆ wrap()

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.