GES.Effect

g GES.BaseEffect GES.BaseEffect GES.Effect GES.Effect GES.BaseEffect->GES.Effect GES.Extractable GES.Extractable GES.TimelineElement GES.TimelineElement GES.Extractable->GES.TimelineElement GES.MetaContainer GES.MetaContainer GES.MetaContainer->GES.TimelineElement GES.Operation GES.Operation GES.Operation->GES.BaseEffect GES.TrackElement GES.TrackElement GES.TimelineElement->GES.TrackElement GES.TrackElement->GES.Operation GObject.GInterface GObject.GInterface GObject.GInterface->GES.Extractable GObject.GInterface->GES.MetaContainer GObject.InitiallyUnowned GObject.InitiallyUnowned GObject.InitiallyUnowned->GES.TimelineElement GObject.Object GObject.Object GObject.Object->GObject.InitiallyUnowned

Subclasses:

None

Methods

Inherited:

GES.BaseEffect (3), GES.TrackElement (22), GES.TimelineElement (38), GObject.Object (37), GES.Extractable (3), GES.MetaContainer (40)

Structs:

GES.EffectClass (1), GObject.ObjectClass (5)

class

new (bin_description)

class

register_rate_property (element_name, property_name)

Virtual Methods

Inherited:

GES.TrackElement (5), GES.TimelineElement (18), GObject.Object (7), GES.Extractable (3)

Properties

Inherited:

GES.TrackElement (5), GES.TimelineElement (9)

Name

Type

Flags

Short Description

bin-description

str

r/w/co

Bin description of the effect

Signals

Inherited:

GES.TrackElement (2), GES.TimelineElement (3), GObject.Object (1), GES.MetaContainer (1)

Fields

Inherited:

GES.TrackElement (2), GES.TimelineElement (3), GObject.Object (1), GES.MetaContainer (1)

Name

Type

Access

Description

parent

GES.BaseEffect

r

Class Details

class GES.Effect(**kwargs)
Bases:

GES.BaseEffect

Abstract:

No

Structure:

GES.EffectClass

Any GStreamer filter can be used as effects in GES. The only restriction we have is that effects element should have a single sinkpad (which will be requested if necessary) and a single srcpad.

Note that gesaudiomixer and gescompositor can be used as effects even though they can have several sinkpads.

GES specific effects:
  • **``gesvideoscale``**: GES implements a specific scaling bin that allows specifying where scaling will happen inside the chain of effects. By default scaling can happen either in the source (if the source doesn’t have a specific size, like videotestsrc or mixing has been disabled) or in the mixing element otherwise, when adding that element as an effect, GES guarantees that the scaling will happen in it. This can be useful for example if you want to crop the video before scaling or apply rounding corners to the video after scaling, etc…

Note: GES always adds converters (audioconvert ! audioresample ! audioconvert for audio effects and videoconvert for video effects) to make it simpler for end users.

classmethod new(bin_description)[source]
Parameters:

bin_description (str) – The gst-launch like bin description of the effect

Returns:

a newly created GES.Effect, or None if something went wrong.

Return type:

GES.Effect or None

Creates a new GES.Effect from the description of the bin. It should be possible to determine the type of the effect through the element ‘klass’ metadata of the GstElements that will be created. In that corner case, you should use: GES.Asset.request (GES_TYPE_EFFECT, “audio your ! bin ! description”, None); and extract that asset to be in full control.

classmethod register_rate_property(element_name, property_name)
Parameters:
  • element_name (str) – The Gst.ElementFactory name of the element that changes the rate

  • property_name (str) – The name of the property that changes the rate

Returns:

True if the rate property was successfully registered. When this method returns False, a warning is emitted with more information.

Return type:

bool

Register an element that can change the rate at which media is playing. The property type must be float or double, and must be a factor of the rate, i.e. a value of 2.0 must mean that the media plays twice as fast. Several properties may be registered for a single element type, provided they all contribute to the rate as independent factors. For example, this is true for the “GstPitch::rate” and “GstPitch::tempo” properties. These are already registered by default in GES, along with #videorate:rate for #videorate and #scaletempo:rate for #scaletempo.

If such a rate property becomes a child property of a GES.Effect upon its creation (the element is part of its GES.Effect :bin-description), it will be automatically registered as a time property (see GES.BaseEffect.register_time_property()) and will have its time translation functions set (see GES.BaseEffect.set_time_translation_funcs()) to use the overall rate of the rate properties. Note that if an effect contains a rate property as well as a non-rate time property, you should ensure to set the time translation functions to some other methods using GES.BaseEffect.set_time_translation_funcs().

Note, you can obtain a reference to the GES.EffectClass using

``

GES_EFFECT_CLASS (g_type_class_ref (GES_TYPE_EFFECT));

``

Property Details

GES.Effect.props.bin_description
Name:

bin-description

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

The description of the effect bin with a gst-launch-style pipeline description.

Example: “videobalance saturation=1.5 hue=+0.5”