[][src]Trait gstreamer_editing_services::prelude::ExtractableExt

pub trait ExtractableExt: 'static {
    fn get_asset(&self) -> Option<Asset>;
fn get_id(&self) -> Option<GString>;
fn set_asset<P: IsA<Asset>>(&self, asset: &P) -> Result<(), BoolError>; }

Trait containing all Extractable methods.

Implementors

BaseEffect, BaseTransitionClip, Clip, Container, Effect, Extractable, Group, Layer, OperationClip, TimelineElement, Timeline, TrackElement, TransitionClip, UriClip

Required methods

fn get_asset(&self) -> Option<Asset>

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

Returns

The asset set on self, or None if no asset has been set.

fn get_id(&self) -> Option<GString>

Gets the 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 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 Asset:id.

Returns

The Asset:id of some associated Asset that is compatible with self's current state.

fn set_asset<P: IsA<Asset>>(&self, asset: &P) -> Result<(), BoolError>

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 Asset:id.

asset

The asset to set

Returns

true if asset could be successfully set on self.

Loading content...

Implementors

impl<O: IsA<Extractable>> ExtractableExt for O[src]

Loading content...