![]() |
![]() |
![]() |
GStreamer Editing Services 1.2.1 Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Implemented Interfaces |
#include <ges/ges.h> GESUriClipAsset; GType ges_uri_clip_asset_get_type (void
); GstClockTime ges_uri_clip_asset_get_duration (GESUriClipAsset *self
); gboolean ges_uri_clip_asset_is_image (GESUriClipAsset *self
); GstDiscovererInfo * ges_uri_clip_asset_get_info (const GESUriClipAsset *self
); void ges_uri_clip_asset_new (const gchar *uri
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
); GESUriClipAsset * ges_uri_clip_asset_request_sync (const gchar *uri
,GError **error
); const GList * ges_uri_clip_asset_get_stream_assets (GESUriClipAsset *self
); void ges_uri_clip_asset_class_set_timeout (GESUriClipAssetClass *klass
,GstClockTime timeout
);
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
|
a GESUriClipAsset |
Returns : |
The duration of self
|
gboolean ges_uri_clip_asset_is_image (GESUriClipAsset *self
);
Gets Whether the file represented by self
is an image or not
|
a indent: Standard input:311: Error:Unexpected end of file GESUriClipAsset |
Returns : |
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
|
Target asset |
Returns : |
GstDiscovererInfo of specified asset. [transfer none] |
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); |
|
The URI of the file for which to create a GESUriClipAsset |
|
optional GCancellable object, NULL to ignore. |
|
a GAsyncReadyCallback to call when the initialization is finished. [scope async] |
|
The user data to pass when callback is called |
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
|
The URI of the file for which to create a GESUriClipAsset |
|
An error to be set in case something wrong happens or NULL . [allow-none]
|
Returns : |
A reference to the requested asset or NULL if an error happend. [transfer none]
|
const GList * ges_uri_clip_asset_get_stream_assets
(GESUriClipAsset *self
);
Get the GESUriSourceAsset self
containes
|
A GESUriClipAsset |
Returns : |
a GList of GESUriSourceAsset. [transfer none][element-type GESUriSourceAsset] |
void ges_uri_clip_asset_class_set_timeout (GESUriClipAssetClass *klass
,GstClockTime timeout
);
Sets the timeout of GESUriClipAsset loading
|
The GESUriClipAssetClass on which to set the discoverer timeout |
|
The timeout to set |