From 5e069976f6117e8fec6d5ccc1f19c1843ef5bcba Mon Sep 17 00:00:00 2001 From: Thibault Saunier Date: Sun, 8 Nov 2015 22:49:43 +0100 Subject: [PATCH] asset: Add a method to retrieve the GError of an asset loaded with error API: ges_asset_get_error --- docs/libs/ges-sections.txt | 1 + ges/ges-asset.c | 17 +++++++++++++++++ ges/ges-asset.h | 1 + 3 files changed, 19 insertions(+) diff --git a/docs/libs/ges-sections.txt b/docs/libs/ges-sections.txt index b54d1dae6e..73dfffdc21 100644 --- a/docs/libs/ges-sections.txt +++ b/docs/libs/ges-sections.txt @@ -1077,6 +1077,7 @@ ges_asset_request ges_asset_request_async ges_asset_request_finish ges_asset_extract +ges_asset_get_error ges_list_assets GESAssetPrivate diff --git a/ges/ges-asset.c b/ges/ges-asset.c index 28e8d9cf45..44b9895737 100644 --- a/ges/ges-asset.c +++ b/ges/ges-asset.c @@ -1039,3 +1039,20 @@ ges_list_assets (GType filter) return ret; } + +/** + * ges_asset_get_error: + * @self: The asset to retrieve the error from + * + * Returns: (transfer none): The #GError of the asset or %NULL if the asset was + * loaded without issue + * + * Since: 1.8 + */ +GError * +ges_asset_get_error (GESAsset * self) +{ + g_return_val_if_fail (GES_IS_ASSET (self), NULL); + + return self->priv->error; +} diff --git a/ges/ges-asset.h b/ges/ges-asset.h index e4b21899db..337df20c89 100644 --- a/ges/ges-asset.h +++ b/ges/ges-asset.h @@ -95,6 +95,7 @@ GESAsset * ges_asset_request (GType extractable_type, const gchar * ges_asset_get_id (GESAsset* self); GESAsset * ges_asset_request_finish (GAsyncResult *res, GError **error); +GError * ges_asset_get_error (GESAsset * self); GESExtractable * ges_asset_extract (GESAsset * self, GError **error); GList * ges_list_assets (GType filter);