TimelineElement
Object Hierarchy:
Description:
public abstract class TimelineElement : InitiallyUnowned, Extractable, MetaContainer
A TimelineElement will have some temporal extent in its corresponding timeline, controlled by its start and 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 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 parent, such as a Clip, which is responsible for controlling its timing.
Editing
Elements can be moved around in their timeline by setting their start and duration using set_start and set_duration. Additionally, which parts of the underlying content are played in the timeline can be adjusted by setting the in_point using set_inpoint. The library also provides 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 start, or having insufficient internal content to last for the desired 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 start and 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 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 in_point and max_duration. + Internal sink coordinates: these are the time coordinates used internally at the element's input. A Source 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 get_timeline_time_from_internal_time, and vice versa using get_internal_time_from_timeline_time, for the purposes of editing and setting timings properties.
Children Properties
If a timeline element owns another 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 add_child_property. The registered property of the child can then be read and set using the get_child_property and 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 Element that is used internally. The registered properties can be listed with list_children_properties.