GES.UriClipAsset

g GES.Asset GES.Asset GES.ClipAsset GES.ClipAsset GES.Asset->GES.ClipAsset GES.MetaContainer GES.MetaContainer GES.MetaContainer->GES.Asset GObject.GInterface GObject.GInterface GObject.GInterface->GES.MetaContainer Gio.AsyncInitable Gio.AsyncInitable GObject.GInterface->Gio.AsyncInitable Gio.Initable Gio.Initable GObject.GInterface->Gio.Initable GObject.Object GObject.Object GObject.Object->GES.Asset Gio.AsyncInitable->GES.Asset Gio.Initable->GES.Asset GES.UriClipAsset GES.UriClipAsset GES.ClipAsset->GES.UriClipAsset

Subclasses:None

Properties

Inherited:GES.ClipAsset (1), GES.Asset (4)
Name Type Flags Short Description
duration int r/w The duration to use

Fields

Inherited:GObject.Object (1), GES.MetaContainer (1)
Name Type Access Description
parent GES.ClipAsset r  

Class Details

class GES.UriClipAsset(**kwargs)
Bases:GES.ClipAsset
Abstract:No
Structure:GES.UriClipAssetClass

The GES.UriClipAsset is a special GES.Asset that lets you handle the media file to use inside the GStreamer Editing Services. It has APIs that let you get information about the medias. Also, the tags found in the media file are set as Metadatas of the Asser.

classmethod new(uri, cancellable, callback, *user_data)[source]
Parameters:

Creates a GES.UriClipAsset for uri

Example of request of a GES.UriClipAsset:

// The request callback
static void
filesource_asset_loaded_cb (GESAsset * source, GAsyncResult * res, gpointer user_data)
{
  GError *error = NULL;
  GESUriClipAsset *filesource_asset;

  filesource_asset = GES_URI_CLIP_ASSET (ges_asset_request_finish (res, &error));
  if (filesource_asset) {
   g_print ("The file: %s is usable as a FileSource, it is%s an image and lasts %" GST_TIME_FORMAT,
       ges_asset_get_id (GES_ASSET (filesource_asset))
       ges_uri_clip_asset_is_image (filesource_asset) ? "" : " not",
       GST_TIME_ARGS (ges_uri_clip_asset_get_duration (filesource_asset));
  } else {
   g_print ("The file: %s is *not* usable as a FileSource because: %s",
       ges_asset_get_id (source), error->message);
  }

  gst_object_unref (mfs);
}

// The request:
ges_uri_clip_asset_new (uri, (GAsyncReadyCallback) filesource_asset_loaded_cb, user_data);
classmethod request_sync(uri)[source]
Parameters:uri (str) – The URI of the file for which to create a GES.UriClipAsset. You can also use multi file uris for GES.MultiFileSource.
Raises:GLib.Error
Returns:A reference to the requested asset or None if an error happened
Return type:GES.UriClipAsset or None

Creates a GES.UriClipAsset for uri syncronously. You should avoid to use it in application, and rather create GES.UriClipAsset asynchronously

classmethod set_timeout(timeout)
Parameters:timeout (int) – The timeout to set

Sets the timeout of GES.UriClipAsset loading

get_duration()[source]
Returns:The duration of self
Return type:int

Gets duration of the file represented by self

get_info()[source]
Returns:GstPbutils.DiscovererInfo of specified asset
Return type:GstPbutils.DiscovererInfo

Gets GstPbutils.DiscovererInfo about the file

get_stream_assets()[source]
Returns:a GLib.List of GES.UriSourceAsset
Return type:[GES.UriSourceAsset]

Get the GES.UriSourceAsset self containes

is_image()[source]
Returns:Whether the file represented by self is an image or not
Return type:bool

Gets Whether the file represented by self is an image or not

Property Details

GES.UriClipAsset.props.duration
Name:duration
Type:int
Default Value:18446744073709551615L
Flags:READABLE, WRITABLE

The duration (in nanoseconds) of the media file