GES.Extractable

g GES.Extractable GES.Extractable GObject.GInterface GObject.GInterface GObject.GInterface->GES.Extractable

Implementations:
 GES.Formatter, GES.Layer, GES.Timeline, GES.TimelineElement

Methods

  get_asset ()
  get_id ()
  set_asset (asset)

Virtual Methods

  do_get_id ()
  do_set_asset (asset)
  do_set_asset_full (asset)

Properties

None

Signals

None

Fields

None

Class Details

class GES.Extractable
Bases:GObject.GInterface
Structure:GES.ExtractableInterface

A GObject.Object that implements the GES.Extractable interface can be extracted from a GES.Asset using GES.Asset.extract().

Each extractable type will have its own way of interpreting the GES.Asset :id of an asset (or, if it is associated with a specific subclass of GES.Asset, the asset subclass may handle the interpretation of the GES.Asset :id). By default, the requested asset GES.Asset :id will be ignored by a GES.Extractable and will be set to the type name of the extractable instead. Also by default, when the requested asset is extracted, the returned object will simply be a newly created default object of that extractable type. You should check the documentation for each extractable type to see if they differ from the default.

After the object is extracted, it will have a reference to the asset it came from, which you can retrieve using GES.Extractable.get_asset().

get_asset()[source]
Returns:The asset set on self, or None if no asset has been set.
Return type:GES.Asset or None

Get the asset that has been set on the extractable object.

get_id()[source]
Returns:The GES.Asset :id of some associated GES.Asset that is compatible with self’s current state.
Return type:str

Gets the GES.Asset :id of some associated asset. It may be the case that the object has no set asset, or even that such an asset does not yet exist in the GES cache. Instead, this will return the asset GES.Asset :id that is _compatible_ with the current state of the object, as determined by the GES.Extractable implementer. If it was indeed extracted from an asset, this should return the same as its corresponding asset GES.Asset :id.

set_asset(asset)[source]
Parameters:asset (GES.Asset) – The asset to set
Returns:True if asset could be successfully set on self.
Return type:bool

Sets the asset for this extractable object.

When an object is extracted from an asset using GES.Asset.extract() its asset will be automatically set. Note that many classes that implement GES.Extractable will automatically create their objects using assets when you call their new methods. However, you can use this method to associate an object with a compatible asset if it was created by other means and does not yet have an asset. Or, for some implementations of GES.Extractable, you can use this to change the asset of the given extractable object, which will lead to a change in its state to match the new asset GES.Asset :id.

do_get_id() virtual
Returns:The GES.Asset :id of some associated GES.Asset that is compatible with self’s current state.
Return type:str

Gets the GES.Asset :id of some associated asset. It may be the case that the object has no set asset, or even that such an asset does not yet exist in the GES cache. Instead, this will return the asset GES.Asset :id that is _compatible_ with the current state of the object, as determined by the GES.Extractable implementer. If it was indeed extracted from an asset, this should return the same as its corresponding asset GES.Asset :id.

do_set_asset(asset) virtual
Parameters:asset (GES.Asset) –
do_set_asset_full(asset) virtual
Parameters:asset (GES.Asset) –
Return type:bool