GESEffect

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.

GESEffect

GObject
    ╰──GInitiallyUnowned
        ╰──GESTimelineElement
            ╰──GESTrackElement
                ╰──GESOperation
                    ╰──GESBaseEffect
                        ╰──GESEffect

Class structure

GESEffectClass


GES.EffectClass


GES.EffectClass


GES.Effect

GObject.Object
    ╰──GObject.InitiallyUnowned
        ╰──GES.TimelineElement
            ╰──GES.TrackElement
                ╰──GES.Operation
                    ╰──GES.BaseEffect
                        ╰──GES.Effect

GES.Effect

GObject.Object
    ╰──GObject.InitiallyUnowned
        ╰──GES.TimelineElement
            ╰──GES.TrackElement
                ╰──GES.Operation
                    ╰──GES.BaseEffect
                        ╰──GES.Effect

Constructors

ges_effect_new

GESEffect *
ges_effect_new (const gchar * bin_description)

Creates a new GESEffect 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", NULL); and extract that asset to be in full control.

Parameters:

bin_description

The gst-launch like bin description of the effect

Returns ( [nullable])

a newly created GESEffect, or NULL if something went wrong.


GES.Effect.prototype.new

function GES.Effect.prototype.new(bin_description: String): {
    // javascript wrapper for 'ges_effect_new'
}

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.prototype.request (GES_TYPE_EFFECT, "audio your ! bin ! description", NULL); and extract that asset to be in full control.

Parameters:

bin_description (String)

The gst-launch like bin description of the effect

Returns (GES.Effect)

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


GES.Effect.new

def GES.Effect.new (bin_description):
    #python wrapper for 'ges_effect_new'

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", NULL); and extract that asset to be in full control.

Parameters:

bin_description (str)

The gst-launch like bin description of the effect

Returns (GES.Effect)

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


Class Methods

ges_effect_class_register_rate_property

gboolean
ges_effect_class_register_rate_property (GESEffectClass * klass,
                                         const gchar * element_name,
                                         const gchar * property_name)

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 rate for videorate and rate for scaletempo.

If such a rate property becomes a child property of a GESEffect upon its creation (the element is part of its bin-description), it will be automatically registered as a time property (see ges_base_effect_register_time_property) and will have its time translation functions set (see ges_base_effect_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_base_effect_set_time_translation_funcs.

Note, you can obtain a reference to the GESEffectClass using

  GES_EFFECT_CLASS (g_type_class_ref (GES_TYPE_EFFECT));

Parameters:

klass

Instance of the GESEffectClass

element_name

The GstElementFactory name of the element that changes the rate

property_name

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.


GES.EffectClass.prototype.register_rate_property

function GES.EffectClass.prototype.register_rate_property(klass: GES.EffectClass, element_name: String, property_name: String): {
    // javascript wrapper for 'ges_effect_class_register_rate_property'
}

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 rate (not introspectable) for videorate (not introspectable) and rate (not introspectable) for scaletempo (not introspectable).

If such a rate property becomes a child property of a GES.Effect upon its creation (the element is part of its bin-description), it will be automatically registered as a time property (see GES.BaseEffect.prototype.register_time_property) and will have its time translation functions set (see GES.BaseEffect.prototype.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.prototype.set_time_translation_funcs.

Note, you can obtain a reference to the GESEffectClass using

  GES_EFFECT_CLASS (g_type_class_ref (GES_TYPE_EFFECT));

Parameters:

klass (GES.EffectClass)

Instance of the GESEffectClass

element_name (String)

The Gst.ElementFactory name of the element that changes the rate

property_name (String)

The name of the property that changes the rate

Returns (Number)

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


Properties

bin-description

“bin-description” gchar *

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

Example: "videobalance saturation=1.5 hue=+0.5"

Flags : Read / Write / Construct Only


bin-description

“bin-description” String

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

Example: "videobalance saturation=1.5 hue=+0.5"

Flags : Read / Write / Construct Only


bin_description

“self.props.bin_description” str

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

Example: "videobalance saturation=1.5 hue=+0.5"

Flags : Read / Write / Construct Only


Constants

GES_TYPE_EFFECT

#define GES_TYPE_EFFECT ges_effect_get_type()

The results of the search are