GES.TimelineElement

g GES.MetaContainer GES.MetaContainer GES.TimelineElement GES.TimelineElement GES.MetaContainer->GES.TimelineElement GObject.GInterface GObject.GInterface GObject.GInterface->GES.MetaContainer GES.Extractable GES.Extractable GObject.GInterface->GES.Extractable GObject.Object GObject.Object GObject.InitiallyUnowned GObject.InitiallyUnowned GObject.Object->GObject.InitiallyUnowned GObject.InitiallyUnowned->GES.TimelineElement GES.Extractable->GES.TimelineElement

Subclasses:GES.Container, GES.TrackElement

Methods

Inherited:GObject.Object (40), GES.Extractable (3), GES.MetaContainer (37)
Structs:GObject.ObjectClass (5)
  add_child_property (pspec, child)
  copy (deep)
  get_child_property (property_name)
  get_child_property_by_pspec (pspec)
  get_duration ()
  get_inpoint ()
  get_max_duration ()
  get_name ()
  get_parent ()
  get_priority ()
  get_start ()
  get_timeline ()
  get_toplevel_parent ()
  get_track_types ()
  list_children_properties ()
  lookup_child (prop_name)
  paste (paste_position)
  remove_child_property (pspec)
  ripple (start)
  ripple_end (end)
  roll_end (end)
  roll_start (start)
  set_child_property (property_name, value)
  set_child_property_by_pspec (pspec, value)
  set_duration (duration)
  set_inpoint (inpoint)
  set_max_duration (maxduration)
  set_name (name)
  set_parent (parent)
  set_priority (priority)
  set_start (start)
  set_timeline (timeline)
  trim (start)

Virtual Methods

Inherited:GObject.Object (7), GES.Extractable (3)
  do_deep_copy (copy)
  do_get_track_types ()
  do_lookup_child (prop_name)
  do_ripple (start)
  do_ripple_end (end)
  do_roll_end (end)
  do_roll_start (start)
  do_set_duration (duration)
  do_set_inpoint (inpoint)
  do_set_max_duration (maxduration)
  do_set_parent (parent)
  do_set_priority (priority)
  do_set_start (start)
  do_trim (start)

Properties

Name Type Flags Short Description
duration int r/w The duration to use
in-point int r/w The in-point
max-duration int r/w/c The maximum duration of the object
name str r/w/c The name of the timeline object
parent GES.TimelineElement r/w The parent container of the object
priority int r/w The priority of the object
serialize bool r/w Whether the element should be serialized
start int r/w The position in the container
timeline GES.Timeline r/w The timeline the object is in

Signals

Inherited:GObject.Object (1), GES.MetaContainer (1)
Name Short Description
deep-notify The deep notify signal is used to be notified of property changes of all the childs of timeline_element

Fields

Inherited:GObject.Object (1), GES.MetaContainer (1)
Name Type Access Description
asset GES.Asset r The GES.Asset from which the object has been extracted
duration int r duration of the object to be used
inpoint int r Position in the media from which the object should be used
maxduration int r The maximum duration the object can have
name str r  
parent GES.TimelineElement r The GES.TimelineElement that controls the object
parent_instance GObject.InitiallyUnowned r  
priority int r priority of the object in the layer (0:py:data::top<GES.TimelineElement.props.top> priority)
start int r position (in time) of the object
timeline GES.Timeline r  

Class Details

class GES.TimelineElement(**kwargs)
Bases:GObject.InitiallyUnowned, GES.Extractable, GES.MetaContainer
Abstract:Yes
Structure:GES.TimelineElementClass

The GES.TimelineElement base class implements the notion of timing as well as priority. A GES.TimelineElement can have a parent object which will be responsible for controlling its timing properties.

add_child_property(pspec, child)[source]
Parameters:
Return type:

bool

copy(deep)[source]
Parameters:deep (bool) – whether we want to create the elements self contains or not
Returns:The newly create GES.TimelineElement, copied from self
Return type:GES.TimelineElement

Copies self

get_child_property(property_name)[source]
Parameters:property_name (str) – The name of the property
Returns:True if the property was found, False otherwize
value:return location for the property value, it will be initialized if it is initialized with 0
Return type:(bool, value: GObject.Value)

In general, a copy is made of the property contents and the caller is responsible for freeing the memory by calling GObject.Value.unset().

Gets a property of a Gst.Element contained in object.

Note that GES.TimelineElement.get_child_property is really intended for language bindings, #ges_timeline_element_get_child_properties is much more convenient for C programming.

get_child_property_by_pspec(pspec)[source]
Parameters:pspec (GObject.ParamSpec) – The GObject.ParamSpec that specifies the property you want to get
Returns:return location for the value
Return type:value: GObject.Value

Gets a property of a child of self.

get_duration()[source]
Returns:The duration of self
Return type:int
get_inpoint()[source]
Returns:The inpoint of self
Return type:int
get_max_duration()[source]
Returns:The maxduration of self
Return type:int
get_name()[source]
Returns:The name of self
Return type:str

Returns a copy of the name of self. Caller should GLib.free() the return value after usage.

get_parent()[source]
Returns:parent of self, this can be None if self has no parent. unref after usage.
Return type:GES.TimelineElement or None

Returns the parent of self. This function increases the refcount of the parent object so you should Gst.Object.unref() it after usage.

get_priority()[source]
Returns:The priority of self
Return type:int
get_start()[source]
Returns:The start of self
Return type:int
get_timeline()[source]
Returns:timeline of self, this can be None if self has no timeline. unref after usage.
Return type:GES.Timeline or None

Returns the timeline of self. This function increases the refcount of the timeline so you should Gst.Object.unref() it after usage.

get_toplevel_parent()[source]
Returns:The toplevel controlling parent of self
Return type:GES.TimelineElement

Gets the toplevel GES.TimelineElement controlling self

get_track_types()[source]
Return type:GES.TrackType

Gets all the TrackTypes self will interact with

New in version 1.6.0.

list_children_properties()[source]
Returns:an array of GObject.ParamSpec which should be freed after use or None if something went wrong
Return type:[GObject.ParamSpec]

Gets an array of GObject.ParamSpec for all configurable properties of the children of self.

lookup_child(prop_name)[source]
Parameters:prop_name (str) – name of the property to look up. You can specify the name of the class as such: “ClassName::property-name”, to guarantee that you get the proper GObject.ParamSpec in case various Gst.Element-s contain the same property name. If you don’t do so, you will get the first element found, having this property and the and the corresponding GObject.ParamSpec.
Returns:True if element and pspec could be found. False otherwise. In that case the values for pspec and element are not modified. Unref element after usage.
child:pointer to a Gst.Element that takes the real object to set property on
pspec:pointer to take the GObject.ParamSpec describing the property
Return type:(bool, child: GObject.Object, pspec: GObject.ParamSpec)

Looks up which element and pspec would be effected by the given name. If various contained elements have this property name you will get the first one, unless you specify the class name in name.

paste(paste_position)[source]
Parameters:paste_position (int) – The position in the timeline the element should be copied to, meaning it will become the start of self
Returns:Paste self copying the element
Return type:GES.TimelineElement

Paste self inside the timeline. self must have been created using GES.TimelineElement.copy with recurse=:obj:True set, otherwise it will fail.

New in version 1.6.0.

remove_child_property(pspec)[source]
Parameters:pspec (GObject.ParamSpec) –
Return type:bool
ripple(start)[source]
Parameters:start (int) – The new start of self in ripple mode.
Returns:True if the self as been rippled properly, False if an error occured
Return type:bool

Edits self in ripple mode. It allows you to modify the start of self and move the following neighbours accordingly. This will change the overall timeline duration.

ripple_end(end)[source]
Parameters:end (int) – The new end (start + duration) of self in ripple mode. It will basically only change the duration of self.
Returns:True if the self as been rippled properly, False if an error occured
Return type:bool

Edits self in ripple mode. It allows you to modify the duration of a self and move the following neighbours accordingly. This will change the overall timeline duration.

roll_end(end)[source]
Parameters:end (int) – The new end (start + duration) of self in roll mode
Returns:True if the self as been rolled properly, False if an error occured
Return type:bool

Edits self in roll mode. It allows you to modify the duration of a self and trim (basicly change the start + inpoint in this case) the following neighbours accordingly. This will not change the overall timeline duration.

roll_start(start)[source]
Parameters:start (int) – The new start of self in roll mode, it will also adapat the in-point of self according
Returns:True if the self as been roll properly, False if an error occured
Return type:bool

Edits self in roll mode. It allows you to modify the start and inpoint of a self and “resize” (basicly change the duration in this case) of the previous neighbours accordingly. This will not change the overall timeline duration.

set_child_property(property_name, value)[source]
Parameters:
  • property_name (str) – The name of the property
  • value (GObject.Value) – the value
Returns:

True if the property was set, False otherwize

Return type:

bool

Sets a property of a child of self

Note that GES.TimelineElement.set_child_property is really intended for language bindings, #ges_timeline_element_set_child_properties is much more convenient for C programming.

set_child_property_by_pspec(pspec, value)[source]
Parameters:

Sets a property of a child of self.

set_duration(duration)[source]
Parameters:duration (int) – the duration in #GstClockTime

Set the duration of the object

Note that if the timeline snap-distance property of the timeline containing self is set, self will properly snap to its neighboors.

set_inpoint(inpoint)[source]
Parameters:inpoint (int) – the in-point in #GstClockTime

Set the in-point, that is the moment at which the self will start outputting data from its contents.

set_max_duration(maxduration)[source]
Parameters:maxduration (int) – the maximum duration in #GstClockTime

Set the maximun duration of the object

set_name(name)[source]
Parameters:name (str or None) – The name self should take (if avalaible<)
Return type:bool

Sets the name of object, or gives self a guaranteed unique name (if name is None). This function makes a copy of the provided name, so the caller retains ownership of the name it sent.

set_parent(parent)[source]
Parameters:parent (GES.TimelineElement) – new parent of self
Returns:True if parent could be set or False when self already had a parent or self and parent are the same.
Return type:bool

Sets the parent of self to parent. The object’s reference count will be incremented, and any floating reference will be removed (see gst_object_ref_sink()).

set_priority(priority)[source]
Parameters:priority (int) – the priority

Sets the priority of the object within the containing layer

Deprecated since version ???: All priority management is done by GES itself now. To set GES.Effect priorities GES.Clip.set_top_effect_index should be used.

set_start(start)[source]
Parameters:start (int) – the position in #GstClockTime

Set the position of the object in its containing layer.

Note that if the snapping-distance property of the timeline containing self is set, self will properly snap to the edges around start.

set_timeline(timeline)[source]
Parameters:timeline (GES.Timeline) – The GES.Timeline self is in
Returns:True if timeline could be set or False when timeline already had a timeline.
Return type:bool

Sets the timeline of self to timeline.

trim(start)[source]
Parameters:start (int) – The new start of self in trim mode, will adapt the inpoint of self accordingly
Returns:True if the self as been trimmed properly, False if an error occured
Return type:bool

Edits self in trim mode. It allows you to modify the inpoint and start of self. This will not change the overall timeline duration.

Note that to trim the end of an self you can just set its duration. The same way as this method, it will take into account the snapping-distance property of the timeline in which self is.

do_deep_copy(copy) virtual
Parameters:copy (GES.TimelineElement) –
do_get_track_types() virtual
Return type:GES.TrackType

Gets all the TrackTypes self will interact with

New in version 1.6.0.

do_lookup_child(prop_name) virtual
Parameters:prop_name (str) – name of the property to look up. You can specify the name of the class as such: “ClassName::property-name”, to guarantee that you get the proper GObject.ParamSpec in case various Gst.Element-s contain the same property name. If you don’t do so, you will get the first element found, having this property and the and the corresponding GObject.ParamSpec.
Returns:True if element and pspec could be found. False otherwise. In that case the values for pspec and element are not modified. Unref element after usage.
child:pointer to a Gst.Element that takes the real object to set property on
pspec:pointer to take the GObject.ParamSpec describing the property
Return type:(bool, child: GObject.Object, pspec: GObject.ParamSpec)

Looks up which element and pspec would be effected by the given name. If various contained elements have this property name you will get the first one, unless you specify the class name in name.

do_ripple(start) virtual
Parameters:start (int) – The new start of self in ripple mode.
Returns:True if the self as been rippled properly, False if an error occured
Return type:bool

Edits self in ripple mode. It allows you to modify the start of self and move the following neighbours accordingly. This will change the overall timeline duration.

do_ripple_end(end) virtual
Parameters:end (int) – The new end (start + duration) of self in ripple mode. It will basically only change the duration of self.
Returns:True if the self as been rippled properly, False if an error occured
Return type:bool

Edits self in ripple mode. It allows you to modify the duration of a self and move the following neighbours accordingly. This will change the overall timeline duration.

do_roll_end(end) virtual
Parameters:end (int) – The new end (start + duration) of self in roll mode
Returns:True if the self as been rolled properly, False if an error occured
Return type:bool

Edits self in roll mode. It allows you to modify the duration of a self and trim (basicly change the start + inpoint in this case) the following neighbours accordingly. This will not change the overall timeline duration.

do_roll_start(start) virtual
Parameters:start (int) – The new start of self in roll mode, it will also adapat the in-point of self according
Returns:True if the self as been roll properly, False if an error occured
Return type:bool

Edits self in roll mode. It allows you to modify the start and inpoint of a self and “resize” (basicly change the duration in this case) of the previous neighbours accordingly. This will not change the overall timeline duration.

do_set_duration(duration) virtual
Parameters:duration (int) –
Return type:bool
do_set_inpoint(inpoint) virtual
Parameters:inpoint (int) –
Return type:bool
do_set_max_duration(maxduration) virtual
Parameters:maxduration (int) –
Return type:bool
do_set_parent(parent) virtual
Parameters:parent (GES.TimelineElement) – new parent of self
Returns:True if parent could be set or False when self already had a parent or self and parent are the same.
Return type:bool

Sets the parent of self to parent. The object’s reference count will be incremented, and any floating reference will be removed (see gst_object_ref_sink()).

do_set_priority(priority) virtual
Parameters:priority (int) –
Return type:bool
do_set_start(start) virtual
Parameters:start (int) –
Return type:bool
do_trim(start) virtual
Parameters:start (int) – The new start of self in trim mode, will adapt the inpoint of self accordingly
Returns:True if the self as been trimmed properly, False if an error occured
Return type:bool

Edits self in trim mode. It allows you to modify the inpoint and start of self. This will not change the overall timeline duration.

Note that to trim the end of an self you can just set its duration. The same way as this method, it will take into account the snapping-distance property of the timeline in which self is.

Signal Details

GES.TimelineElement.signals.deep_notify(timeline_element, prop_object, prop)
Signal Name:

deep-notify

Flags:

RUN_FIRST, NO_RECURSE, DETAILED, NO_HOOKS

Parameters:

The deep notify signal is used to be notified of property changes of all the childs of timeline_element

Property Details

GES.TimelineElement.props.duration
Name:duration
Type:int
Default Value:18446744073709551615L
Flags:READABLE, WRITABLE

The duration (in nanoseconds) which will be used in the container

GES.TimelineElement.props.in_point
Name:in-point
Type:int
Default Value:0
Flags:READABLE, WRITABLE

The in-point at which this GES.TimelineElement will start outputting data from its contents (in nanoseconds).

Ex : an in-point of 5 seconds means that the first outputted buffer will be the one located 5 seconds in the controlled resource.

GES.TimelineElement.props.max_duration
Name:max-duration
Type:int
Default Value:18446744073709551615L
Flags:READABLE, WRITABLE, CONSTRUCT

The maximum duration (in nanoseconds) of the GES.TimelineElement.

GES.TimelineElement.props.name
Name:name
Type:str
Default Value:None
Flags:READABLE, WRITABLE, CONSTRUCT

The name of the object

GES.TimelineElement.props.parent
Name:parent
Type:GES.TimelineElement
Default Value:None
Flags:READABLE, WRITABLE

The parent container of the object

GES.TimelineElement.props.priority
Name:priority
Type:int
Default Value:0
Flags:READABLE, WRITABLE

The priority of the object.

Setting GES.TimelineElement priorities is deprecated as all priority management is done by GES itself now.

GES.TimelineElement.props.serialize
Name:serialize
Type:bool
Default Value:True
Flags:READABLE, WRITABLE

Whether the element should be serialized.

GES.TimelineElement.props.start
Name:start
Type:int
Default Value:0
Flags:READABLE, WRITABLE

The position of the object in its container (in nanoseconds).

GES.TimelineElement.props.timeline
Name:timeline
Type:GES.Timeline
Default Value:None
Flags:READABLE, WRITABLE

The timeline in which element is