Struct gstreamer_editing_services::BaseEffect[][src]

pub struct BaseEffect(_);
Expand description

A BaseEffect is some operation that applies an effect to the data it receives.

Time Effects

Some operations will change the timing of the stream data they receive in some way. In particular, the gst::Element that they wrap could alter the times of the segment they receive in a gst::EventType::Segment event, or the times of a seek they receive in a gst::EventType::Seek event. Such operations would be considered time effects since they translate the times they receive on their source to different times at their sink, and vis versa. This introduces two sets of time coordinates for the event: (internal) sink coordinates and (internal) source coordinates, where segment times are translated from the sink coordinates to the source coordinates, and seek times are translated from the source coordinates to the sink coordinates.

If you use such an effect in GES, you will need to inform GES of the properties that control the timing with BaseEffectExt::register_time_property(), and the effect’s timing behaviour using ges_base_effect_set_time_translation_funcs().

Note that a time effect should not have its property::TrackElement::has-internal-source set to true.

In addition, note that GES only fully supports time effects whose mapping from the source to sink coordinates (those applied to seeks) obeys:

  • Maps the time 0 to 0. So initial time-shifting effects are excluded.
  • Is monotonically increasing. So reversing effects, and effects that jump backwards in the stream are excluded.
  • Can handle a reasonable GstClockTime, relative to the project. So this would exclude a time effect with an extremely large speed-up that would cause the converted GstClockTime seeks to overflow.
  • Is ‘continuously reversible’. This essentially means that for every time in the sink coordinates, we can, to ‘good enough’ accuracy, calculate the corresponding time in the source coordinates. Moreover, this should correspond to how segment times are translated from sink to source.
  • Only depends on the registered time properties, rather than the state of the gst::Element or the data it receives. This would exclude, say, an effect that would speedup if there is more red in the image it receives.

Note that a constant-rate-change effect that is not extremely fast or slow would satisfy these conditions. For such effects, you may wish to use ges_effect_class_register_rate_property().

This is an Abstract Base Class, you cannot instantiate it.

Implements

BaseEffectExt, TrackElementExt, TimelineElementExt, glib::ObjectExt, ExtractableExt, [TimelineElementExtManual][trait@crate::prelude::TimelineElementExtManual]

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Feeds this value into the given Hasher. Read more

Feeds a slice of this type into the given Hasher. Read more

This method returns an Ordering between self and other. Read more

Compares and returns the maximum of two values. Read more

Compares and returns the minimum of two values. Read more

Restrict a value to a certain interval. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method returns an ordering between self and other values if one exists. Read more

This method tests less than (for self and other) and is used by the < operator. Read more

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

This method tests greater than (for self and other) and is used by the > operator. Read more

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

Returns the type identifier of Self.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Upcasts an object to a superclass or interface T. Read more

Upcasts an object to a reference of its superclass or interface T. Read more

Tries to downcast to a subclass or interface implementor T. Read more

Tries to downcast to a reference of its subclass or interface implementor T. Read more

Tries to cast to an object of type T. This handles upcasting, downcasting and casting between interface and interface implementors. All checks are performed at runtime, while downcast and upcast will do many checks at compile-time already. Read more

Tries to cast to reference to an object of type T. This handles upcasting, downcasting and casting between interface and interface implementors. All checks are performed at runtime, while downcast and upcast will do many checks at compile-time already. Read more

Casts to T unconditionally. Read more

Casts to &T unconditionally. Read more

Performs the conversion.

Performs the conversion.

Returns true if the object is an instance of (can be cast to) T.

Safety Read more

Safety Read more

Safety Read more

Safety Read more

Safety Read more

Safety Read more

Same as connect but takes a SignalId instead of a signal name.

Same as connect_local but takes a SignalId instead of a signal name.

Same as connect_unsafe but takes a SignalId instead of a signal name.

Emit signal by signal id.

Emit signal with details by signal id.

Emit signal by it’s name.

Same as emit but takes Value for the arguments.

Same as emit_by_name but takes Value for the arguments.

Same as emit_with_details but takes Value for the arguments.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

Returns a SendValue clone of self.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.