GESTimeline
GESTimeline is the central object for any multimedia timeline.
A timeline is composed of a set of GESTrack-s and a set of GESLayer-s, which are added to the timeline using ges_timeline_add_track and ges_timeline_append_layer, respectively.
The contained tracks define the supported types of the timeline and provide the media output. Essentially, each track provides an additional source GstPad.
Most usage of a timeline will likely only need a single GESAudioTrack and/or a single GESVideoTrack. You can create such a timeline with ges_timeline_new_audio_video. After this, you are unlikely to need to work with the tracks directly.
A timeline's layers contain GESClip-s, which in turn control the creation of GESTrackElement-s, which are added to the timeline's tracks. See select-tracks-for-object if you wish to have more control over which track a clip's elements are added to.
The layers are ordered, with higher priority layers having their content prioritised in the tracks. This ordering can be changed using ges_timeline_move_layer.
Editing
See GESTimelineElement for the various ways the elements of a timeline can be edited.
If you change the timing or ordering of a timeline's GESTimelineElement-s, then these changes will not actually be taken into account in the output of the timeline's tracks until the ges_timeline_commit method is called. This allows you to move its elements around, say, in response to an end user's mouse dragging, with little expense before finalising their effect on the produced data.
Overlaps and Auto-Transitions
There are certain restrictions placed on how GESSource-s may overlap in a GESTrack that belongs to a timeline. These will be enforced by GES, so the user will not need to keep track of them, but they should be aware that certain edits will be refused as a result if the overlap rules would be broken.
Consider two GESSource-s, A
and B
, with start times startA
and
startB
, and end times endA
and endB
, respectively. The start
time refers to their start, and the end time is
their start + duration. These
two sources overlap if:
- they share the same track (non NULL), which belongs to the timeline;
- they share the same GES_TIMELINE_ELEMENT_LAYER_PRIORITY; and
-
startA < endB
andstartB < endA
.
Note that when startA = endB
or startB = endA
then the two sources
will touch at their edges, but are not considered overlapping.
If, in addition, startA < startB < endA
, then we can say that the
end of A
overlaps the start of B
.
If, instead, startA <= startB
and endA >= endB
, then we can say
that A
fully overlaps B
.
The overlap rules for a timeline are that:
- One source cannot fully overlap another source.
- A source can only overlap the end of up to one other source at its start.
- A source can only overlap the start of up to one other source at its end.
The last two rules combined essentially mean that at any given timeline position, only up to two GESSource-s may overlap at that position. So triple or more overlaps are not allowed.
If you switch on auto-transition, then at any moment when the end of one source (the first source) overlaps the start of another (the second source), a GESTransitionClip will be automatically created for the pair in the same layer and it will cover their overlap. If the two elements are edited in a way such that the end of the first source no longer overlaps the start of the second, the transition will be automatically removed from the timeline. However, if the two sources still overlap at the same edges after the edit, then the same transition object will be kept, but with its timing and layer adjusted accordingly.
NOTE: if you know what you are doing and want to be in full control of the timeline layout, you can disable the edit APIs with ges_timeline_disable_edit_apis.
Saving
To save/load a timeline, you can use the ges_timeline_load_from_uri and ges_timeline_save_to_uri methods that use the default format.
Playing
A timeline is a GstBin with a source GstPad for each of its tracks, which you can fetch with ges_timeline_get_pad_for_track. You will likely want to link these to some compatible sink GstElement-s to be able to play or capture the content of the timeline.
You can use a GESPipeline to easily preview/play the timeline's content, or render it to a file.
GESTimeline
GObject ╰──GInitiallyUnowned ╰──GstObject ╰──GstElement ╰──GstBin ╰──GESTimeline
Members
parent
(GstBin)
–
tracks
(GList *)
–
Deprecated:1.10: (element-type GES.Track): This is not thread safe, use ges_timeline_get_tracks instead.
Class structure
GES.Timeline
GObject.Object ╰──GObject.InitiallyUnowned ╰──Gst.Object ╰──Gst.Element ╰──Gst.Bin ╰──GES.Timeline
Members
parent
(Gst.Bin)
–
tracks
([ Object ])
–
Deprecated:1.10: (element-type GES.Track): This is not thread safe, use GES.Timeline.prototype.get_tracks instead.
GES.Timeline
GObject.Object ╰──GObject.InitiallyUnowned ╰──Gst.Object ╰──Gst.Element ╰──Gst.Bin ╰──GES.Timeline
Members
parent
(Gst.Bin)
–
tracks
([ object ])
–
Deprecated:1.10: (element-type GES.Track): This is not thread safe, use GES.Timeline.get_tracks instead.
Constructors
ges_timeline_new
GESTimeline * ges_timeline_new ()
Creates a new empty timeline.
The new timeline.
GES.Timeline.prototype.new
function GES.Timeline.prototype.new(): {
// javascript wrapper for 'ges_timeline_new'
}
Creates a new empty timeline.
The new timeline.
GES.Timeline.new
def GES.Timeline.new ():
#python wrapper for 'ges_timeline_new'
Creates a new empty timeline.
The new timeline.
ges_timeline_new_audio_video
GESTimeline * ges_timeline_new_audio_video ()
Creates a new timeline containing a single GESAudioTrack and a single GESVideoTrack.
The new timeline.
GES.Timeline.prototype.new_audio_video
function GES.Timeline.prototype.new_audio_video(): {
// javascript wrapper for 'ges_timeline_new_audio_video'
}
Creates a new timeline containing a single GES.AudioTrack and a single GES.VideoTrack.
The new timeline.
GES.Timeline.new_audio_video
def GES.Timeline.new_audio_video ():
#python wrapper for 'ges_timeline_new_audio_video'
Creates a new timeline containing a single GES.AudioTrack and a single GES.VideoTrack.
The new timeline.
ges_timeline_new_from_uri
GESTimeline * ges_timeline_new_from_uri (const gchar * uri, GError ** error)
Creates a timeline from the given URI.
Parameters:
uri
–
The URI to load from
error
–
An error to be set if loading fails, or NULL to ignore
A new timeline if the uri was loaded successfully, or NULL if the uri could not be loaded.
GES.Timeline.prototype.new_from_uri
function GES.Timeline.prototype.new_from_uri(uri: String): {
// javascript wrapper for 'ges_timeline_new_from_uri'
}
Creates a timeline from the given URI.
Parameters:
The URI to load from
A new timeline if the uri was loaded successfully, or null if the uri could not be loaded.
GES.Timeline.new_from_uri
@raises(GLib.GError)
def GES.Timeline.new_from_uri (uri):
#python wrapper for 'ges_timeline_new_from_uri'
Creates a timeline from the given URI.
Parameters:
The URI to load from
A new timeline if the uri was loaded successfully, or None if the uri could not be loaded.
Methods
ges_timeline_add_layer
gboolean ges_timeline_add_layer (GESTimeline * timeline, GESLayer * layer)
Add a layer to the timeline.
If the layer contains GESClip-s, then this may trigger the creation of their core track element children for the timeline's tracks, and the placement of the clip's children in the tracks of the timeline using select-tracks-for-object. Some errors may occur if this would break one of the configuration rules of the timeline in one of its tracks. In such cases, some track elements would fail to be added to their tracks, but this method would still return TRUE. As such, it is advised that you only add clips to layers that already part of a timeline. In such situations, ges_layer_add_clip is able to fail if adding the clip would cause such an error.
TRUE if layer was properly added.
deprecated : 1.18: This method requires you to ensure the layer's #GESLayer:priority will be unique to the timeline. Use ges_timeline_append_layer() and ges_timeline_move_layer() instead.
GES.Timeline.prototype.add_layer
function GES.Timeline.prototype.add_layer(layer: GES.Layer): {
// javascript wrapper for 'ges_timeline_add_layer'
}
Add a layer to the timeline.
If the layer contains GES.Clip-s, then this may trigger the creation of their core track element children for the timeline's tracks, and the placement of the clip's children in the tracks of the timeline using select-tracks-for-object. Some errors may occur if this would break one of the configuration rules of the timeline in one of its tracks. In such cases, some track elements would fail to be added to their tracks, but this method would still return true. As such, it is advised that you only add clips to layers that already part of a timeline. In such situations, GES.Layer.prototype.add_clip is able to fail if adding the clip would cause such an error.
deprecated : 1.18: This method requires you to ensure the layer's #GESLayer:priority will be unique to the timeline. Use ges_timeline_append_layer() and ges_timeline_move_layer() instead.
GES.Timeline.add_layer
def GES.Timeline.add_layer (self, layer):
#python wrapper for 'ges_timeline_add_layer'
Add a layer to the timeline.
If the layer contains GES.Clip-s, then this may trigger the creation of their core track element children for the timeline's tracks, and the placement of the clip's children in the tracks of the timeline using select-tracks-for-object. Some errors may occur if this would break one of the configuration rules of the timeline in one of its tracks. In such cases, some track elements would fail to be added to their tracks, but this method would still return True. As such, it is advised that you only add clips to layers that already part of a timeline. In such situations, GES.Layer.add_clip is able to fail if adding the clip would cause such an error.
deprecated : 1.18: This method requires you to ensure the layer's #GESLayer:priority will be unique to the timeline. Use ges_timeline_append_layer() and ges_timeline_move_layer() instead.
ges_timeline_add_track
gboolean ges_timeline_add_track (GESTimeline * timeline, GESTrack * track)
Add a track to the timeline.
If the timeline already contains clips, then this may trigger the creation of their core track element children for the track, and the placement of the clip's children in the track of the timeline using select-tracks-for-object. Some errors may occur if this would break one of the configuration rules for the timeline in the track. In such cases, some track elements would fail to be added to the track, but this method would still return TRUE. As such, it is advised that you avoid adding tracks to timelines that already contain clips.
TRUE if track was properly added.
GES.Timeline.prototype.add_track
function GES.Timeline.prototype.add_track(track: GES.Track): {
// javascript wrapper for 'ges_timeline_add_track'
}
Add a track to the timeline.
If the timeline already contains clips, then this may trigger the creation of their core track element children for the track, and the placement of the clip's children in the track of the timeline using select-tracks-for-object. Some errors may occur if this would break one of the configuration rules for the timeline in the track. In such cases, some track elements would fail to be added to the track, but this method would still return true. As such, it is advised that you avoid adding tracks to timelines that already contain clips.
GES.Timeline.add_track
def GES.Timeline.add_track (self, track):
#python wrapper for 'ges_timeline_add_track'
Add a track to the timeline.
If the timeline already contains clips, then this may trigger the creation of their core track element children for the track, and the placement of the clip's children in the track of the timeline using select-tracks-for-object. Some errors may occur if this would break one of the configuration rules for the timeline in the track. In such cases, some track elements would fail to be added to the track, but this method would still return True. As such, it is advised that you avoid adding tracks to timelines that already contain clips.
ges_timeline_append_layer
GESLayer * ges_timeline_append_layer (GESTimeline * timeline)
Append a newly created layer to the timeline. The layer will be added at the lowest priority (numerically, the highest).
Parameters:
timeline
–
The GESTimeline
The newly created layer.
GES.Timeline.prototype.append_layer
function GES.Timeline.prototype.append_layer(): {
// javascript wrapper for 'ges_timeline_append_layer'
}
Append a newly created layer to the timeline. The layer will be added at the lowest priority (numerically, the highest).
Parameters:
The GES.Timeline
The newly created layer.
GES.Timeline.append_layer
def GES.Timeline.append_layer (self):
#python wrapper for 'ges_timeline_append_layer'
Append a newly created layer to the timeline. The layer will be added at the lowest priority (numerically, the highest).
Parameters:
The GES.Timeline
The newly created layer.
ges_timeline_commit
gboolean ges_timeline_commit (GESTimeline * timeline)
Commit all the pending changes of the clips contained in the timeline.
When changes happen in a timeline, they are not immediately executed internally, in a way that effects the output data of the timeline. You should call this method when you are done with a set of changes and you want them to be executed.
Any pending changes will be executed in the backend. The commited signal will be emitted once this has completed. You should not try to change the state of the timeline, seek it or add tracks to it before receiving this signal. You can use ges_timeline_commit_sync if you do not want to perform other tasks in the mean time.
Note that all the pending changes will automatically be executed when the timeline goes from GST_STATE_READY to GST_STATE_PAUSED, which is usually triggered by a corresponding state changes in a containing GESPipeline.
Parameters:
timeline
–
GES.Timeline.prototype.commit
function GES.Timeline.prototype.commit(): {
// javascript wrapper for 'ges_timeline_commit'
}
Commit all the pending changes of the clips contained in the timeline.
When changes happen in a timeline, they are not immediately executed internally, in a way that effects the output data of the timeline. You should call this method when you are done with a set of changes and you want them to be executed.
Any pending changes will be executed in the backend. The commited signal will be emitted once this has completed. You should not try to change the state of the timeline, seek it or add tracks to it before receiving this signal. You can use GES.Timeline.prototype.commit_sync if you do not want to perform other tasks in the mean time.
Note that all the pending changes will automatically be executed when the timeline goes from Gst.State.READY to Gst.State.PAUSED, which is usually triggered by a corresponding state changes in a containing GES.Pipeline.
Parameters:
GES.Timeline.commit
def GES.Timeline.commit (self):
#python wrapper for 'ges_timeline_commit'
Commit all the pending changes of the clips contained in the timeline.
When changes happen in a timeline, they are not immediately executed internally, in a way that effects the output data of the timeline. You should call this method when you are done with a set of changes and you want them to be executed.
Any pending changes will be executed in the backend. The commited signal will be emitted once this has completed. You should not try to change the state of the timeline, seek it or add tracks to it before receiving this signal. You can use GES.Timeline.commit_sync if you do not want to perform other tasks in the mean time.
Note that all the pending changes will automatically be executed when the timeline goes from Gst.State.READY to Gst.State.PAUSED, which is usually triggered by a corresponding state changes in a containing GES.Pipeline.
Parameters:
ges_timeline_commit_sync
gboolean ges_timeline_commit_sync (GESTimeline * timeline)
Commit all the pending changes of the clips contained in the timeline and wait for the changes to complete.
See ges_timeline_commit.
Parameters:
timeline
–
GES.Timeline.prototype.commit_sync
function GES.Timeline.prototype.commit_sync(): {
// javascript wrapper for 'ges_timeline_commit_sync'
}
Commit all the pending changes of the clips contained in the timeline and wait for the changes to complete.
See GES.Timeline.prototype.commit.
Parameters:
GES.Timeline.commit_sync
def GES.Timeline.commit_sync (self):
#python wrapper for 'ges_timeline_commit_sync'
Commit all the pending changes of the clips contained in the timeline and wait for the changes to complete.
See GES.Timeline.commit.
Parameters:
ges_timeline_disable_edit_apis
ges_timeline_disable_edit_apis (GESTimeline * self, gboolean disable_edit_apis)
WARNING: When using that mode, GES won't guarantee the coherence of the timeline. You need to ensure that the rules described in the Overlaps and auto transitions section are respected any time the timeline is commited (otherwise playback will most probably fail in different ways).
When disabling editing APIs, GES won't be able to enforce the rules that makes the timeline overall state to be valid but some feature won't be usable:
Parameters:
self
–
Since : 1.22
GES.Timeline.prototype.disable_edit_apis
function GES.Timeline.prototype.disable_edit_apis(disable_edit_apis: Number): {
// javascript wrapper for 'ges_timeline_disable_edit_apis'
}
WARNING: When using that mode, GES won't guarantee the coherence of the timeline. You need to ensure that the rules described in the Overlaps and auto transitions section are respected any time the timeline is commited (otherwise playback will most probably fail in different ways).
When disabling editing APIs, GES won't be able to enforce the rules that makes the timeline overall state to be valid but some feature won't be usable:
Parameters:
Since : 1.22
GES.Timeline.disable_edit_apis
def GES.Timeline.disable_edit_apis (self, disable_edit_apis):
#python wrapper for 'ges_timeline_disable_edit_apis'
WARNING: When using that mode, GES won't guarantee the coherence of the timeline. You need to ensure that the rules described in the Overlaps and auto transitions section are respected any time the timeline is commited (otherwise playback will most probably fail in different ways).
When disabling editing APIs, GES won't be able to enforce the rules that makes the timeline overall state to be valid but some feature won't be usable:
Parameters:
Since : 1.22
ges_timeline_freeze_commit
ges_timeline_freeze_commit (GESTimeline * timeline)
Freezes the timeline from being committed. This is usually needed while the
timeline is being rendered to ensure that not change to the timeline are
taken into account during that moment. Once the rendering is done, you
should call ges_timeline_thaw_commit so that committing becomes possible
again and any call to commit()
that happened during the rendering is
actually taken into account.
Parameters:
timeline
–
The GESTimeline
Since : 1.20
GES.Timeline.prototype.freeze_commit
function GES.Timeline.prototype.freeze_commit(): {
// javascript wrapper for 'ges_timeline_freeze_commit'
}
Freezes the timeline from being committed. This is usually needed while the
timeline is being rendered to ensure that not change to the timeline are
taken into account during that moment. Once the rendering is done, you
should call GES.Timeline.prototype.thaw_commit so that committing becomes possible
again and any call to commit()
that happened during the rendering is
actually taken into account.
Parameters:
The GES.Timeline
Since : 1.20
GES.Timeline.freeze_commit
def GES.Timeline.freeze_commit (self):
#python wrapper for 'ges_timeline_freeze_commit'
Freezes the timeline from being committed. This is usually needed while the
timeline is being rendered to ensure that not change to the timeline are
taken into account during that moment. Once the rendering is done, you
should call GES.Timeline.thaw_commit so that committing becomes possible
again and any call to commit()
that happened during the rendering is
actually taken into account.
Parameters:
The GES.Timeline
Since : 1.20
ges_timeline_get_auto_transition
gboolean ges_timeline_get_auto_transition (GESTimeline * timeline)
Gets auto-transition for the timeline.
Parameters:
timeline
–
The GESTimeline
The auto-transition of self.
GES.Timeline.prototype.get_auto_transition
function GES.Timeline.prototype.get_auto_transition(): {
// javascript wrapper for 'ges_timeline_get_auto_transition'
}
Gets auto-transition for the timeline.
Parameters:
The GES.Timeline
The auto-transition of self.
GES.Timeline.get_auto_transition
def GES.Timeline.get_auto_transition (self):
#python wrapper for 'ges_timeline_get_auto_transition'
Gets auto_transition for the timeline.
Parameters:
The GES.Timeline
The auto-transition of self.
ges_timeline_get_duration
GstClockTime ges_timeline_get_duration (GESTimeline * timeline)
Get the current duration of the timeline
Parameters:
timeline
–
The GESTimeline
The current duration of timeline.
GES.Timeline.prototype.get_duration
function GES.Timeline.prototype.get_duration(): {
// javascript wrapper for 'ges_timeline_get_duration'
}
Get the current duration of the timeline
Parameters:
The GES.Timeline
The current duration of timeline.
GES.Timeline.get_duration
def GES.Timeline.get_duration (self):
#python wrapper for 'ges_timeline_get_duration'
Get the current duration of the timeline
Parameters:
The GES.Timeline
The current duration of timeline.
ges_timeline_get_edit_apis_disabled
gboolean ges_timeline_get_edit_apis_disabled (GESTimeline * self)
Parameters:
self
–
Since : 1.22
GES.Timeline.prototype.get_edit_apis_disabled
function GES.Timeline.prototype.get_edit_apis_disabled(): {
// javascript wrapper for 'ges_timeline_get_edit_apis_disabled'
}
Parameters:
Since : 1.22
GES.Timeline.get_edit_apis_disabled
def GES.Timeline.get_edit_apis_disabled (self):
#python wrapper for 'ges_timeline_get_edit_apis_disabled'
Parameters:
Since : 1.22
ges_timeline_get_element
GESTimelineElement * ges_timeline_get_element (GESTimeline * timeline, const gchar * name)
Gets the element contained in the timeline with the given name.
The timeline element in timeline with the given name, or NULL if it was not found.
GES.Timeline.prototype.get_element
function GES.Timeline.prototype.get_element(name: String): {
// javascript wrapper for 'ges_timeline_get_element'
}
Gets the element contained in the timeline with the given name.
The timeline element in timeline with the given name, or null if it was not found.
GES.Timeline.get_element
def GES.Timeline.get_element (self, name):
#python wrapper for 'ges_timeline_get_element'
Gets the element contained in the timeline with the given name.
The timeline element in timeline with the given name, or None if it was not found.
ges_timeline_get_frame_at
GESFrameNumber ges_timeline_get_frame_at (GESTimeline * self, GstClockTime timestamp)
This method allows you to convert a timeline GstClockTime into its corresponding GESFrameNumber in the timeline's output.
The frame number timestamp corresponds to.
Since : 1.18
GES.Timeline.prototype.get_frame_at
function GES.Timeline.prototype.get_frame_at(timestamp: Number): {
// javascript wrapper for 'ges_timeline_get_frame_at'
}
This method allows you to convert a timeline Number into its corresponding Number in the timeline's output.
Parameters:
The timestamp to get the corresponding frame number of
The frame number timestamp corresponds to.
Since : 1.18
GES.Timeline.get_frame_at
def GES.Timeline.get_frame_at (self, timestamp):
#python wrapper for 'ges_timeline_get_frame_at'
This method allows you to convert a timeline int into its corresponding int in the timeline's output.
Parameters:
The timestamp to get the corresponding frame number of
The frame number timestamp corresponds to.
Since : 1.18
ges_timeline_get_frame_time
GstClockTime ges_timeline_get_frame_time (GESTimeline * self, GESFrameNumber frame_number)
This method allows you to convert a timeline output frame number into a timeline GstClockTime. For example, this time could be used to seek to a particular frame in the timeline's output, or as the edit position for an element within the timeline.
Parameters:
self
–
The self on which to retrieve the timestamp for frame_number
frame_number
–
The frame number to get the corresponding timestamp of in the timeline coordinates
The timestamp corresponding to frame_number in the output of self.
Since : 1.18
GES.Timeline.prototype.get_frame_time
function GES.Timeline.prototype.get_frame_time(frame_number: Number): {
// javascript wrapper for 'ges_timeline_get_frame_time'
}
This method allows you to convert a timeline output frame number into a timeline Number. For example, this time could be used to seek to a particular frame in the timeline's output, or as the edit position for an element within the timeline.
Parameters:
The self on which to retrieve the timestamp for frame_number
The frame number to get the corresponding timestamp of in the timeline coordinates
The timestamp corresponding to frame_number in the output of self.
Since : 1.18
GES.Timeline.get_frame_time
def GES.Timeline.get_frame_time (self, frame_number):
#python wrapper for 'ges_timeline_get_frame_time'
This method allows you to convert a timeline output frame number into a timeline int. For example, this time could be used to seek to a particular frame in the timeline's output, or as the edit position for an element within the timeline.
Parameters:
The self on which to retrieve the timestamp for frame_number
The frame number to get the corresponding timestamp of in the timeline coordinates
The timestamp corresponding to frame_number in the output of self.
Since : 1.18
ges_timeline_get_groups
GList * ges_timeline_get_groups (GESTimeline * timeline)
Get the list of GESGroup-s present in the timeline.
Parameters:
timeline
–
The GESTimeline
The list of groups that contain clips present in timeline's layers. Must not be changed.
GES.Timeline.prototype.get_groups
function GES.Timeline.prototype.get_groups(): {
// javascript wrapper for 'ges_timeline_get_groups'
}
Get the list of GES.Group-s present in the timeline.
Parameters:
The GES.Timeline
The list of groups that contain clips present in timeline's layers. Must not be changed.
GES.Timeline.get_groups
def GES.Timeline.get_groups (self):
#python wrapper for 'ges_timeline_get_groups'
Get the list of GES.Group-s present in the timeline.
Parameters:
The GES.Timeline
The list of groups that contain clips present in timeline's layers. Must not be changed.
ges_timeline_get_layer
GESLayer * ges_timeline_get_layer (GESTimeline * timeline, guint priority)
Retrieve the layer whose index in the timeline matches the given priority.
Parameters:
timeline
–
The GESTimeline to retrieve a layer from
priority
–
The priority/index of the layer to find
The layer with the given priority, or NULL if none was found.
Since 1.6
GES.Timeline.prototype.get_layer
function GES.Timeline.prototype.get_layer(priority: Number): {
// javascript wrapper for 'ges_timeline_get_layer'
}
Retrieve the layer whose index in the timeline matches the given priority.
GES.Timeline.get_layer
def GES.Timeline.get_layer (self, priority):
#python wrapper for 'ges_timeline_get_layer'
Retrieve the layer whose index in the timeline matches the given priority.
ges_timeline_get_layers
GList * ges_timeline_get_layers (GESTimeline * timeline)
Get the list of GESLayer-s present in the timeline.
Parameters:
timeline
–
The GESTimeline
The list of layers present in timeline sorted by priority.
GES.Timeline.prototype.get_layers
function GES.Timeline.prototype.get_layers(): {
// javascript wrapper for 'ges_timeline_get_layers'
}
Get the list of GES.Layer-s present in the timeline.
Parameters:
The GES.Timeline
The list of layers present in timeline sorted by priority.
GES.Timeline.get_layers
def GES.Timeline.get_layers (self):
#python wrapper for 'ges_timeline_get_layers'
Get the list of GES.Layer-s present in the timeline.
Parameters:
The GES.Timeline
The list of layers present in timeline sorted by priority.
ges_timeline_get_pad_for_track
GstPad * ges_timeline_get_pad_for_track (GESTimeline * timeline, GESTrack * track)
Search for the GstPad corresponding to the given timeline's track. You can link to this pad to receive the output data of the given track.
The pad corresponding to track, or NULL if there is an error.
GES.Timeline.prototype.get_pad_for_track
function GES.Timeline.prototype.get_pad_for_track(track: GES.Track): {
// javascript wrapper for 'ges_timeline_get_pad_for_track'
}
Search for the Gst.Pad corresponding to the given timeline's track. You can link to this pad to receive the output data of the given track.
GES.Timeline.get_pad_for_track
def GES.Timeline.get_pad_for_track (self, track):
#python wrapper for 'ges_timeline_get_pad_for_track'
Search for the Gst.Pad corresponding to the given timeline's track. You can link to this pad to receive the output data of the given track.
ges_timeline_get_snapping_distance
GstClockTime ges_timeline_get_snapping_distance (GESTimeline * timeline)
Gets the snapping-distance for the timeline.
Parameters:
timeline
–
The GESTimeline
The snapping distance (in nanoseconds) of timeline.
GES.Timeline.prototype.get_snapping_distance
function GES.Timeline.prototype.get_snapping_distance(): {
// javascript wrapper for 'ges_timeline_get_snapping_distance'
}
Gets the snapping-distance for the timeline.
Parameters:
The GES.Timeline
The snapping distance (in nanoseconds) of timeline.
GES.Timeline.get_snapping_distance
def GES.Timeline.get_snapping_distance (self):
#python wrapper for 'ges_timeline_get_snapping_distance'
Gets the snapping_distance for the timeline.
Parameters:
The GES.Timeline
The snapping distance (in nanoseconds) of timeline.
ges_timeline_get_track_for_pad
GESTrack * ges_timeline_get_track_for_pad (GESTimeline * timeline, GstPad * pad)
Search for the GESTrack corresponding to the given timeline's pad.
The track corresponding to pad, or NULL if there is an error.
GES.Timeline.prototype.get_track_for_pad
function GES.Timeline.prototype.get_track_for_pad(pad: Gst.Pad): {
// javascript wrapper for 'ges_timeline_get_track_for_pad'
}
Search for the GES.Track corresponding to the given timeline's pad.
GES.Timeline.get_track_for_pad
def GES.Timeline.get_track_for_pad (self, pad):
#python wrapper for 'ges_timeline_get_track_for_pad'
Search for the GES.Track corresponding to the given timeline's pad.
ges_timeline_get_tracks
GList * ges_timeline_get_tracks (GESTimeline * timeline)
Get the list of GESTrack-s used by the timeline.
Parameters:
timeline
–
The GESTimeline
The list of tracks used by timeline.
GES.Timeline.prototype.get_tracks
function GES.Timeline.prototype.get_tracks(): {
// javascript wrapper for 'ges_timeline_get_tracks'
}
Get the list of GES.Track-s used by the timeline.
Parameters:
The GES.Timeline
The list of tracks used by timeline.
GES.Timeline.get_tracks
def GES.Timeline.get_tracks (self):
#python wrapper for 'ges_timeline_get_tracks'
Get the list of GES.Track-s used by the timeline.
Parameters:
The GES.Timeline
The list of tracks used by timeline.
ges_timeline_is_empty
gboolean ges_timeline_is_empty (GESTimeline * timeline)
Check whether the timeline is empty or not.
Parameters:
timeline
–
The GESTimeline
TRUE if timeline is empty.
GES.Timeline.prototype.is_empty
function GES.Timeline.prototype.is_empty(): {
// javascript wrapper for 'ges_timeline_is_empty'
}
Check whether the timeline is empty or not.
Parameters:
The GES.Timeline
GES.Timeline.is_empty
def GES.Timeline.is_empty (self):
#python wrapper for 'ges_timeline_is_empty'
Check whether the timeline is empty or not.
Parameters:
The GES.Timeline
ges_timeline_load_from_uri
gboolean ges_timeline_load_from_uri (GESTimeline * timeline, const gchar * uri, GError ** error)
Loads the contents of URI into the timeline.
Parameters:
timeline
–
An empty GESTimeline into which to load the formatter
uri
–
The URI to load from
error
–
An error to be set if loading fails, or NULL to ignore
TRUE if the timeline was loaded successfully from uri.
GES.Timeline.prototype.load_from_uri
function GES.Timeline.prototype.load_from_uri(uri: String): {
// javascript wrapper for 'ges_timeline_load_from_uri'
}
Loads the contents of URI into the timeline.
GES.Timeline.load_from_uri
@raises(GLib.GError)
def GES.Timeline.load_from_uri (self, uri):
#python wrapper for 'ges_timeline_load_from_uri'
Loads the contents of URI into the timeline.
ges_timeline_move_layer
gboolean ges_timeline_move_layer (GESTimeline * timeline, GESLayer * layer, guint new_layer_priority)
Moves a layer within the timeline to the index given by new_layer_priority. An index of 0 corresponds to the layer with the highest priority in a timeline. If new_layer_priority is greater than the number of layers present in the timeline, it will become the lowest priority layer.
Parameters:
timeline
–
layer
–
A layer within timeline, whose priority should be changed
new_layer_priority
–
The new index for layer
Since : 1.16
GES.Timeline.prototype.move_layer
function GES.Timeline.prototype.move_layer(layer: GES.Layer, new_layer_priority: Number): {
// javascript wrapper for 'ges_timeline_move_layer'
}
Moves a layer within the timeline to the index given by new_layer_priority. An index of 0 corresponds to the layer with the highest priority in a timeline. If new_layer_priority is greater than the number of layers present in the timeline, it will become the lowest priority layer.
Parameters:
A layer within timeline, whose priority should be changed
The new index for layer
Since : 1.16
GES.Timeline.move_layer
def GES.Timeline.move_layer (self, layer, new_layer_priority):
#python wrapper for 'ges_timeline_move_layer'
Moves a layer within the timeline to the index given by new_layer_priority. An index of 0 corresponds to the layer with the highest priority in a timeline. If new_layer_priority is greater than the number of layers present in the timeline, it will become the lowest priority layer.
Parameters:
A layer within timeline, whose priority should be changed
The new index for layer
Since : 1.16
ges_timeline_paste_element
GESTimelineElement * ges_timeline_paste_element (GESTimeline * timeline, GESTimelineElement * element, GstClockTime position, gint layer_priority)
Paste an element inside the timeline. element **must** be the return of
ges_timeline_element_copy with deep=TRUE
,
and it should not be changed before pasting. element itself is not
placed in the timeline, instead a new element is created, alike to the
originally copied element. Note that the originally copied element must
also lie within timeline, at both the point of copying and pasting.
Pasting may fail if it would place the timeline in an unsupported configuration.
After calling this function element should not be used. In particular, element can not be pasted again. Instead, you can copy the returned element and paste that copy (although, this is only possible if the paste was successful).
See also ges_timeline_element_paste.
Parameters:
timeline
–
The GESTimeline onto which element should be pasted
element
–
The element to paste
position
–
The position in the timeline element should be pasted to, i.e. the start value for the pasted element.
layer_priority
–
The layer into which the element should be pasted. -1 means paste to the same layer from which element has been copied from
The newly created element, or NULL if pasting fails.
GES.Timeline.prototype.paste_element
function GES.Timeline.prototype.paste_element(element: GES.TimelineElement, position: Number, layer_priority: Number): {
// javascript wrapper for 'ges_timeline_paste_element'
}
Paste an element inside the timeline. element **must** be the return of
GES.TimelineElement.prototype.copy with deep=TRUE
,
and it should not be changed before pasting. element itself is not
placed in the timeline, instead a new element is created, alike to the
originally copied element. Note that the originally copied element must
also lie within timeline, at both the point of copying and pasting.
Pasting may fail if it would place the timeline in an unsupported configuration.
After calling this function element should not be used. In particular, element can not be pasted again. Instead, you can copy the returned element and paste that copy (although, this is only possible if the paste was successful).
See also GES.TimelineElement.prototype.paste.
Parameters:
The GES.Timeline onto which element should be pasted
The element to paste
The position in the timeline element should be pasted to, i.e. the start value for the pasted element.
The layer into which the element should be pasted. -1 means paste to the same layer from which element has been copied from
The newly created element, or null if pasting fails.
GES.Timeline.paste_element
def GES.Timeline.paste_element (self, element, position, layer_priority):
#python wrapper for 'ges_timeline_paste_element'
Paste an element inside the timeline. element **must** be the return of
GES.TimelineElement.copy with deep=TRUE
,
and it should not be changed before pasting. element itself is not
placed in the timeline, instead a new element is created, alike to the
originally copied element. Note that the originally copied element must
also lie within timeline, at both the point of copying and pasting.
Pasting may fail if it would place the timeline in an unsupported configuration.
After calling this function element should not be used. In particular, element can not be pasted again. Instead, you can copy the returned element and paste that copy (although, this is only possible if the paste was successful).
See also GES.TimelineElement.paste.
Parameters:
The GES.Timeline onto which element should be pasted
The element to paste
The position in the timeline element should be pasted to, i.e. the start value for the pasted element.
The layer into which the element should be pasted. -1 means paste to the same layer from which element has been copied from
The newly created element, or None if pasting fails.
ges_timeline_remove_layer
gboolean ges_timeline_remove_layer (GESTimeline * timeline, GESLayer * layer)
Removes a layer from the timeline.
TRUE if layer was properly removed.
GES.Timeline.prototype.remove_layer
function GES.Timeline.prototype.remove_layer(layer: GES.Layer): {
// javascript wrapper for 'ges_timeline_remove_layer'
}
Removes a layer from the timeline.
GES.Timeline.remove_layer
def GES.Timeline.remove_layer (self, layer):
#python wrapper for 'ges_timeline_remove_layer'
Removes a layer from the timeline.
ges_timeline_remove_track
gboolean ges_timeline_remove_track (GESTimeline * timeline, GESTrack * track)
Remove a track from the timeline.
TRUE if track was properly removed.
GES.Timeline.prototype.remove_track
function GES.Timeline.prototype.remove_track(track: GES.Track): {
// javascript wrapper for 'ges_timeline_remove_track'
}
Remove a track from the timeline.
GES.Timeline.remove_track
def GES.Timeline.remove_track (self, track):
#python wrapper for 'ges_timeline_remove_track'
Remove a track from the timeline.
ges_timeline_save_to_uri
gboolean ges_timeline_save_to_uri (GESTimeline * timeline, const gchar * uri, GESAsset * formatter_asset, gboolean overwrite, GError ** error)
Saves the timeline to the given location. If formatter_asset is NULL, the method will attempt to save in the same format the timeline was loaded from, before defaulting to the formatter with highest rank.
Parameters:
timeline
–
The GESTimeline
uri
–
The location to save to
formatter_asset
(
[allow-none])
–
The formatter asset to use, or NULL
overwrite
–
TRUE to overwrite file if it exists
error
–
An error to be set if saving fails, or NULL to ignore
TRUE if timeline was successfully saved to uri.
GES.Timeline.prototype.save_to_uri
function GES.Timeline.prototype.save_to_uri(uri: String, formatter_asset: GES.Asset, overwrite: Number): {
// javascript wrapper for 'ges_timeline_save_to_uri'
}
Saves the timeline to the given location. If formatter_asset is null, the method will attempt to save in the same format the timeline was loaded from, before defaulting to the formatter with highest rank.
GES.Timeline.save_to_uri
@raises(GLib.GError)
def GES.Timeline.save_to_uri (self, uri, formatter_asset, overwrite):
#python wrapper for 'ges_timeline_save_to_uri'
Saves the timeline to the given location. If formatter_asset is None, the method will attempt to save in the same format the timeline was loaded from, before defaulting to the formatter with highest rank.
ges_timeline_set_auto_transition
ges_timeline_set_auto_transition (GESTimeline * timeline, gboolean auto_transition)
Sets auto-transition for the timeline. This will also set the corresponding auto-transition for all of the timeline's layers to the same value. See ges_layer_set_auto_transition if you wish to set the layer's auto-transition individually.
Parameters:
timeline
–
The GESTimeline
auto_transition
–
Whether transitions should be automatically added to timeline's layers
GES.Timeline.prototype.set_auto_transition
function GES.Timeline.prototype.set_auto_transition(auto_transition: Number): {
// javascript wrapper for 'ges_timeline_set_auto_transition'
}
Sets auto-transition for the timeline. This will also set the corresponding auto-transition for all of the timeline's layers to the same value. See GES.Layer.prototype.set_auto_transition if you wish to set the layer's auto-transition individually.
GES.Timeline.set_auto_transition
def GES.Timeline.set_auto_transition (self, auto_transition):
#python wrapper for 'ges_timeline_set_auto_transition'
Sets auto_transition for the timeline. This will also set the corresponding auto_transition for all of the timeline's layers to the same value. See GES.Layer.set_auto_transition if you wish to set the layer's auto_transition individually.
ges_timeline_set_snapping_distance
ges_timeline_set_snapping_distance (GESTimeline * timeline, GstClockTime snapping_distance)
Sets snapping-distance for the timeline. This new value will only effect future snappings and will not be used to snap the current element positions within the timeline.
Parameters:
timeline
–
The GESTimeline
snapping_distance
–
The snapping distance to use (in nanoseconds)
GES.Timeline.prototype.set_snapping_distance
function GES.Timeline.prototype.set_snapping_distance(snapping_distance: Number): {
// javascript wrapper for 'ges_timeline_set_snapping_distance'
}
Sets snapping-distance for the timeline. This new value will only effect future snappings and will not be used to snap the current element positions within the timeline.
GES.Timeline.set_snapping_distance
def GES.Timeline.set_snapping_distance (self, snapping_distance):
#python wrapper for 'ges_timeline_set_snapping_distance'
Sets snapping_distance for the timeline. This new value will only effect future snappings and will not be used to snap the current element positions within the timeline.
ges_timeline_thaw_commit
ges_timeline_thaw_commit (GESTimeline * timeline)
Thaw the timeline so that comiting becomes possible
again and any call to commit()
that happened during the rendering is
actually taken into account.
Parameters:
timeline
–
The GESTimeline
Since : 1.20
GES.Timeline.prototype.thaw_commit
function GES.Timeline.prototype.thaw_commit(): {
// javascript wrapper for 'ges_timeline_thaw_commit'
}
Thaw the timeline so that comiting becomes possible
again and any call to commit()
that happened during the rendering is
actually taken into account.
Parameters:
The GES.Timeline
Since : 1.20
GES.Timeline.thaw_commit
def GES.Timeline.thaw_commit (self):
#python wrapper for 'ges_timeline_thaw_commit'
Thaw the timeline so that comiting becomes possible
again and any call to commit()
that happened during the rendering is
actually taken into account.
Parameters:
The GES.Timeline
Since : 1.20
Signals
commited
commited_callback (GESTimeline * self, gpointer user_data)
This signal will be emitted once the changes initiated by ges_timeline_commit have been executed in the backend. Use ges_timeline_commit_sync if you do not want to have to connect to this signal.
Parameters:
self
–
user_data
–
Flags: Run Last
commited
function commited_callback(self: GES.Timeline, user_data: Object): {
// javascript callback for the 'commited' signal
}
This signal will be emitted once the changes initiated by GES.Timeline.prototype.commit have been executed in the backend. Use GES.Timeline.prototype.commit_sync if you do not want to have to connect to this signal.
Parameters:
Flags: Run Last
commited
def commited_callback (self, *user_data):
#python callback for the 'commited' signal
This signal will be emitted once the changes initiated by GES.Timeline.commit have been executed in the backend. Use GES.Timeline.commit_sync if you do not want to have to connect to this signal.
Parameters:
Flags: Run Last
group-added
group_added_callback (GESTimeline * self, GESGroup * group, gpointer user_data)
Will be emitted after the group is added to to the timeline. This can
happen when grouping with ges_container_group
, or by adding
containers to a newly created group.
Note that this should not be emitted whilst a timeline is being loaded from its GESProject asset. You should connect to the project's loaded signal if you want to know which groups were created for the timeline.
Parameters:
self
–
group
–
The group that was added to timeline
user_data
–
Flags: Run First
group-added
function group_added_callback(self: GES.Timeline, group: GES.Group, user_data: Object): {
// javascript callback for the 'group-added' signal
}
Will be emitted after the group is added to to the timeline. This can
happen when grouping with ges_container_group
, or by adding
containers to a newly created group.
Note that this should not be emitted whilst a timeline is being loaded from its GES.Project asset. You should connect to the project's loaded signal if you want to know which groups were created for the timeline.
Parameters:
The group that was added to timeline
Flags: Run First
group-added
def group_added_callback (self, group, *user_data):
#python callback for the 'group-added' signal
Will be emitted after the group is added to to the timeline. This can
happen when grouping with ges_container_group
, or by adding
containers to a newly created group.
Note that this should not be emitted whilst a timeline is being loaded from its GES.Project asset. You should connect to the project's loaded signal if you want to know which groups were created for the timeline.
Parameters:
The group that was added to timeline
Flags: Run First
group-removed
group_removed_callback (GESTimeline * self, GESGroup * group, GESContainer * children, gpointer user_data)
Will be emitted after the group is removed from the timeline through
ges_container_ungroup
. Note that group will no longer contain its
former children, these are held in children.
Note that if a group is emptied, then it will no longer belong to the timeline, but this signal will not be emitted in such a case.
Parameters:
self
–
group
–
The group that was removed from timeline
children
(
[element-typeGESContainer][transfer: none])
–
A list of GESContainer-s that were the children of the removed group
user_data
–
Flags: Run First
group-removed
function group_removed_callback(self: GES.Timeline, group: GES.Group, children: [ GES.Container ], user_data: Object): {
// javascript callback for the 'group-removed' signal
}
Will be emitted after the group is removed from the timeline through
ges_container_ungroup
. Note that group will no longer contain its
former children, these are held in children.
Note that if a group is emptied, then it will no longer belong to the timeline, but this signal will not be emitted in such a case.
Parameters:
The group that was removed from timeline
A list of GES.Container-s that were the children of the removed group
Flags: Run First
group-removed
def group_removed_callback (self, group, children, *user_data):
#python callback for the 'group-removed' signal
Will be emitted after the group is removed from the timeline through
ges_container_ungroup
. Note that group will no longer contain its
former children, these are held in children.
Note that if a group is emptied, then it will no longer belong to the timeline, but this signal will not be emitted in such a case.
Parameters:
The group that was removed from timeline
A list of GES.Container-s that were the children of the removed group
Flags: Run First
layer-added
layer_added_callback (GESTimeline * self, GESLayer * layer, gpointer user_data)
Will be emitted after the layer is added to the timeline.
Note that this should not be emitted whilst a timeline is being loaded from its GESProject asset. You should connect to the project's loaded signal if you want to know which layers were created for the timeline.
Parameters:
self
–
layer
–
The layer that was added to timeline
user_data
–
Flags: Run First
layer-added
function layer_added_callback(self: GES.Timeline, layer: GES.Layer, user_data: Object): {
// javascript callback for the 'layer-added' signal
}
Will be emitted after the layer is added to the timeline.
Note that this should not be emitted whilst a timeline is being loaded from its GES.Project asset. You should connect to the project's loaded signal if you want to know which layers were created for the timeline.
Parameters:
The layer that was added to timeline
Flags: Run First
layer-added
def layer_added_callback (self, layer, *user_data):
#python callback for the 'layer-added' signal
Will be emitted after the layer is added to the timeline.
Note that this should not be emitted whilst a timeline is being loaded from its GES.Project asset. You should connect to the project's loaded signal if you want to know which layers were created for the timeline.
Parameters:
The layer that was added to timeline
Flags: Run First
layer-removed
layer_removed_callback (GESTimeline * self, GESLayer * layer, gpointer user_data)
Will be emitted after the layer is removed from the timeline.
Parameters:
self
–
layer
–
The layer that was removed from timeline
user_data
–
Flags: Run First
layer-removed
function layer_removed_callback(self: GES.Timeline, layer: GES.Layer, user_data: Object): {
// javascript callback for the 'layer-removed' signal
}
Will be emitted after the layer is removed from the timeline.
Parameters:
The layer that was removed from timeline
Flags: Run First
layer-removed
def layer_removed_callback (self, layer, *user_data):
#python callback for the 'layer-removed' signal
Will be emitted after the layer is removed from the timeline.
Parameters:
The layer that was removed from timeline
Flags: Run First
select-element-track
GESTrack * select_element_track_callback (GESTimeline * self, GESClip * clip, GESTrackElement * track_element, gpointer user_data)
Simplified version of select-tracks-for-object which only allows track_element to be added to a single GESTrack.
Parameters:
self
–
clip
–
The clip that track_element is being added to
track_element
–
The element being added
user_data
–
A track to put track_element into, or NULL if it should be discarded.
Flags: Run Last
Since : 1.18
select-element-track
function select_element_track_callback(self: GES.Timeline, clip: GES.Clip, track_element: GES.TrackElement, user_data: Object): {
// javascript callback for the 'select-element-track' signal
}
Simplified version of select-tracks-for-object which only allows track_element to be added to a single GES.Track.
Parameters:
The clip that track_element is being added to
The element being added
Flags: Run Last
Since : 1.18
select-element-track
def select_element_track_callback (self, clip, track_element, *user_data):
#python callback for the 'select-element-track' signal
Simplified version of select-tracks-for-object which only allows track_element to be added to a single GES.Track.
Parameters:
The clip that track_element is being added to
The element being added
Flags: Run Last
Since : 1.18
select-tracks-for-object
GESTrack * select_tracks_for_object_callback (GESTimeline * self, GESClip * clip, GESTrackElement * track_element, gpointer user_data)
This will be emitted whenever the timeline needs to determine which tracks a clip's children should be added to. The track element will be added to each of the tracks given in the return. If a track element is selected to go into multiple tracks, it will be copied into the additional tracks, under the same clip. Note that the copy will not keep its properties or state in sync with the original.
Connect to this signal once if you wish to control which element should be added to which track. Doing so will overwrite the default behaviour, which adds track_element to all tracks whose track-type includes the track_element's track-type.
Note that under the default track selection, if a clip would produce multiple core children of the same GESTrackType, it will choose one of the core children arbitrarily to place in the corresponding tracks, with a warning for the other core children that are not placed in the track. For example, this would happen for a GESUriClip that points to a file that contains multiple audio streams. If you wish to choose the stream, you could connect to this signal, and use, say, ges_uri_source_asset_get_stream_info to choose which core source to add.
When a clip is first added to a timeline, its core elements will be created for the current tracks in the timeline if they have not already been created. Then this will be emitted for each of these core children to select which tracks, if any, they should be added to. It will then be called for any non-core children in the clip.
In addition, if a new track element is ever added to a clip in a timeline (and it is not already part of a track) this will be emitted to select which tracks the element should be added to.
Finally, as a special case, if a track is added to the timeline after it already contains clips, then it will request the creation of the clips' core elements of the corresponding type, if they have not already been created, and this signal will be emitted for each of these newly created elements. In addition, this will also be released for all other track elements in the timeline's clips that have not yet been assigned a track. However, in this final case, the timeline will only check whether the newly added track appears in the track list. If it does appear, the track element will be added to the newly added track. All other tracks in the returned track list are ignored.
In this latter case, track elements that are already part of a track will not be asked if they want to be copied into the new track. If you wish to do this, you can use ges_clip_add_child_to_track.
Note that the returned GPtrArray should own a new reference to each of its contained GESTrack. The timeline will set the GDestroyNotify free function on the GPtrArray to dereference the elements.
Parameters:
self
–
clip
–
The clip that track_element is being added to
track_element
–
The element being added
user_data
–
Flags: Run Last
select-tracks-for-object
function select_tracks_for_object_callback(self: GES.Timeline, clip: GES.Clip, track_element: GES.TrackElement, user_data: Object): {
// javascript callback for the 'select-tracks-for-object' signal
}
This will be emitted whenever the timeline needs to determine which tracks a clip's children should be added to. The track element will be added to each of the tracks given in the return. If a track element is selected to go into multiple tracks, it will be copied into the additional tracks, under the same clip. Note that the copy will not keep its properties or state in sync with the original.
Connect to this signal once if you wish to control which element should be added to which track. Doing so will overwrite the default behaviour, which adds track_element to all tracks whose track-type includes the track_element's track-type.
Note that under the default track selection, if a clip would produce multiple core children of the same GES.TrackType, it will choose one of the core children arbitrarily to place in the corresponding tracks, with a warning for the other core children that are not placed in the track. For example, this would happen for a GES.UriClip that points to a file that contains multiple audio streams. If you wish to choose the stream, you could connect to this signal, and use, say, GES.UriSourceAsset.prototype.get_stream_info to choose which core source to add.
When a clip is first added to a timeline, its core elements will be created for the current tracks in the timeline if they have not already been created. Then this will be emitted for each of these core children to select which tracks, if any, they should be added to. It will then be called for any non-core children in the clip.
In addition, if a new track element is ever added to a clip in a timeline (and it is not already part of a track) this will be emitted to select which tracks the element should be added to.
Finally, as a special case, if a track is added to the timeline after it already contains clips, then it will request the creation of the clips' core elements of the corresponding type, if they have not already been created, and this signal will be emitted for each of these newly created elements. In addition, this will also be released for all other track elements in the timeline's clips that have not yet been assigned a track. However, in this final case, the timeline will only check whether the newly added track appears in the track list. If it does appear, the track element will be added to the newly added track. All other tracks in the returned track list are ignored.
In this latter case, track elements that are already part of a track will not be asked if they want to be copied into the new track. If you wish to do this, you can use GES.Clip.prototype.add_child_to_track.
Note that the returned GPtrArray (not introspectable) should own a new reference to each of its contained GES.Track. The timeline will set the GLib.DestroyNotify free function on the GPtrArray (not introspectable) to dereference the elements.
Parameters:
The clip that track_element is being added to
The element being added
Flags: Run Last
select-tracks-for-object
def select_tracks_for_object_callback (self, clip, track_element, *user_data):
#python callback for the 'select-tracks-for-object' signal
This will be emitted whenever the timeline needs to determine which tracks a clip's children should be added to. The track element will be added to each of the tracks given in the return. If a track element is selected to go into multiple tracks, it will be copied into the additional tracks, under the same clip. Note that the copy will not keep its properties or state in sync with the original.
Connect to this signal once if you wish to control which element should be added to which track. Doing so will overwrite the default behaviour, which adds track_element to all tracks whose track_type includes the track_element's track_type.
Note that under the default track selection, if a clip would produce multiple core children of the same GES.TrackType, it will choose one of the core children arbitrarily to place in the corresponding tracks, with a warning for the other core children that are not placed in the track. For example, this would happen for a GES.UriClip that points to a file that contains multiple audio streams. If you wish to choose the stream, you could connect to this signal, and use, say, GES.UriSourceAsset.get_stream_info to choose which core source to add.
When a clip is first added to a timeline, its core elements will be created for the current tracks in the timeline if they have not already been created. Then this will be emitted for each of these core children to select which tracks, if any, they should be added to. It will then be called for any non-core children in the clip.
In addition, if a new track element is ever added to a clip in a timeline (and it is not already part of a track) this will be emitted to select which tracks the element should be added to.
Finally, as a special case, if a track is added to the timeline after it already contains clips, then it will request the creation of the clips' core elements of the corresponding type, if they have not already been created, and this signal will be emitted for each of these newly created elements. In addition, this will also be released for all other track elements in the timeline's clips that have not yet been assigned a track. However, in this final case, the timeline will only check whether the newly added track appears in the track list. If it does appear, the track element will be added to the newly added track. All other tracks in the returned track list are ignored.
In this latter case, track elements that are already part of a track will not be asked if they want to be copied into the new track. If you wish to do this, you can use GES.Clip.add_child_to_track.
Note that the returned GPtrArray (not introspectable) should own a new reference to each of its contained GES.Track. The timeline will set the GLib.DestroyNotify free function on the GPtrArray (not introspectable) to dereference the elements.
Parameters:
The clip that track_element is being added to
The element being added
Flags: Run Last
snapping-ended
snapping_ended_callback (GESTimeline * self, GESTrackElement * obj1, GESTrackElement * obj2, guint64 position, gpointer user_data)
Will be emitted whenever a snapping event ends. After a snap event has started (see snapping-started), it can later end because either another timeline edit has occurred (which may or may not have created a new snapping event), or because the timeline has been committed.
Parameters:
self
–
obj1
–
The first element that was snapping
obj2
–
The second element that was snapping
position
–
The position where the two objects were to be snapped to
user_data
–
Flags: Run Last
snapping-ended
function snapping_ended_callback(self: GES.Timeline, obj1: GES.TrackElement, obj2: GES.TrackElement, position: Number, user_data: Object): {
// javascript callback for the 'snapping-ended' signal
}
Will be emitted whenever a snapping event ends. After a snap event has started (see snapping-started), it can later end because either another timeline edit has occurred (which may or may not have created a new snapping event), or because the timeline has been committed.
Parameters:
The first element that was snapping
The second element that was snapping
The position where the two objects were to be snapped to
Flags: Run Last
snapping-ended
def snapping_ended_callback (self, obj1, obj2, position, *user_data):
#python callback for the 'snapping-ended' signal
Will be emitted whenever a snapping event ends. After a snap event has started (see snapping-started), it can later end because either another timeline edit has occurred (which may or may not have created a new snapping event), or because the timeline has been committed.
Parameters:
The first element that was snapping
The second element that was snapping
The position where the two objects were to be snapped to
Flags: Run Last
snapping-started
snapping_started_callback (GESTimeline * self, GESTrackElement * obj1, GESTrackElement * obj2, guint64 position, gpointer user_data)
Will be emitted whenever an element's movement invokes a snapping event during an edit (usually of one of its ancestors) because its start or end point lies within the snapping-distance of another element's start or end point.
See GESEditMode to see what can snap during an edit.
Note that only up to one snapping-started signal will be emitted per element edit within a timeline.
Parameters:
self
–
obj1
–
The first element that is snapping
obj2
–
The second element that is snapping
position
–
The position where the two objects will snap to
user_data
–
Flags: Run Last
snapping-started
function snapping_started_callback(self: GES.Timeline, obj1: GES.TrackElement, obj2: GES.TrackElement, position: Number, user_data: Object): {
// javascript callback for the 'snapping-started' signal
}
Will be emitted whenever an element's movement invokes a snapping event during an edit (usually of one of its ancestors) because its start or end point lies within the snapping-distance of another element's start or end point.
See GES.EditMode to see what can snap during an edit.
Note that only up to one snapping-started signal will be emitted per element edit within a timeline.
Parameters:
The first element that is snapping
The second element that is snapping
The position where the two objects will snap to
Flags: Run Last
snapping-started
def snapping_started_callback (self, obj1, obj2, position, *user_data):
#python callback for the 'snapping-started' signal
Will be emitted whenever an element's movement invokes a snapping event during an edit (usually of one of its ancestors) because its start or end point lies within the snapping_distance of another element's start or end point.
See GES.EditMode to see what can snap during an edit.
Note that only up to one snapping-started signal will be emitted per element edit within a timeline.
Parameters:
The first element that is snapping
The second element that is snapping
The position where the two objects will snap to
Flags: Run Last
track-added
track_added_callback (GESTimeline * self, GESTrack * track, gpointer user_data)
Will be emitted after the track is added to the timeline.
Note that this should not be emitted whilst a timeline is being loaded from its GESProject asset. You should connect to the project's loaded signal if you want to know which tracks were created for the timeline.
Parameters:
self
–
track
–
The track that was added to timeline
user_data
–
Flags: Run First
track-added
function track_added_callback(self: GES.Timeline, track: GES.Track, user_data: Object): {
// javascript callback for the 'track-added' signal
}
Will be emitted after the track is added to the timeline.
Note that this should not be emitted whilst a timeline is being loaded from its GES.Project asset. You should connect to the project's loaded signal if you want to know which tracks were created for the timeline.
Parameters:
The track that was added to timeline
Flags: Run First
track-added
def track_added_callback (self, track, *user_data):
#python callback for the 'track-added' signal
Will be emitted after the track is added to the timeline.
Note that this should not be emitted whilst a timeline is being loaded from its GES.Project asset. You should connect to the project's loaded signal if you want to know which tracks were created for the timeline.
Parameters:
The track that was added to timeline
Flags: Run First
track-removed
track_removed_callback (GESTimeline * self, GESTrack * track, gpointer user_data)
Will be emitted after the track is removed from the timeline.
Parameters:
self
–
track
–
The track that was removed from timeline
user_data
–
Flags: Run First
track-removed
function track_removed_callback(self: GES.Timeline, track: GES.Track, user_data: Object): {
// javascript callback for the 'track-removed' signal
}
Will be emitted after the track is removed from the timeline.
Parameters:
The track that was removed from timeline
Flags: Run First
track-removed
def track_removed_callback (self, track, *user_data):
#python callback for the 'track-removed' signal
Will be emitted after the track is removed from the timeline.
Parameters:
The track that was removed from timeline
Flags: Run First
Properties
auto-transition
“auto-transition” gboolean
Whether to automatically create a transition whenever two GESSource-s overlap in a track of the timeline. See auto-transition if you want this to only happen in some layers.
Flags : Read / Write
auto-transition
“auto-transition” Number
Whether to automatically create a transition whenever two GES.Source-s overlap in a track of the timeline. See auto-transition if you want this to only happen in some layers.
Flags : Read / Write
auto_transition
“self.props.auto_transition” bool
Whether to automatically create a transition whenever two GES.Source-s overlap in a track of the timeline. See auto_transition if you want this to only happen in some layers.
Flags : Read / Write
duration
“duration” guint64
The current duration (in nanoseconds) of the timeline. A timeline 'starts' at time 0, so this is the maximum end time of all of its GESTimelineElement-s.
Flags : Read
duration
“duration” Number
The current duration (in nanoseconds) of the timeline. A timeline 'starts' at time 0, so this is the maximum end time of all of its GES.TimelineElement-s.
Flags : Read
duration
“self.props.duration” int
The current duration (in nanoseconds) of the timeline. A timeline 'starts' at time 0, so this is the maximum end time of all of its GES.TimelineElement-s.
Flags : Read
snapping-distance
“snapping-distance” guint64
The distance (in nanoseconds) at which a GESTimelineElement being moved within the timeline should snap one of its GESSource-s with another GESSource-s edge. See GESEditMode for which edges can snap during an edit. 0 means no snapping.
Flags : Read / Write
snapping-distance
“snapping-distance” Number
The distance (in nanoseconds) at which a GES.TimelineElement being moved within the timeline should snap one of its GES.Source-s with another GES.Source-s edge. See GES.EditMode for which edges can snap during an edit. 0 means no snapping.
Flags : Read / Write
snapping_distance
“self.props.snapping_distance” int
The distance (in nanoseconds) at which a GES.TimelineElement being moved within the timeline should snap one of its GES.Source-s with another GES.Source-s edge. See GES.EditMode for which edges can snap during an edit. 0 means no snapping.
Flags : Read / Write
Virtual Methods
group_added
group_added (GESTimeline * timeline, GESGroup * group)
Parameters:
timeline
–
group
–
vfunc_group_added
function vfunc_group_added(timeline: GES.Timeline, group: GES.Group): {
// javascript implementation of the 'group_added' virtual method
}
Parameters:
do_group_added
def do_group_added (timeline, group):
#python implementation of the 'group_added' virtual method
Parameters:
group_removed
group_removed (GESTimeline * timeline, GESGroup * group, GPtrArray * children)
Parameters:
timeline
–
group
–
children
–
layer_added
layer_added (GESTimeline * timeline, GESLayer * layer)
Parameters:
timeline
–
layer
–
vfunc_layer_added
function vfunc_layer_added(timeline: GES.Timeline, layer: GES.Layer): {
// javascript implementation of the 'layer_added' virtual method
}
Parameters:
do_layer_added
def do_layer_added (timeline, layer):
#python implementation of the 'layer_added' virtual method
Parameters:
layer_removed
layer_removed (GESTimeline * timeline, GESLayer * layer)
Parameters:
timeline
–
layer
–
vfunc_layer_removed
function vfunc_layer_removed(timeline: GES.Timeline, layer: GES.Layer): {
// javascript implementation of the 'layer_removed' virtual method
}
Parameters:
do_layer_removed
def do_layer_removed (timeline, layer):
#python implementation of the 'layer_removed' virtual method
Parameters:
track_added
track_added (GESTimeline * timeline, GESTrack * track)
Parameters:
timeline
–
track
–
vfunc_track_added
function vfunc_track_added(timeline: GES.Timeline, track: GES.Track): {
// javascript implementation of the 'track_added' virtual method
}
Parameters:
do_track_added
def do_track_added (timeline, track):
#python implementation of the 'track_added' virtual method
Parameters:
track_removed
track_removed (GESTimeline * timeline, GESTrack * track)
Parameters:
timeline
–
track
–
vfunc_track_removed
function vfunc_track_removed(timeline: GES.Timeline, track: GES.Track): {
// javascript implementation of the 'track_removed' virtual method
}
Parameters:
do_track_removed
def do_track_removed (timeline, track):
#python implementation of the 'track_removed' virtual method
Parameters:
Function Macros
GES_TIMELINE_GET_LAYERS
#define GES_TIMELINE_GET_LAYERS(obj) (GES_TIMELINE (obj)->layers)
GES_TIMELINE_GET_TRACKS
#define GES_TIMELINE_GET_TRACKS(obj) (GES_TIMELINE (obj)->tracks)
ges_timeline_get_project
#define ges_timeline_get_project(obj) (GES_PROJECT (ges_extractable_get_asset (GES_EXTRACTABLE(obj))))
Helper macro to retrieve the project from which obj was extracted
Parameters:
obj
–
The GESTimeline from which to retrieve the project
Constants
GES_TYPE_TIMELINE
#define GES_TYPE_TIMELINE ges_timeline_get_type()
The results of the search are