GES.UriClipAsset¶
- Subclasses:
None
Methods¶
- Inherited:
GES.ClipAsset (4), GES.Asset (13), GObject.Object (37), GES.MetaContainer (40), Gio.AsyncInitable (4), Gio.Initable (2)
- Structs:
class |
|
class |
|
class |
|
class |
|
|
|
|
|
|
Virtual Methods¶
Properties¶
- Inherited:
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r/w |
The duration to use |
||
r |
Whether this is a nested timeline |
Signals¶
- Inherited:
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
parent |
r |
Class Details¶
- class GES.UriClipAsset(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
- classmethod finish(res)[source]¶
- Parameters:
res (
Gio.AsyncResult
) – TheGio.AsyncResult
from which to get the newly createdGES.UriClipAsset
- Raises:
- Returns:
The
GES.UriClipAsset
previously requested- Return type:
Finalize the request of an async
GES.UriClipAsset
New in version 1.16.
- classmethod new(uri, cancellable, callback, *user_data)[source]¶
- Parameters:
uri (
str
) – The URI of the file for which to create aGES.UriClipAsset
cancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
object,None
to ignore.callback (
Gio.AsyncReadyCallback
orNone
) – aGio.AsyncReadyCallback
to call when the initialization is finisheduser_data (
object
orNone
) – The user data to pass when callback is called
Creates a
GES.UriClipAsset
for uriExample 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 aGES.UriClipAsset
. You can also use multi file uris forGES.MultiFileSource
.- Raises:
- Returns:
A reference to the requested asset or
None
if an error happened- Return type:
Creates a
GES.UriClipAsset
for uri synchonously. You should avoid to use it in application, and rather createGES.UriClipAsset
asynchronously
- classmethod set_timeout(timeout)¶
- Parameters:
timeout (
int
) – The timeout to set
Sets the timeout of
GES.UriClipAsset
loadingDeprecated since version 1.24:
GES.DiscovererManager.set_timeout
() should be used instead
- get_duration()[source]¶
- Returns:
The duration of self
- Return type:
Gets duration of the file represented by self
- get_info()[source]¶
- Returns:
GstPbutils.DiscovererInfo
of specified asset- Return type:
Gets
GstPbutils.DiscovererInfo
about the file
- get_max_duration()[source]¶
- Returns:
The maximum duration of self
- Return type:
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:
- Return type:
Get the
GES.UriSourceAsset
self containes
Property Details¶
- GES.UriClipAsset.props.duration¶
-
The duration (in nanoseconds) of the media file