Trait gstreamer_editing_services::prelude::AssetExt[][src]

pub trait AssetExt: 'static {
    fn extract(&self) -> Result<Extractable, Error>;
fn error(&self) -> Option<Error>;
fn extractable_type(&self) -> Type;
fn id(&self) -> Option<GString>;
fn proxy(&self) -> Option<Asset>;
fn proxy_target(&self) -> Option<Asset>;
fn list_proxies(&self) -> Vec<Asset>;
fn set_proxy<P: IsA<Asset>>(
        &self,
        proxy: Option<&P>
    ) -> Result<(), BoolError>;
fn unproxy<P: IsA<Asset>>(&self, proxy: &P) -> Result<(), BoolError>;
fn connect_proxy_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_proxy_target_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId; }

Trait containing all Asset methods.

Implementors

crate::Asset, crate::Project

Required methods

fn extract(&self) -> Result<Extractable, Error>[src]

Extracts a new [crate::Asset:extractable-type] object from the asset. The [crate::Asset:id] of the asset may determine the properties and state of the newly created object.

Returns

A newly created object, or None if an error occurred.

fn error(&self) -> Option<Error>[src]

Retrieve the error that was set on the asset when it was loaded.

Returns

The error set on asset, or None if no error occurred when asset was loaded.

fn extractable_type(&self) -> Type[src]

Gets the [crate::Asset:extractable-type] of the asset.

Returns

The extractable type of self.

fn id(&self) -> Option<GString>[src]

Gets the [crate::Asset:id] of the asset.

Returns

The ID of self.

fn proxy(&self) -> Option<Asset>[src]

Gets the default [crate::Asset:proxy] of the asset.

Returns

The default proxy of self.

fn proxy_target(&self) -> Option<Asset>[src]

Gets the [crate::Asset:proxy-target] of the asset.

Note that the proxy target may have loaded with an error, so you should call [Self::get_error()] on the returned target.

Returns

The asset that self is a proxy of.

fn list_proxies(&self) -> Vec<Asset>[src]

Get all the proxies that the asset has. The first item of the list will be the default [crate::Asset:proxy]. The second will be the proxy that is ‘next in line’ to be default, and so on.

Returns

The list of proxies that self has.

fn set_proxy<P: IsA<Asset>>(&self, proxy: Option<&P>) -> Result<(), BoolError>[src]

Sets the [crate::Asset:proxy] for the asset.

If proxy is among the existing proxies of the asset (see Self::list_proxies()) it will be moved to become the default proxy. Otherwise, if proxy is not None, it will be added to the list of proxies, as the new default. The previous default proxy will become ‘next in line’ for if the new one is removed, and so on. As such, this will not actually remove the previous default proxy (use Self::unproxy() for that).

Note that an asset can only act as a proxy for one other asset.

As a special case, if proxy is None, then this method will actually remove all proxies from the asset.

proxy

A new default proxy for self

Returns

true if proxy was successfully set as the default for self.

fn unproxy<P: IsA<Asset>>(&self, proxy: &P) -> Result<(), BoolError>[src]

Removes the proxy from the available list of proxies for the asset. If the given proxy is the default proxy of the list, then the next proxy in the available list (see Self::list_proxies()) will become the default. If there are no other proxies, then the asset will no longer have a default [crate::Asset:proxy].

proxy

An existing proxy of self

Returns

true if proxy was successfully removed from self’s proxy list.

fn connect_proxy_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId[src]

fn connect_proxy_target_notify<F: Fn(&Self) + 'static>(
    &self,
    f: F
) -> SignalHandlerId
[src]

Loading content...

Implementors

impl<O: IsA<Asset>> AssetExt for O[src]

fn extract(&self) -> Result<Extractable, Error>[src]

fn error(&self) -> Option<Error>[src]

fn extractable_type(&self) -> Type[src]

fn id(&self) -> Option<GString>[src]

fn proxy(&self) -> Option<Asset>[src]

fn proxy_target(&self) -> Option<Asset>[src]

fn list_proxies(&self) -> Vec<Asset>[src]

fn set_proxy<P: IsA<Asset>>(&self, proxy: Option<&P>) -> Result<(), BoolError>[src]

fn unproxy<P: IsA<Asset>>(&self, proxy: &P) -> Result<(), BoolError>[src]

fn connect_proxy_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId[src]

fn connect_proxy_target_notify<F: Fn(&Self) + 'static>(
    &self,
    f: F
) -> SignalHandlerId
[src]

Loading content...