GES.TrackElement

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 GES.TrackElement GES.TrackElement GES.TimelineElement->GES.TrackElement GObject.InitiallyUnowned->GES.TimelineElement GES.Extractable->GES.TimelineElement

Subclasses:GES.Operation, GES.Source

Methods

Inherited:GES.TimelineElement (33), GObject.Object (40), GES.Extractable (3), GES.MetaContainer (37)
Structs:GObject.ObjectClass (5)
  add_children_props (element, wanted_categories, blacklist, whitelist)
  edit (layers, mode, edge, position)
  get_all_control_bindings ()
  get_control_binding (property_name)
  get_element ()
  get_gnlobject ()
  get_nleobject ()
  get_track ()
  get_track_type ()
  is_active ()
  list_children_properties ()
  lookup_child (prop_name)
  remove_control_binding (property_name)
  set_active (active)
  set_control_source (source, property_name, binding_type)
  set_track_type (type)

Properties

Inherited:GES.TimelineElement (9)
Name Type Flags Short Description
active bool r/w Use object in output
track GES.Track r The track the object is in
track-type GES.TrackType r/w/c The track type of the object

Signals

Inherited:GES.TimelineElement (1), GObject.Object (1), GES.MetaContainer (1)
Name Short Description
control-binding-added The control-binding-added signal is emitted each time a control binding is added for a child property of track_element
control-binding-removed The control-binding-removed signal is emitted each time a control binding is removed for a child property of track_element

Fields

Inherited:GES.TimelineElement (1), GObject.Object (1), GES.MetaContainer (1)
Name Type Access Description
active bool r  
asset GES.Asset r  
parent GES.TimelineElement r  

Class Details

class GES.TrackElement(**kwargs)
Bases:GES.TimelineElement
Abstract:Yes
Structure:GES.TrackElementClass

GES.TrackElement is the Base Class for any object that can be contained in a GES.Track.

It contains the basic information as to the location of the object within its container, like the start position, the inpoint, the duration and the priority.

add_children_props(element, wanted_categories, blacklist, whitelist)[source]
Parameters:
  • element (Gst.Element) – The Gst.Element to retrieve properties from
  • wanted_categories ([str] or None) – An array of categories of Gst.Element to take into account (as defined in the factory meta “klass” field)
  • blacklist ([str] or None) – A blacklist of elements factory names to not take into account
  • whitelist ([str] or None) – A list of propery names to add as children properties

Looks for the properties defines with the various parametters and add them to the hashtable of children properties.

To be used by subclasses only

edit(layers, mode, edge, position)[source]
Parameters:
  • layers ([GES.Layer]) – The layers you want the edit to happen in, None means that the edition is done in all the GES.Layers contained in the current timeline. FIXME: This is not implemented yet.
  • mode (GES.EditMode) – The GES.EditMode in which the edition will happen.
  • edge (GES.Edge) – The GES.Edge the edit should happen on.
  • position (int) – The position at which to edit self (in nanosecond)
Returns:

True if the object as been edited properly, False if an error occured

Return type:

bool

Edit self in the different exisiting GES.EditMode modes. In the case of slide, and roll, you need to specify a GES.Edge

get_all_control_bindings()[source]
Returns:A GLib.HashTable containing all property_name: Gst.ControlBinding
Return type:{str: Gst.ControlBinding}
get_control_binding(property_name)[source]
Parameters:property_name (str) – The property_name to which the binding is associated.
Returns:the Gst.ControlBinding associated with property_name, or None if that property is not controlled.
Return type:Gst.ControlBinding or None

Looks up the various controlled properties for that GES.TrackElement, and returns the Gst.ControlBinding which controls property_name.

get_element()[source]
Returns:the Gst.Element this track element is controlling within GNonLin.
Return type:Gst.Element

Get the Gst.Element this track element is controlling within GNonLin.

get_gnlobject()[source]
Returns:the NleObject object this object is controlling.
Return type:Gst.Element

Get the NleObject object this object is controlling.

Deprecated since version ???: use GES.TrackElement.get_nleobject instead.

get_nleobject()[source]
Returns:the GNonLin object this object is controlling.
Return type:Gst.Element

Get the GNonLin object this object is controlling.

New in version 1.6.

get_track()[source]
Returns:The GES.Track to which this object belongs. Can be None if it is not in any track
Return type:GES.Track or None

Get the GES.Track to which this object belongs.

get_track_type()[source]
Return type:GES.TrackType
is_active()[source]
Returns:True if self is active, False otherwize
Return type:bool

Lets you know if self will be used for playback and rendering, or not.

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.

Deprecated since version ???: Use GES.TimelineElement.list_children_properties

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.
element: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, element: Gst.Element, 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.

Deprecated since version ???: Use GES.TimelineElement.lookup_child

remove_control_binding(property_name)[source]
Parameters:property_name (str) – The name of the property to control.
Returns:True if the binding could be removed, False if an error occured
Return type:bool

Removes a Gst.ControlBinding from self.

set_active(active)[source]
Parameters:active (bool) – visibility
Returns:True if the property was toggled, else False
Return type:bool

Sets the usage of the self. If active is True, the object will be used for playback and rendering, else it will be ignored.

set_control_source(source, property_name, binding_type)[source]
Parameters:
  • source (Gst.ControlSource) – the Gst.ControlSource to set on the binding.
  • property_name (str) – The name of the property to control.
  • binding_type (str) – The type of binding to create. Only “direct” is available for now.
Returns:

True if the binding could be created and added, False if an error occured

Return type:

bool

Creates a Gst.ControlBinding and adds it to the Gst.Element concerned by the property. Use the same syntax as GES.TrackElement.lookup_child for the property name.

set_track_type(type)[source]
Parameters:type (GES.TrackType) –
do_active_changed(active) virtual
Parameters:active (bool) –
do_changed() virtual
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.
element: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, element: Gst.Element, 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.

Deprecated since version ???: Use GES.TimelineElement.lookup_child

Signal Details

GES.TrackElement.signals.control_binding_added(track_element, control_binding)
Signal Name:

control-binding-added

Flags:

RUN_FIRST

Parameters:

The control-binding-added signal is emitted each time a control binding is added for a child property of track_element

GES.TrackElement.signals.control_binding_removed(track_element, control_binding)
Signal Name:

control-binding-removed

Flags:

RUN_FIRST

Parameters:

The control-binding-removed signal is emitted each time a control binding is removed for a child property of track_element

Property Details

GES.TrackElement.props.active
Name:active
Type:bool
Default Value:True
Flags:READABLE, WRITABLE

Whether the object should be taken into account in the GES.Track output. If False, then its contents will not be used in the resulting track.

GES.TrackElement.props.track
Name:track
Type:GES.Track
Default Value:None
Flags:READABLE

The track the object is in

GES.TrackElement.props.track_type
Name:track-type
Type:GES.TrackType
Default Value:GES.TrackType.UNKNOWN
Flags:READABLE, WRITABLE, CONSTRUCT

The track type of the object