Gst.GhostPad

g GObject.InitiallyUnowned GObject.InitiallyUnowned Gst.Object Gst.Object GObject.InitiallyUnowned->Gst.Object GObject.Object GObject.Object GObject.Object->GObject.InitiallyUnowned Gst.GhostPad Gst.GhostPad Gst.Pad Gst.Pad Gst.Object->Gst.Pad Gst.ProxyPad Gst.ProxyPad Gst.Pad->Gst.ProxyPad Gst.ProxyPad->Gst.GhostPad

Subclasses:

None

Methods

Inherited:

Gst.ProxyPad (5), Gst.Pad (84), Gst.Object (27), GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

activate_mode_default (pad, parent, mode, active)

class

internal_activate_mode_default (pad, parent, mode, active)

class

new (name, target)

class

new_from_template (name, target, templ)

class

new_no_target (name, dir)

class

new_no_target_from_template (name, templ)

construct ()

get_target ()

set_target (newtarget)

Virtual Methods

Inherited:

Gst.Pad (2), Gst.Object (1), GObject.Object (7)

Properties

Inherited:

Gst.Pad (4), Gst.Object (2)

Signals

Inherited:

Gst.Pad (2), Gst.Object (1), GObject.Object (1)

Fields

Inherited:

Gst.Pad (2), Gst.Object (1), GObject.Object (1)

Name

Type

Access

Description

pad

Gst.ProxyPad

r

Class Details

class Gst.GhostPad(**kwargs)
Bases:

Gst.ProxyPad

Abstract:

No

Structure:

Gst.GhostPadClass

GhostPads 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 any other Gst.Element. This is where GhostPads come into play. A 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, Gst.GhostPad.new() is the function to use to get a ghost-pad. Otherwise one can use Gst.GhostPad.new_no_target() to create the ghost-pad and use Gst.GhostPad.set_target() to establish the association later on.

Note that GhostPads add overhead to the data processing of a pipeline.

classmethod activate_mode_default(pad, parent, mode, active)[source]
Parameters:
Returns:

True if the operation was successful.

Return type:

bool

Invoke the default activate mode function of a ghost pad.

classmethod internal_activate_mode_default(pad, parent, mode, active)[source]
Parameters:
Returns:

True if the operation was successful.

Return type:

bool

Invoke the default activate mode function of a proxy pad that is owned by a ghost pad.

classmethod new(name, target)[source]
Parameters:
  • name (str or None) – the name of the new pad, or None to assign a default name

  • target (Gst.Pad) – the pad to ghost.

Returns:

a new Gst.Pad, or None in case of an error.

Return type:

Gst.Pad or None

Create a new ghostpad with target as the target. The direction will be taken from the target pad. target must be unlinked.

Will ref the target.

classmethod new_from_template(name, target, templ)[source]
Parameters:
Returns:

a new Gst.Pad, or None in case of an error.

Return type:

Gst.Pad or None

Create a new ghostpad with target as the target. The direction will be taken from the target pad. The template used on the ghostpad will be template.

Will ref the target.

classmethod new_no_target(name, dir)[source]
Parameters:
  • name (str or None) – the name of the new pad, or None to assign a default name.

  • dir (Gst.PadDirection) – the direction of the ghostpad

Returns:

a new Gst.Pad, or None in case of an error.

Return type:

Gst.Pad or None

Create a new ghostpad without a target with the given direction. A target can be set on the ghostpad later with the Gst.GhostPad.set_target() function.

The created ghostpad will not have a padtemplate.

classmethod new_no_target_from_template(name, templ)[source]
Parameters:
Returns:

a new Gst.Pad, or None in case of an error.

Return type:

Gst.Pad or None

Create a new ghostpad based on templ, without setting a target. The direction will be taken from the templ.

construct()[source]
Returns:

True if the construction succeeds, False otherwise.

Return type:

bool

Finish initialization of a newly allocated ghost pad.

This function is most useful in language bindings and when subclassing Gst.GhostPad; plugin and application developers normally will not call this function. Call this function directly after a call to g_object_new (GST_TYPE_GHOST_PAD, “direction”, dir, …, None).

Deprecated since version ???: This function is deprecated since 1.18 and does nothing anymore.

get_target()[source]
Returns:

the target Gst.Pad, can be None if the ghostpad has no target set. Unref target pad after usage.

Return type:

Gst.Pad or None

Get the target pad of self. Unref target pad after usage.

set_target(newtarget)[source]
Parameters:

newtarget (Gst.Pad or None) – 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.

Return type:

bool

Set the new target of the ghostpad self. Any existing target is unlinked and links to the new target are established. if newtarget is None the target will be cleared.