gstreamermm: Gst::PadTemplate Class Reference

gstreamermm 0.10.11

- Main Page
- Modules
- Namespaces
- Classes

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | Static Public Member Functions | Protected Member Functions | Related Functions
Gst::PadTemplate Class Reference

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

Inheritance diagram for Gst::PadTemplate:
[legend]
Collaboration diagram for Gst::PadTemplate:
[legend]

List of all members.

## Public Member Functions
virtual | ~PadTemplate ()
GstPadTemplate* | gobj ()
| Provides access to the underlying C GObject.
const GstPadTemplate* | gobj () const
| Provides access to the underlying C GObject.
GstPadTemplate* | gobj_copy ()
| Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
Glib::RefPtr< Gst::Caps > | get_caps ()
| Gets the capabilities of the pad template.
Glib::RefPtr< const Gst::Caps > | get_caps () const
| Gets the capabilities of the pad template.
Glib::ustring | get_name_template () const
| Get the nametemplate of the padtemplate.
PadDirection | get_direction () const
| Get the Gst::PadDirection of the padtemplate.
PadPresence | get_presence () const
| Get the Gst::PadPresence of the padtemplate.
Glib::PropertyProxy_ReadOnly < Glib::RefPtr< Gst::Caps > > | property_caps () const
| The capabilities of the pad described by the pad template.
Glib::PropertyProxy_ReadOnly < Gst::PadDirection > | property_direction () const
| The direction of the pad described by the pad template.
Glib::PropertyProxy_ReadOnly < Glib::ustring > | property_name_template () const
| The name template of the pad template.
Glib::PropertyProxy_ReadOnly < Gst::PadPresence > | property_presence () const
| When the pad described by the pad template will become available.
Glib::SignalProxy1< void, const Glib::RefPtr< Gst::Pad >& > | signal_pad_created ()
## Static Public Member Functions
static GType | get_type ()
| Get the GType for this class, for use with the underlying GObject type system.
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.
## 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().
## 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.

## 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).

## Constructor & Destructor Documentation

virtual Gst::PadTemplate::~PadTemplate | ( |  | ) | `[virtual]`

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

## Member Function Documentation

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.

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

Gets the capabilities of the pad template.

Returns:
  The Gst::Caps of the pad template. If you need to keep a reference to the caps, take a ref (see Gst::Caps::ref()).

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. If you need to keep a reference to the caps, take a ref (see Gst::Caps::ref()).

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

Get the Gst::PadDirection of the padtemplate.

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

Get the nametemplate of the padtemplate.

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

Get the Gst::PadPresence of the padtemplate.

static GType Gst::PadTemplate::get_type | ( |  | ) | `[static]`

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

Reimplemented from Gst::Object.

GstPadTemplate* Gst::PadTemplate::gobj | ( |  | ) | `[inline]`

Provides access to the underlying C GObject.

Reimplemented from Gst::Object.

const GstPadTemplate* Gst::PadTemplate::gobj | ( |  | ) | const`[inline]`

Provides access to the underlying C GObject.

Reimplemented from Gst::Object.

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.

Reimplemented from Gst::Object.

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().

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

The capabilities of the pad described by the pad template.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

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

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

The direction of the pad described by the pad template.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

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

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

The name template of the pad template.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

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

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

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

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

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

Glib::SignalProxy1< 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

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.

The documentation for this class was generated from the following file:

- gstreamermm/padtemplate.h