gstreamermm 1.8.0

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

A class that describes the media type of a pad. More...

`#include <gstreamermm/padtemplate.h>`

Inheritance diagram for Gst::PadTemplate:
[legend]

## Public Member Functions
| PadTemplate (PadTemplate&& src) noexcept
PadTemplate& | operator= (PadTemplate&& src) noexcept
| ~PadTemplate () noexcept override
GstPadTemplate* | gobj ()
| Provides access to the underlying C GObject. More...
const GstPadTemplate* | gobj () const
| Provides access to the underlying C GObject. More...
GstPadTemplate* | gobj_copy ()
| Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs. More...
Glib::RefPtr< Gst::Caps > | get_caps ()
| Gets the capabilities of the pad template. More...
Glib::RefPtr< const Gst::Caps > | get_caps () const
| Gets the capabilities of the pad template. More...
Glib::ustring | get_name_template () const
| Get the nametemplate of the padtemplate. More...
PadDirection | get_direction () const
| Get the Gst::PadDirection of the padtemplate. More...
PadPresence | get_presence () const
| Get the Gst::PadPresence of the padtemplate. More...
Glib::PropertyProxy_ReadOnly< Glib::RefPtr< Gst::Caps > > | property_caps () const
| The capabilities of the pad described by the pad template. More...
Glib::PropertyProxy_ReadOnly< Gst::PadDirection > | property_direction () const
| The direction of the pad described by the pad template. More...
Glib::PropertyProxy_ReadOnly< Glib::ustring > | property_name_template () const
| The name template of the pad template. More...
Glib::PropertyProxy_ReadOnly< Gst::PadPresence > | property_presence () const
| When the pad described by the pad template will become available. More...
Glib::SignalProxy< void, const Glib::RefPtr< Gst::Pad >&> | signal_pad_created ()
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
Public Member Functions inherited from Glib::Object
| Object (const Object &)=delete
Object & | operator= (const Object &)=delete
| Object (Object &&src) noexcept
Object & | operator= (Object &&src) noexcept
void * | get_data (const QueryQuark &key)
void | set_data (const Quark &key, void *data)
void | set_data (const Quark &key, void *data, DestroyNotify notify)
void | remove_data (const QueryQuark &quark)
void * | steal_data (const QueryQuark &quark)
Glib::RefPtr< Glib::Object > | wrap (GObject *object, bool take_copy=false)
Public Member Functions inherited from Glib::ObjectBase
| ObjectBase (const ObjectBase &)=delete
ObjectBase & | operator= (const ObjectBase &)=delete
void | set_property_value (const Glib::ustring &property_name, const Glib::ValueBase &value)
void | get_property_value (const Glib::ustring &property_name, Glib::ValueBase &value) const
void | set_property (const Glib::ustring &property_name, const PropertyType &value)
void | get_property (const Glib::ustring &property_name, PropertyType &value) const
void | connect_property_changed (const Glib::ustring &property_name, const sigc::slot< void > &slot)
void | connect_property_changed (const Glib::ustring &property_name, sigc::slot< void > &&slot)
sigc::connection | connect_property_changed_with_return (const Glib::ustring &property_name, const sigc::slot< void > &slot)
sigc::connection | connect_property_changed_with_return (const Glib::ustring &property_name, sigc::slot< void > &&slot)
void | freeze_notify ()
void | thaw_notify ()
virtual void | reference () const
virtual void | unreference () const
GObject * | gobj ()
const GObject * | gobj () const
GObject * | gobj_copy () const
Public Member Functions inherited from sigc::trackable
| trackable () noexcept
| trackable (const trackable &src) noexcept
| trackable (trackable &&src)
| ~trackable ()
void | add_destroy_notify_callback (void *data, func_destroy_notify func) const
void | notify_callbacks ()
trackable & | operator= (const trackable &src)
trackable & | operator= (trackable &&src)
void | remove_destroy_notify_callback (void *data) 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< PadTemplate > | create (const Glib::ustring& name_template, PadDirection direction, PadPresence presence, const Glib::RefPtr< Gst::Caps >& caps)
| Creates a new pad template with a name according to the given template and with the given arguments. More...
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
| PadTemplate (const Glib::ustring& name_template, PadDirection direction, PadPresence presence, const Glib::RefPtr< Gst::Caps >& caps)
virtual void | on_pad_created (const Glib::RefPtr< Gst::Pad >& pad)
| This is a default handler for the signal signal_pad_created(). 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...
Protected Member Functions inherited from Glib::Object
| Object ()
| Object (const Glib::ConstructParams &construct_params)
| Object (GObject *castitem)
| ~Object () noexceptoverride
Protected Member Functions inherited from Glib::ObjectBase
| ObjectBase ()
| ObjectBase (const char *custom_type_name)
| ObjectBase (const std::type_info &custom_type_info)
| ObjectBase (ObjectBase &&src) noexcept
ObjectBase & | operator= (ObjectBase &&src) noexcept
virtual | ~ObjectBase () noexcept=0
void | initialize (GObject *castitem)
void | initialize_move (GObject *castitem, Glib::ObjectBase *previous_wrapper)

## Related Functions
(Note that these are not member functions.)
Glib::RefPtr< Gst::PadTemplate > | wrap (GstPadTemplate* 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 Glib::Object
typedef void(*)(gpointer data | DestroyNotify)
Public Types inherited from sigc::trackable
typedef internal::func_destroy_notify | func_destroy_notify

## Detailed Description

A class that describes the media type of a pad.

Padtemplates describe the possible media types a pad or an elementfactory can handle. This allows for both inspection of handled types before loading the element plugin as well as identifying pads on elements that are not yet created (request or sometimes pads).

Gst::Pad and PadTemplates have Gst::Caps attached to it to describe the media type they are capable of dealing with. get_caps() is used to get the caps of a padtemplate. It's not possible to modify the caps of a padtemplate after creation.

PadTemplates have a Gst::PadPresence property which identifies the lifetime of the pad and that can be retrieved with get_presence(). Also the direction of the pad can be retrieved from the GstPadTemplate with get_direction().

The get_name_template() method is important for Gst::PAD_REQUEST pads because it has to be used as the name in the Gst::Element::get_request_pad() call to instantiate a pad from this template.

Padtemplates can be created with create().

A padtemplate can be used to create a pad (see Gst::Pad::create() methods).

Last reviewed on 2016-06-06 (1.8.0)

## Constructor & Destructor Documentation

## § PadTemplate() [1/2]

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

## § ~PadTemplate()

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

## § PadTemplate() [2/2]

Gst::PadTemplate::PadTemplate | ( | const Glib::ustring & | name_template,
|  | PadDirection | direction,
|  | PadPresence | presence,
|  | const Glib::RefPtr< Gst::Caps >& | caps
| ) |  |
| explicit protected

## Member Function Documentation

## § create()

static Glib::RefPtr<PadTemplate> Gst::PadTemplate::create | ( | const Glib::ustring & | name_template,
|  | PadDirection | direction,
|  | PadPresence | presence,
|  | const Glib::RefPtr< Gst::Caps >& | caps
| ) |  |
| static

Creates a new pad template with a name according to the given template and with the given arguments.

This functions takes ownership of the provided caps, so be sure to not use them afterwards.

Parameters

  name_template | The name template.
  direction | The Gst::PadDirection of the template.
  presence | The Gst::PadPresence of the pad.
  caps | A Gst::Caps set for the template. The caps are taken ownership of.

Returns
  A new Gst::PadTemplate.

## § get_caps() [1/2]

Glib::RefPtr<Gst::Caps> Gst::PadTemplate::get_caps | ( |  | ) |

Gets the capabilities of the pad template.

Returns
  The Gst::Caps of the pad template. Unref after usage.

## § get_caps() [2/2]

Glib::RefPtr<const Gst::Caps> Gst::PadTemplate::get_caps | ( |  | ) | const

Gets the capabilities of the pad template.

Returns
  The Gst::Caps of the pad template. Unref after usage.

## § get_direction()

PadDirection Gst::PadTemplate::get_direction | ( |  | ) | const

Get the Gst::PadDirection of the padtemplate.

## § get_name_template()

Glib::ustring Gst::PadTemplate::get_name_template | ( |  | ) | const

Get the nametemplate of the padtemplate.

## § get_presence()

PadPresence Gst::PadTemplate::get_presence | ( |  | ) | const

Get the Gst::PadPresence of the padtemplate.

## § get_type()

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

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

## § gobj() [1/2]

GstPadTemplate* Gst::PadTemplate::gobj | ( |  | ) |
| inline

Provides access to the underlying C GObject.

## § gobj() [2/2]

const GstPadTemplate* Gst::PadTemplate::gobj | ( |  | ) | const
| inline

Provides access to the underlying C GObject.

## § gobj_copy()

GstPadTemplate* Gst::PadTemplate::gobj_copy | ( |  | ) |

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

## § on_pad_created()

virtual void Gst::PadTemplate::on_pad_created | ( | const Glib::RefPtr< Gst::Pad >& | pad | ) |
| protected virtual

This is a default handler for the signal signal_pad_created().

## § operator=()

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

## § property_caps()

Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Gst::Caps> > Gst::PadTemplate::property_caps | ( |  | ) | const

The capabilities of the pad described by the pad template.

Returns
  A PropertyProxy_ReadOnly that allows you to get the value of the property, or receive notification when the value of the property changes.

## § property_direction()

Glib::PropertyProxy_ReadOnly< Gst::PadDirection > Gst::PadTemplate::property_direction | ( |  | ) | const

The direction of the pad described by the pad template.

Returns
  A PropertyProxy_ReadOnly that allows you to get the value of the property, or receive notification when the value of the property changes.

## § property_name_template()

Glib::PropertyProxy_ReadOnly< Glib::ustring > Gst::PadTemplate::property_name_template | ( |  | ) | const

The name template of the pad template.

Returns
  A PropertyProxy_ReadOnly that allows you to get the value of the property, or receive notification when the value of the property changes.

## § property_presence()

Glib::PropertyProxy_ReadOnly< Gst::PadPresence > Gst::PadTemplate::property_presence | ( |  | ) | const

When the pad described by the pad template will become available.

Returns
  A PropertyProxy_ReadOnly that allows you to get the value of the property, or receive notification when the value of the property changes.

## § signal_pad_created()

Glib::SignalProxy< void,const Glib::RefPtr<Gst::Pad>& > Gst::PadTemplate::signal_pad_created | ( |  | ) |

Slot Prototype:
  `void on_my_pad_created(const Glib::RefPtr<Gst::Pad>& pad)`

This signal is fired when an element creates a pad from this template.

Parameters

  pad | The pad that was created.

## Friends And Related Function Documentation

## § wrap()

Glib::RefPtr< Gst::PadTemplate > wrap | ( | GstPadTemplate * | 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.