GES.UriClipAsset

g GES.Asset GES.Asset GES.ClipAsset GES.ClipAsset GES.Asset->GES.ClipAsset GES.SourceClipAsset GES.SourceClipAsset GES.ClipAsset->GES.SourceClipAsset GES.MetaContainer GES.MetaContainer GES.MetaContainer->GES.Asset GES.UriClipAsset GES.UriClipAsset GES.SourceClipAsset->GES.UriClipAsset 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

Subclasses:

None

Methods

Inherited:

GES.ClipAsset (4), GES.Asset (13), GObject.Object (37), GES.MetaContainer (40), Gio.AsyncInitable (4), Gio.Initable (2)

Structs:

GES.UriClipAssetClass (1), GObject.ObjectClass (5)

class

finish (res)

class

new (uri, cancellable, callback, *user_data)

class

request_sync (uri)

class

set_timeout (timeout)

get_duration ()

get_info ()

get_max_duration ()

get_stream_assets ()

is_image ()

Virtual Methods

Inherited:

GES.ClipAsset (1), GES.Asset (5), GObject.Object (7), Gio.AsyncInitable (2), Gio.Initable (1)

Properties

Inherited:

GES.ClipAsset (1), GES.Asset (4)

Name

Type

Flags

Short Description

duration

int

r/w

The duration to use

is-nested-timeline

bool

r

Whether this is a nested timeline

Signals

Inherited:

GObject.Object (1), GES.MetaContainer (1)

Fields

Inherited:

GObject.Object (1), GES.MetaContainer (1)

Name

Type

Access

Description

parent

GES.SourceClipAsset

r

Class Details

class GES.UriClipAsset(**kwargs)
Bases:

GES.SourceClipAsset

Abstract:

No

Structure:

GES.UriClipAssetClass

classmethod finish(res)[source]
Parameters:

res (Gio.AsyncResult) – The Gio.AsyncResult from which to get the newly created GES.UriClipAsset

Raises:

GLib.Error

Returns:

The GES.UriClipAsset previously requested

Return type:

GES.UriClipAsset

Finalize the request of an async GES.UriClipAsset

New in version 1.16.

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_finish (res, &error);
  if (filesource_asset) {
   gst_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 {
   gst_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

Creates a GES.UriClipAsset for uri synchonously. 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

Deprecated since version 1.24: GES.DiscovererManager.set_timeout() should be used instead

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_max_duration()[source]
Returns:

The maximum duration of self

Return type:

int

Gets maximum duration of the file represented by self, it is usually the same as GES.UriClipAsset ::duration, but in the case of nested timelines, for example, they are different as those can be extended ‘infinitely’.

New in version 1.18.

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

New in version 1.18.

Property Details

GES.UriClipAsset.props.duration
Name:

duration

Type:

int

Default Value:

18446744073709551615

Flags:

READABLE, WRITABLE

The duration (in nanoseconds) of the media file

GES.UriClipAsset.props.is_nested_timeline
Name:

is-nested-timeline

Type:

bool

Default Value:

False

Flags:

READABLE

The duration (in nanoseconds) of the media file

New in version 1.18.