GES.TimelineElement¶
- Subclasses:
Methods¶
- Inherited:
GObject.Object (37), GES.Extractable (3), GES.MetaContainer (40)
- Structs:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Properties¶
Name |
Type |
Flags |
Short Description |
|---|---|---|---|
r/w/en |
The play duration |
||
r/w/en |
The in-point |
||
r/w/c/en |
The maximum duration of the object |
||
r/w/c |
The name of the timeline object |
||
r/w |
The parent container of the object |
||
r/w |
The priority of the object |
||
r/w |
Whether the element should be serialized |
||
r/w/en |
The position in the timeline |
||
r/w/en |
The timeline the object is in |
Signals¶
- Inherited:
Name |
Short Description |
|---|---|
Emitted when the element has a new child property registered. |
|
Emitted when the element has a child property unregistered. |
|
Emitted when a child of the element has one of its registered properties set. |
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
|---|---|---|---|
asset |
r |
The |
|
duration |
r |
The |
|
inpoint |
r |
The |
|
maxduration |
r |
The |
|
name |
r |
The |
|
parent |
r |
The |
|
parent_instance |
r |
||
priority |
r |
The |
|
start |
r |
The |
|
timeline |
r |
The |
Class Details¶
- class GES.TimelineElement(**kwargs)¶
- Bases:
GObject.InitiallyUnowned,GES.Extractable,GES.MetaContainer- Abstract:
Yes
- Structure:
A
GES.TimelineElementwill have some temporal extent in its correspondingGES.TimelineElement:timeline, controlled by itsGES.TimelineElement:startandGES.TimelineElement:duration. This determines when its content will be displayed, or its effect applied, in the timeline. Several objects may overlap within a givenGES.Timeline, in which case theirGES.TimelineElement:priorityis used to determine their ordering in the timeline. Priority is mostly handled internally byGES.Layer-s andGES.Clip-s.A timeline element can have a
GES.TimelineElement:parent, such as aGES.Clip, which is responsible for controlling its timing.- Editing
Elements can be moved around in their
GES.TimelineElement:timelineby setting theirGES.TimelineElement:startandGES.TimelineElement:durationusingGES.TimelineElement.set_start() andGES.TimelineElement.set_duration(). Additionally, which parts of the underlying content are played in the timeline can be adjusted by setting theGES.TimelineElement:in-pointusingGES.TimelineElement.set_inpoint(). The library also providesGES.TimelineElement.edit(), with variousGES.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
GES.Timelinefor 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
GES.TimelineElement:start, or having insufficient internal content to last for the desiredGES.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
GES.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 settingGES.TimelineElement:startandGES.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
GES.TrackElement-s, where it refers to time coordinates used at the final source pad of the wrappedGst.Element-s. However, these coordinates may also be used in aGES.Clipin reference to its children. In particular, these are the coordinates used forGES.TimelineElement:in-pointandGES.TimelineElement:max-duration.Internal sink coordinates: these are the time coordinates used internally at the element’s input. A
GES.Sourcehas no input, so these would be undefined. Otherwise, for mostGES.TrackElement-s these will be the same set of coordinates as the internal source coordinates because the element does not change the timing internally. OnlyGES.BaseEffectcan support elements where these are different. SeeGES.BaseEffectfor more information.
You can determine the timeline time for a given internal source time in a
GES.Trackin aGES.ClipusingGES.Clip.get_timeline_time_from_internal_time(), and vice versa usingGES.Clip.get_internal_time_from_timeline_time(), for the purposes of editing and setting timings properties.- Children Properties
If a timeline element owns another
Gst.Objectand wishes to expose some of its properties, it can do so by registering the property as one of the timeline element’s children properties usingGES.TimelineElement.add_child_property(). The registered property of the child can then be read and set using theGES.TimelineElement.get_child_property() andGES.TimelineElement.set_child_property() methods, respectively. Some sub-classed objects will be created with pre-registered children properties; for example, to expose part of an underlyingGst.Elementthat is used internally. The registered properties can be listed withGES.TimelineElement.list_children_properties().- add_child_property(pspec, child)[source]¶
- Parameters:
pspec (
GObject.ParamSpec) – The specification for the property to addchild (
GObject.Object) – TheGst.Objectwho the property belongs to
- Returns:
Trueif the property was successfully registered.- Return type:
Register a property of a child of the element to allow it to be written with
GES.TimelineElement.set_child_property() and read withGES.TimelineElement.get_child_property(). A change in the property will also appear in theGES.TimelineElement::deep-notifysignal.pspec should be unique from other children properties that have been registered on self.
- copy(deep)[source]¶
- Parameters:
deep (
bool) – Whether the copy is needed for pasting- Returns:
The newly create element, copied from self.
- Return type:
Create a copy of self. All the properties of self are copied into a new element, with the exception of
GES.TimelineElement:parent,GES.TimelineElement:timelineandGES.TimelineElement:name. Other data, such the list of aGES.Container's children, is **not** copied.If deep is
True, then the new element is prepared so that it can be used inGES.TimelineElement.paste() orGES.Timeline.paste_element(). In the case of copying aGES.Container, this ensures that the children of self will also be pasted. The new element should not be used for anything else and can only be used **once** in a pasting operation. In particular, the new element itself is not an actual ‘deep’ copy of self, but should be thought of as an intermediate object used for a single paste operation.
- edit(layers, new_layer_priority, mode, edge, position)[source]¶
- Parameters:
layers ([
GES.Layer] orNone) – A whitelist of layers where the edit can be performed,Noneallows all layers in the timeline.new_layer_priority (
int) – The priority/index of the layer self should be moved to. -1 means no movemode (
GES.EditMode) – The edit modeedge (
GES.Edge) – The edge of self where the edit should occurposition (
int) – The edit position: a new location for the edge of self (in nanoseconds) in the timeline coordinates
- Returns:
- Return type:
See
GES.TimelineElement.edit_full(), which also gives an error.Note that the layers argument is currently ignored, so you should just pass
None.New in version 1.18.
- edit_full(new_layer_priority, mode, edge, position)[source]¶
- Parameters:
new_layer_priority (
int) – The priority/index of the layer self should be moved to. -1 means no movemode (
GES.EditMode) – The edit modeedge (
GES.Edge) – The edge of self where the edit should occurposition (
int) – The edit position: a new location for the edge of self (in nanoseconds) in the timeline coordinates
- Raises:
- Returns:
- Return type:
Edits the element within its timeline by adjusting its
GES.TimelineElement:start,GES.TimelineElement:durationorGES.TimelineElement:in-point, and potentially doing the same for other elements in the timeline. SeeGES.EditModefor details about each edit mode. An edit may fail if it would place one of these properties out of bounds, or if it would place the timeline in an unsupported configuration.Note that if you act on a
GES.TrackElement, this will edit its parentGES.Clipinstead. Moreover, for anyGES.TimelineElement, if you selectGES.Edge.EDGE_NONEforGES.EditMode.EDIT_NORMALorGES.EditMode.RIPPLE, this will edit the toplevel instead, but still in such a way as to make theGES.TimelineElement:startof self reach the edit position.Note that if the element’s timeline has a
GES.Timeline:snapping-distanceset, then the edit position may be snapped to the edge of some element under the edited element.new_layer_priority can be used to switch self, and other elements moved by the edit, to a new layer. New layers may be be created if the the corresponding layer priority/index does not yet exist for the timeline.
New in version 1.18.
- get_child_property(property_name)[source]¶
- Parameters:
property_name (
str) – The name of the child property to get- Returns:
Trueif the property was found and copied to value.- value:
The return location for the value
- Return type:
(
bool, value:GObject.Value)
Gets the property of a child of the element.
property_name can either be in the format “prop-name” or “TypeName::prop-name”, where “prop-name” is the name of the property to get (as used in g_object_get()), and “TypeName” is the type name of the child (as returned by G_OBJECT_TYPE_NAME()). The latter format is useful when two children of different types share the same property name.
The first child found with the given “prop-name” property that was registered with
GES.TimelineElement.add_child_property() (and of the type “TypeName”, if it was given) will have the corresponding property copied into value.Note that ges_timeline_element_get_child_properties() may be more convenient for C programming.
- get_child_property_by_pspec(pspec)[source]¶
- Parameters:
pspec (
GObject.ParamSpec) – The specification of a registered child property to get- Returns:
The return location for the value
- Return type:
value:
GObject.Value
Gets the property of a child of the element. Specifically, the property corresponding to the pspec used in
GES.TimelineElement.add_child_property() is copied into value.
- get_duration()[source]¶
- Returns:
The duration of self (in nanoseconds).
- Return type:
Gets the
GES.TimelineElement:durationfor the element.
- get_inpoint()[source]¶
- Returns:
The in-point of self (in nanoseconds).
- Return type:
Gets the
GES.TimelineElement:in-pointfor the element.
- get_layer_priority()[source]¶
- Returns:
The priority of the layer self is in, or
GES.TIMELINE_ELEMENT_NO_LAYER_PRIORITYif self does not exist in a layer.- Return type:
Gets the priority of the layer the element is in. A
GES.Groupmay span several layers, so this would return the highest priority (numerically, the smallest) amongst them.New in version 1.16.
- get_max_duration()[source]¶
- Returns:
The max-duration of self (in nanoseconds).
- Return type:
Gets the
GES.TimelineElement:max-durationfor the element.
- get_name()[source]¶
-
Gets the
GES.TimelineElement:namefor the element.
- get_natural_framerate()[source]¶
- Returns:
Whether self has a natural framerate or not, framerate_n and framerate_d will be set to, respectively, 0 and -1 if it is not the case.
- framerate_n:
The framerate numerator
- framerate_d:
The framerate denominator
- Return type:
Get the “natural” framerate of self. This is to say, for example for a
GES.VideoUriSourcethe framerate of the source.Note that a
GES.AudioSourcemay also have a natural framerate if it derives from the sameGES.SourceClipasset as aGES.VideoSource, and its value will be that of the video source. For example, if the uri of aGES.UriClippoints to a file that contains both a video and audio stream, then the correspondingGES.AudioUriSourcewill share the natural framerate of the correspondingGES.VideoUriSource.New in version 1.18.
- get_parent()[source]¶
- Returns:
The parent of self, or
Noneif self has no parent.- Return type:
Gets the
GES.TimelineElement:parentfor the element.
- get_priority()[source]¶
- Returns:
The priority of self.
- Return type:
Gets the
GES.TimelineElement:priorityfor the element.
- get_start()[source]¶
- Returns:
The start of self (in nanoseconds).
- Return type:
Gets the
GES.TimelineElement:startfor the element.
- get_timeline()[source]¶
- Returns:
The timeline of self, or
Noneif self has no timeline.- Return type:
GES.TimelineorNone
Gets the
GES.TimelineElement:timelinefor the element.
- get_toplevel_parent()[source]¶
- Returns:
The toplevel parent of self.
- Return type:
Gets the toplevel
GES.TimelineElement:parentof the element.
- get_track_types()[source]¶
- Returns:
The track types that self supports.
- Return type:
Gets the track types that the element can interact with, i.e. the type of
GES.Trackit can exist in, or will createGES.TrackElement-s for.New in version 1.6.0.
- list_children_properties()[source]¶
- Returns:
An array of
GObject.ParamSpeccorresponding to the child properties of self, orNoneif something went wrong.- Return type:
Get a list of children properties of the element, which is a list of all the specifications passed to
GES.TimelineElement.add_child_property().
- lookup_child(prop_name)[source]¶
- Parameters:
prop_name (
str) – The name of a child property- Returns:
Trueif a child corresponding to the property was found, in which case child and pspec are set.- child:
The return location for the found child
- pspec:
The return location for the specification of the child property
- Return type:
(
bool, child:GObject.Object, pspec:GObject.ParamSpec)
Looks up a child property of the element.
prop_name can either be in the format “prop-name” or “TypeName::prop-name”, where “prop-name” is the name of the property to look up (as used in g_object_get()), and “TypeName” is the type name of the child (as returned by G_OBJECT_TYPE_NAME()). The latter format is useful when two children of different types share the same property name.
The first child found with the given “prop-name” property that was registered with
GES.TimelineElement.add_child_property() (and of the type “TypeName”, if it was given) will be passed to child, and the registered specification of this property will be passed to pspec.
- paste(paste_position)[source]¶
- Parameters:
paste_position (
int) – The position in the timeline element should be pasted to, i.e. theGES.TimelineElement:startvalue for the pasted element.- Returns:
The newly created element, or
Noneif pasting fails.- Return type:
Paste an element inside the same timeline and layer as self. self **must** be the return of
GES.TimelineElement.copy() withdeep=TRUE, and it should not be changed before pasting. self 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 stay within the same timeline and layer, 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.paste_element().New in version 1.6.0.
- remove_child_property(pspec)[source]¶
- Parameters:
pspec (
GObject.ParamSpec) – The specification for the property to remove- Returns:
Trueif the property was successfully un-registered for self.- Return type:
Remove a child property from the element. pspec should be a specification that was passed to
GES.TimelineElement.add_child_property(). The corresponding property will no longer be registered as a child property for the element.
- ripple(start)[source]¶
- Parameters:
start (
int) – The new start time of self in ripple mode- Returns:
Trueif the ripple edit of self completed,Falseon failure.- Return type:
Edits the start time of an element within its timeline in ripple mode. See
GES.TimelineElement.edit() withGES.EditMode.RIPPLEandGES.Edge.EDGE_NONE.
- ripple_end(end)[source]¶
- Parameters:
end (
int) – The new end time of self in ripple mode- Returns:
Trueif the ripple edit of self completed,Falseon failure.- Return type:
Edits the end time of an element within its timeline in ripple mode. See
GES.TimelineElement.edit() withGES.EditMode.RIPPLEandGES.Edge.END.
- roll_end(end)[source]¶
- Parameters:
end (
int) – The new end time of self in roll mode- Returns:
- Return type:
Edits the end time of an element within its timeline in roll mode. See
GES.TimelineElement.edit() withGES.EditMode.ROLLandGES.Edge.END.
- roll_start(start)[source]¶
- Parameters:
start (
int) – The new start time of self in roll mode- Returns:
- Return type:
Edits the start time of an element within its timeline in roll mode. See
GES.TimelineElement.edit() withGES.EditMode.ROLLandGES.Edge.START.
- set_child_property(property_name, value)[source]¶
- Parameters:
property_name (
str) – The name of the child property to setvalue (
GObject.Value) – The value to set the property to
- Returns:
Trueif the property was found and set.- Return type:
See
GES.TimelineElement.set_child_property_full(), which also gives an error.Note that ges_timeline_element_set_child_properties() may be more convenient for C programming.
- set_child_property_by_pspec(pspec, value)[source]¶
- Parameters:
pspec (
GObject.ParamSpec) – The specification of a registered child property to setvalue (
GObject.Value) – The value to set the property to
Sets the property of a child of the element. Specifically, the property corresponding to the pspec used in
GES.TimelineElement.add_child_property() is set to value.
- set_child_property_full(property_name, value)[source]¶
- Parameters:
property_name (
str) – The name of the child property to setvalue (
GObject.Value) – The value to set the property to
- Raises:
- Returns:
Trueif the property was found and set.- Return type:
Sets the property of a child of the element.
property_name can either be in the format “prop-name” or “TypeName::prop-name”, where “prop-name” is the name of the property to set (as used in g_object_set()), and “TypeName” is the type name of the child (as returned by G_OBJECT_TYPE_NAME()). The latter format is useful when two children of different types share the same property name.
The first child found with the given “prop-name” property that was registered with
GES.TimelineElement.add_child_property() (and of the type “TypeName”, if it was given) will have the corresponding property set to value. Other children that may have also matched the property name (and type name) are left unchanged!New in version 1.18.
- set_duration(duration)[source]¶
- Parameters:
duration (
int) – The desired duration in its timeline- Returns:
Trueif duration could be set for self.- Return type:
Sets
GES.TimelineElement:durationfor the element.Whilst the element is part of a
GES.Timeline, this is the same as editing the element withGES.TimelineElement.edit() underGES.EditMode.TRIMwithGES.Edge.END. In particular, theGES.TimelineElement:durationof the element may be snapped to a different timeline time difference from the one given. In addition, setting may fail if it would place the timeline in an unsupported configuration, or the element does not have enough internal content to last the desired duration.
- set_inpoint(inpoint)[source]¶
- Parameters:
inpoint (
int) – The in-point, in internal time coordinates- Returns:
Trueif inpoint could be set for self.- Return type:
Sets
GES.TimelineElement:in-pointfor the element. If the new in-point is above the currentGES.TimelineElement:max-durationof the element, this method will fail.
- set_max_duration(maxduration)[source]¶
- Parameters:
maxduration (
int) – The maximum duration, in internal time coordinates- Returns:
Trueif maxduration could be set for self.- Return type:
Sets
GES.TimelineElement:max-durationfor the element. If the new maximum duration is below the currentGES.TimelineElement:in-pointof the element, this method will fail.
- set_name(name)[source]¶
- Parameters:
- Returns:
Trueif name or a generated name for self could be set.- Return type:
Sets the
GES.TimelineElement:namefor the element. IfNoneis given for name, then the library will instead generate a new name based on the type name of the element, such as the name “uriclip3” for aGES.UriClip, and will set that name instead.If self already has a
GES.TimelineElement:timeline, you should not call this function with name set toNone.You should ensure that, within each
GES.Timeline, every element has a unique name. If you call this function with name asNone, then the library should ensure that the set generated name is unique from previously **generated** names. However, if you choose a name that interferes with the naming conventions of the library, the library will attempt to ensure that the generated names will not conflict with the chosen name, which may lead to a different name being set instead, but the uniqueness between generated and user-chosen names is not guaranteed.
- set_parent(parent)[source]¶
- Parameters:
parent (
GES.TimelineElement) –- Returns:
Trueif parent could be set for self.- Return type:
Sets the
GES.TimelineElement:parentfor the element.This is used internally and you should normally not call this. A
GES.Containerwill set theGES.TimelineElement:parentof its children inGES.Container.add() andGES.Container.remove().Note, if parent is not
None, self must not already have a parent set. Therefore, if you wish to switch parents, you will need to call this function twice: first to set the parent toNone, and then to the new parent.If parent is not
None, you must ensure it already has a (non-floating) reference to self before calling this.
- set_priority(priority)[source]¶
- Parameters:
priority (
int) – The priority- Returns:
Trueif priority could be set for self.- Return type:
Sets the priority of the element within the containing layer.
Deprecated since version 1.10: All priority management is done by GES itself now. To set
GES.EffectprioritiesGES.Clip.set_top_effect_indexshould be used.
- set_start(start)[source]¶
- Parameters:
start (
int) – The desired start position of the element in its timeline- Returns:
Trueif start could be set for self.- Return type:
Sets
GES.TimelineElement:startfor the element. If the element has a parent, this will also move its siblings with the same shift.Whilst the element is part of a
GES.Timeline, this is the same as editing the element withGES.TimelineElement.edit() underGES.EditMode.EDIT_NORMALwithGES.Edge.EDGE_NONE. In particular, theGES.TimelineElement:startof the element may be snapped to a different timeline time from the one given. In addition, setting may fail if it would place the timeline in an unsupported configuration.
- set_timeline(timeline)[source]¶
- Parameters:
timeline (
GES.Timeline) –- Returns:
Trueif timeline could be set for self.- Return type:
Sets the
GES.TimelineElement:timelineof the element.This is used internally and you should normally not call this. A
GES.Clipwill have itsGES.TimelineElement:timelineset through itsGES.Layer. AGES.Trackwill similarly take care of setting theGES.TimelineElement:timelineof itsGES.TrackElement-s. AGES.Groupwill adopt the sameGES.TimelineElement:timelineas its children.If timeline is
None, this will stop its currentGES.TimelineElement:timelinefrom tracking it, otherwise timeline will start tracking self. Note, in the latter case, self must not already have a timeline set. Therefore, if you wish to switch timelines, you will need to call this function twice: first to set the timeline toNone, and then to the new timeline.
- trim(start)[source]¶
- Parameters:
start (
int) – The new start time of self in trim mode- Returns:
- Return type:
Edits the start time of an element within its timeline in trim mode. See
GES.TimelineElement.edit() withGES.EditMode.TRIMandGES.Edge.START.
- do_deep_copy(copy) virtual¶
- Parameters:
copy (
GES.TimelineElement) –
Prepare copy for pasting as a copy of self. At least by copying the children properties of self into copy.
- do_get_layer_priority() virtual¶
- Returns:
The priority of the layer self is in, or
GES.TIMELINE_ELEMENT_NO_LAYER_PRIORITYif self does not exist in a layer.- Return type:
Gets the priority of the layer the element is in. A
GES.Groupmay span several layers, so this would return the highest priority (numerically, the smallest) amongst them.New in version 1.16.
- do_get_natural_framerate() virtual¶
- Returns:
Whether self has a natural framerate or not, framerate_n and framerate_d will be set to, respectively, 0 and -1 if it is not the case.
- framerate_n:
The framerate numerator
- framerate_d:
The framerate denominator
- Return type:
Get the “natural” framerate of self. This is to say, for example for a
GES.VideoUriSourcethe framerate of the source.Note that a
GES.AudioSourcemay also have a natural framerate if it derives from the sameGES.SourceClipasset as aGES.VideoSource, and its value will be that of the video source. For example, if the uri of aGES.UriClippoints to a file that contains both a video and audio stream, then the correspondingGES.AudioUriSourcewill share the natural framerate of the correspondingGES.VideoUriSource.New in version 1.18.
- do_get_track_types() virtual¶
- Returns:
The track types that self supports.
- Return type:
Gets the track types that the element can interact with, i.e. the type of
GES.Trackit can exist in, or will createGES.TrackElement-s for.New in version 1.6.0.
- do_lookup_child(prop_name) virtual¶
- Parameters:
prop_name (
str) – The name of a child property- Returns:
Trueif a child corresponding to the property was found, in which case child and pspec are set.- child:
The return location for the found child
- pspec:
The return location for the specification of the child property
- Return type:
(
bool, child:GObject.Object, pspec:GObject.ParamSpec)
Looks up a child property of the element.
prop_name can either be in the format “prop-name” or “TypeName::prop-name”, where “prop-name” is the name of the property to look up (as used in g_object_get()), and “TypeName” is the type name of the child (as returned by G_OBJECT_TYPE_NAME()). The latter format is useful when two children of different types share the same property name.
The first child found with the given “prop-name” property that was registered with
GES.TimelineElement.add_child_property() (and of the type “TypeName”, if it was given) will be passed to child, and the registered specification of this property will be passed to pspec.
- do_ripple(start) virtual¶
- Parameters:
start (
int) – The new start time of self in ripple mode- Returns:
Trueif the ripple edit of self completed,Falseon failure.- Return type:
Edits the start time of an element within its timeline in ripple mode. See
GES.TimelineElement.edit() withGES.EditMode.RIPPLEandGES.Edge.EDGE_NONE.
- do_ripple_end(end) virtual¶
- Parameters:
end (
int) – The new end time of self in ripple mode- Returns:
Trueif the ripple edit of self completed,Falseon failure.- Return type:
Edits the end time of an element within its timeline in ripple mode. See
GES.TimelineElement.edit() withGES.EditMode.RIPPLEandGES.Edge.END.
- do_roll_end(end) virtual¶
- Parameters:
end (
int) – The new end time of self in roll mode- Returns:
- Return type:
Edits the end time of an element within its timeline in roll mode. See
GES.TimelineElement.edit() withGES.EditMode.ROLLandGES.Edge.END.
- do_roll_start(start) virtual¶
- Parameters:
start (
int) – The new start time of self in roll mode- Returns:
- Return type:
Edits the start time of an element within its timeline in roll mode. See
GES.TimelineElement.edit() withGES.EditMode.ROLLandGES.Edge.START.
- do_set_child_property(child, pspec, value) virtual¶
- Parameters:
child (
GObject.Object) –pspec (
GObject.ParamSpec) –value (
GObject.Value) –
Method for setting the child property given by pspec on child to value. Default implementation will use
GObject.Object.set_property().New in version 1.16.
- do_set_child_property_full(child, pspec, value) virtual¶
- Parameters:
child (
GObject.Object) –pspec (
GObject.ParamSpec) –value (
GObject.Value) –
- Return type:
Similar to set_child_property, except setting can fail, with the error being optionally set. Default implementation will call set_child_property and return
True.New in version 1.18.
- do_set_duration(duration) virtual¶
- Parameters:
duration (
int) – The desired duration in its timeline- Returns:
Trueif duration could be set for self.- Return type:
Sets
GES.TimelineElement:durationfor the element.Whilst the element is part of a
GES.Timeline, this is the same as editing the element withGES.TimelineElement.edit() underGES.EditMode.TRIMwithGES.Edge.END. In particular, theGES.TimelineElement:durationof the element may be snapped to a different timeline time difference from the one given. In addition, setting may fail if it would place the timeline in an unsupported configuration, or the element does not have enough internal content to last the desired duration.
- do_set_inpoint(inpoint) virtual¶
- Parameters:
inpoint (
int) – The in-point, in internal time coordinates- Returns:
Trueif inpoint could be set for self.- Return type:
Sets
GES.TimelineElement:in-pointfor the element. If the new in-point is above the currentGES.TimelineElement:max-durationof the element, this method will fail.
- do_set_max_duration(maxduration) virtual¶
- Parameters:
maxduration (
int) – The maximum duration, in internal time coordinates- Returns:
Trueif maxduration could be set for self.- Return type:
Sets
GES.TimelineElement:max-durationfor the element. If the new maximum duration is below the currentGES.TimelineElement:in-pointof the element, this method will fail.
- do_set_parent(parent) virtual¶
- Parameters:
parent (
GES.TimelineElement) –- Returns:
Trueif parent could be set for self.- Return type:
Sets the
GES.TimelineElement:parentfor the element.This is used internally and you should normally not call this. A
GES.Containerwill set theGES.TimelineElement:parentof its children inGES.Container.add() andGES.Container.remove().Note, if parent is not
None, self must not already have a parent set. Therefore, if you wish to switch parents, you will need to call this function twice: first to set the parent toNone, and then to the new parent.If parent is not
None, you must ensure it already has a (non-floating) reference to self before calling this.
- do_set_priority(priority) virtual¶
- Parameters:
priority (
int) – The priority- Returns:
Trueif priority could be set for self.- Return type:
Sets the priority of the element within the containing layer.
Deprecated since version 1.10: All priority management is done by GES itself now. To set
GES.EffectprioritiesGES.Clip.set_top_effect_indexshould be used.
- do_set_start(start) virtual¶
- Parameters:
start (
int) – The desired start position of the element in its timeline- Returns:
Trueif start could be set for self.- Return type:
Sets
GES.TimelineElement:startfor the element. If the element has a parent, this will also move its siblings with the same shift.Whilst the element is part of a
GES.Timeline, this is the same as editing the element withGES.TimelineElement.edit() underGES.EditMode.EDIT_NORMALwithGES.Edge.EDGE_NONE. In particular, theGES.TimelineElement:startof the element may be snapped to a different timeline time from the one given. In addition, setting may fail if it would place the timeline in an unsupported configuration.
- do_trim(start) virtual¶
- Parameters:
start (
int) – The new start time of self in trim mode- Returns:
- Return type:
Edits the start time of an element within its timeline in trim mode. See
GES.TimelineElement.edit() withGES.EditMode.TRIMandGES.Edge.START.
Signal Details¶
- GES.TimelineElement.signals.child_property_added(timeline_element, prop_object, prop)¶
- Signal Name:
child-property-added- Flags:
- Parameters:
timeline_element (
GES.TimelineElement) – The object which received the signalprop_object (
GObject.Object) – The child whose property has been registeredprop (
GObject.ParamSpec) – The specification for the property that has been registered
Emitted when the element has a new child property registered. See
GES.TimelineElement.add_child_property().Note that some GES elements will be automatically created with pre-registered children properties. You can use
GES.TimelineElement.list_children_properties() to list these.New in version 1.18.
- GES.TimelineElement.signals.child_property_removed(timeline_element, prop_object, prop)¶
- Signal Name:
child-property-removed- Flags:
- Parameters:
timeline_element (
GES.TimelineElement) – The object which received the signalprop_object (
GObject.Object) – The child whose property has been unregisteredprop (
GObject.ParamSpec) – The specification for the property that has been unregistered
Emitted when the element has a child property unregistered. See
GES.TimelineElement.remove_child_property().New in version 1.18.
- GES.TimelineElement.signals.deep_notify(timeline_element, prop_object, prop)¶
- Signal Name:
deep-notify- Flags:
- Parameters:
timeline_element (
GES.TimelineElement) – The object which received the signalprop_object (
GObject.Object) – The child whose property has been setprop (
GObject.ParamSpec) – The specification for the property that been set
Emitted when a child of the element has one of its registered properties set. See
GES.TimelineElement.add_child_property(). Note that unlikeGObject.Object::notify, a child property name can not be used as a signal detail.
Property Details¶
- GES.TimelineElement.props.duration¶
- Name:
duration- Type:
- Default Value:
18446744073709551615- Flags:
The duration that the element is in effect for in the timeline (a time difference in nanoseconds using the time coordinates of the timeline). For example, for a source element, this would determine for how long it should output its internal content for. For an operation element, this would determine for how long its effect should be applied to any source content.
- GES.TimelineElement.props.in_point¶
- Name:
in-point- Type:
- Default Value:
0- Flags:
The initial offset to use internally when outputting content (in nanoseconds, but in the time coordinates of the internal content).
For example, for a
GES.VideoUriSourcethat references some media file, the “internal content” is the media file data, and the in-point would correspond to some timestamp in the media file. When playing the timeline, and when the element is first reached at timeline-timeGES.TimelineElement:start, it will begin outputting the data from the timestamp in-point **onwards**, until it reaches the end of itsGES.TimelineElement:durationin the timeline.For elements that have no internal content, this should be kept as 0.
- GES.TimelineElement.props.max_duration¶
- Name:
max-duration- Type:
- Default Value:
18446744073709551615- Flags:
The full duration of internal content that is available (a time difference in nanoseconds using the time coordinates of the internal content).
This will act as a cap on the
GES.TimelineElement:in-pointof the element (which is in the same time coordinates), and will sometimes be used to limit theGES.TimelineElement:durationof the element in the timeline.For example, for a
GES.VideoUriSourcethat references some media file, this would be the length of the media file.For elements that have no internal content, or whose content is indefinite, this should be kept as
Gst.CLOCK_TIME_NONE.
- GES.TimelineElement.props.name¶
-
The name of the element. This should be unique within its timeline.
- GES.TimelineElement.props.parent¶
- Name:
parent- Type:
- Default Value:
- Flags:
The parent container of the element.
- GES.TimelineElement.props.priority¶
-
The priority of the element.
Deprecated since version 1.10: Priority management is now done by GES itself.
- GES.TimelineElement.props.serialize¶
-
Whether the element should be serialized.
- GES.TimelineElement.props.start¶
- Name:
start- Type:
- Default Value:
0- Flags:
The starting position of the element in the timeline (in nanoseconds and in the time coordinates of the timeline). For example, for a source element, this would determine the time at which it should start outputting its internal content. For an operation element, this would determine the time at which it should start applying its effect to any source content.
- GES.TimelineElement.props.timeline¶
- Name:
timeline- Type:
- Default Value:
- Flags:
The timeline that the element lies within.