PadTemplate

class PadTemplate(**properties: Any)

Superclasses: Object, InitiallyUnowned, Object

Constructors:

PadTemplate(**properties)
new(name_template:str, direction:Gst.PadDirection, presence:Gst.PadPresence, caps:Gst.Caps) -> Gst.PadTemplate or None
new_from_static_pad_template_with_gtype(pad_template:Gst.StaticPadTemplate, pad_type:GType) -> Gst.PadTemplate or None
new_with_gtype(name_template:str, direction:Gst.PadDirection, presence:Gst.PadPresence, caps:Gst.Caps, pad_type:GType) -> Gst.PadTemplate or None

Constructors

class PadTemplate
classmethod new(name_template: str, direction: PadDirection, presence: PadPresence, caps: Caps) PadTemplate | None

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

Parameters:
  • name_template – the name template.

  • direction – the PadDirection of the template.

  • presence – the PadPresence of the pad.

  • caps – a Caps set for the template.

classmethod new_from_static_pad_template_with_gtype(pad_template: StaticPadTemplate, pad_type: type) PadTemplate | None

Converts a StaticPadTemplate into a PadTemplate with a type.

Added in version 1.14.

Parameters:
  • pad_template – the static pad template

  • pad_type – The Type of the pad to create

classmethod new_with_gtype(name_template: str, direction: PadDirection, presence: PadPresence, caps: Caps, pad_type: type) PadTemplate | None

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

Added in version 1.14.

Parameters:
  • name_template – the name template.

  • direction – the PadDirection of the template.

  • presence – the PadPresence of the pad.

  • caps – a Caps set for the template.

  • pad_type – The Type of the pad to create

Methods

class PadTemplate
get_caps() Caps

Gets the capabilities of the pad template.

get_documentation_caps() Caps

See set_documentation_caps().

Added in version 1.18.

pad_created(pad: Pad) None

Emit the pad-created signal for this template when created by this pad.

Parameters:

pad – the Pad that created it

set_documentation_caps(caps: Caps) None

Certain elements will dynamically construct the caps of their pad templates. In order not to let environment-specific information into the documentation, element authors should use this method to expose “stable” caps to the reader.

Added in version 1.18.

Parameters:

caps – the documented capabilities

Properties

class PadTemplate
props.caps: Caps

The capabilities of the pad described by the pad template.

props.direction: PadDirection

The direction of the pad described by the pad template.

props.gtype: type

The type of the pad described by the pad template.

Added in version 1.14.

props.name_template: str

The name template of the pad template.

props.presence: PadPresence

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

Signals

class PadTemplate.signals
pad_created(pad: Pad) None

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

Parameters:

pad – the pad that was created.

Virtual Methods

class PadTemplate
do_pad_created(pad: Pad) None

Emit the pad-created signal for this template when created by this pad.

Parameters:

pad – the Pad that created it

Fields

class PadTemplate
caps
direction
name_template
object
presence