Struct gstreamer_editing_services::TimelineElement[][src]

pub struct TimelineElement(_);
Expand description

A TimelineElement will have some temporal extent in its corresponding property::TimelineElement::timeline, controlled by its property::TimelineElement::start and property::TimelineElement::duration. This determines when its content will be displayed, or its effect applied, in the timeline. Several objects may overlap within a given Timeline, in which case their property::TimelineElement::priority is used to determine their ordering in the timeline. Priority is mostly handled internally by Layer-s and Clip-s.

A timeline element can have a property::TimelineElement::parent, such as a Clip, which is responsible for controlling its timing.

Editing

Elements can be moved around in their property::TimelineElement::timeline by setting their property::TimelineElement::start and property::TimelineElement::duration using TimelineElementExt::set_start() and TimelineElementExt::set_duration(). Additionally, which parts of the underlying content are played in the timeline can be adjusted by setting the property::TimelineElement::in-point using TimelineElementExt::set_inpoint(). The library also provides TimelineElementExt::edit(), with various EditMode-s, which can adjust these properties in a convenient way, as well as introduce similar changes in neighbouring or later elements in the timeline.

However, a timeline may refuse a change in these properties if they would place the timeline in an unsupported configuration. See Timeline for its overlap rules.

Additionally, an edit may be refused if it would place one of the timing properties out of bounds (such as a negative time value for property::TimelineElement::start, or having insufficient internal content to last for the desired property::TimelineElement::duration).

Time Coordinates

There are three main sets of time coordinates to consider when using timeline elements:

  • Timeline coordinates: these are the time coordinates used in the output of the timeline in its Track-s. Each track share the same coordinates, so there is only one set of coordinates for the timeline. These extend indefinitely from 0. The times used for editing (including setting property::TimelineElement::start and property::TimelineElement::duration) use these coordinates, since these define when an element is present and for how long the element lasts for in the timeline.
  • Internal source coordinates: these are the time coordinates used internally at the element’s output. This is only really defined for TrackElement-s, where it refers to time coordinates used at the final source pad of the wrapped gst::Element-s. However, these coordinates may also be used in a Clip in reference to its children. In particular, these are the coordinates used for property::TimelineElement::in-point and property::TimelineElement::max-duration.
  • Internal sink coordinates: these are the time coordinates used internally at the element’s input. A GESSource has no input, so these would be undefined. Otherwise, for most TrackElement-s these will be the same set of coordinates as the internal source coordinates because the element does not change the timing internally. Only BaseEffect can support elements where these are different. See BaseEffect for more information.

You can determine the timeline time for a given internal source time in a Track in a Clip using ClipExt::timeline_time_from_internal_time(), and vice versa using ClipExt::internal_time_from_timeline_time(), for the purposes of editing and setting timings properties.

Children Properties

If a timeline element owns another gst::Object and wishes to expose some of its properties, it can do so by registering the property as one of the timeline element’s children properties using ges_timeline_element_add_child_property(). The registered property of the child can then be read and set using the TimelineElementExt::child_property() and TimelineElementExt::set_child_property() methods, respectively. Some sub-classed objects will be created with pre-registered children properties; for example, to expose part of an underlying gst::Element that is used internally. The registered properties can be listed with ges_timeline_element_list_children_properties().

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

Implements

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.