Top | ![]() |
![]() |
![]() |
![]() |
The GESUriClipAsset is a special GESAsset 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.
GstClockTime
ges_uri_clip_asset_get_duration (GESUriClipAsset *self
);
Gets duration of the file represented by self
gboolean
ges_uri_clip_asset_is_image (GESUriClipAsset *self
);
Gets Whether the file represented by self
is an image or not
GstDiscovererInfo *
ges_uri_clip_asset_get_info (const GESUriClipAsset *self
);
Gets GstDiscovererInfo about the file
void ges_uri_clip_asset_new (const gchar *uri
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
);
Creates a GESUriClipAsset for uri
Example of request of a GESUriClipAsset:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
// 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); |
uri |
The URI of the file for which to create a GESUriClipAsset |
|
cancellable |
optional |
|
callback |
a GAsyncReadyCallback to call when the initialization is finished. |
[scope async] |
user_data |
The user data to pass when |
GESUriClipAsset * ges_uri_clip_asset_request_sync (const gchar *uri
,GError **error
);
Creates a GESUriClipAsset for uri
syncronously. You should avoid
to use it in application, and rather create GESUriClipAsset asynchronously
uri |
The URI of the file for which to create a GESUriClipAsset. You can also use multi file uris for GESMultiFileSource. |
|
error |
An error to be set in case something wrong happens or |
[allow-none] |
const GList *
ges_uri_clip_asset_get_stream_assets (GESUriClipAsset *self
);
Get the GESUriSourceAsset self
containes
void ges_uri_clip_asset_class_set_timeout (GESUriClipAssetClass *klass
,GstClockTime timeout
);
Sets the timeout of GESUriClipAsset loading