UriClipAsset


Description:

[ CCode ( finish_name = "ges_asset_request_finish" , has_construct_function = false , type = "void" ) ]
public async UriClipAsset (string uri, Cancellable? cancellable) throws Error

Creates a UriClipAsset for uri

Example of request of a GESUriClipAsset:

// 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);

Parameters:

uri

The URI of the file for which to create a UriClipAsset

cancellable

optional gcancellable object, null to ignore.

callback

a TaskReadyCallback to call when the initialization is finished

user_data

The user data to pass when callback is called