Trait gstreamer_editing_services::prelude::ExtractableExt [−][src]
pub trait ExtractableExt: 'static { fn asset(&self) -> Option<Asset>; fn id(&self) -> Option<GString>; fn set_asset<P: IsA<Asset>>(&self, asset: &P) -> Result<(), BoolError>; }
Expand description
Trait containing all Extractable
methods.
Implementors
BaseEffect
, BaseTransitionClip
, Clip
, Container
, Effect
, Extractable
, Group
, Layer
, OperationClip
, TimelineElement
, Timeline
, TrackElement
, TransitionClip
, UriClip
Required methods
Gets the property::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
property::Asset::id
that is compatible with the current state of the object,
as determined by the Extractable
implementer. If it was indeed
extracted from an asset, this should return the same as its
corresponding asset property::Asset::id
.
Returns
The property::Asset::id
of some associated Asset
that is compatible with self
’s current state.
Sets the asset for this extractable object.
When an object is extracted from an asset using AssetExt::extract()
its
asset will be automatically set. Note that many classes that implement
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
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 property::Asset::id
.
asset
The asset to set
Returns
true
if asset
could be successfully set on self
.