mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-23 10:11:08 +00:00
ges: Keep ges-gerror categories simple.
This commit is contained in:
parent
fa5ed5111d
commit
c84f4ec9fb
5 changed files with 19 additions and 35 deletions
|
@ -24,10 +24,8 @@ GESAssetLoadingReturn
|
|||
<SECTION>
|
||||
<FILE>ges-gerror</FILE>
|
||||
<TITLE>GES GErrors</TITLE>
|
||||
GES_ASSET_ERROR
|
||||
GES_FORMATTER_ERROR
|
||||
GESAssetError
|
||||
GESFormatterError
|
||||
GES_ERROR
|
||||
GESError
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
|
|
|
@ -171,7 +171,7 @@ _check_and_update_parameters (GType * extractable_type, const gchar * id,
|
|||
g_type_name (old_type));
|
||||
|
||||
if (error && *error == NULL)
|
||||
g_set_error (error, GES_ASSET_ERROR, GES_ASSET_WRONG_ID,
|
||||
g_set_error (error, GES_ERROR, GES_ERROR_ASSET_WRONG_ID,
|
||||
"Wrong ID, can not find any extractable_type");
|
||||
return NULL;
|
||||
}
|
||||
|
@ -182,7 +182,7 @@ _check_and_update_parameters (GType * extractable_type, const gchar * id,
|
|||
|
||||
g_free (real_id);
|
||||
if (error && *error == NULL)
|
||||
g_set_error (error, GES_ASSET_ERROR, GES_ASSET_WRONG_ID, "Wrong ID");
|
||||
g_set_error (error, GES_ERROR, GES_ERROR_ASSET_WRONG_ID, "Wrong ID");
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
@ -224,7 +224,7 @@ async_initable_init_async (GAsyncInitable * initable, gint io_priority,
|
|||
case GES_ASSET_LOADING_ERROR:
|
||||
{
|
||||
if (error == NULL)
|
||||
g_set_error (&error, GES_ASSET_ERROR, GES_ASSET_ERROR_LOADING,
|
||||
g_set_error (&error, GES_ERROR, GES_ERROR_ASSET_LOADING,
|
||||
"Could not start loading asset");
|
||||
|
||||
/* FIXME Define error code */
|
||||
|
|
|
@ -688,7 +688,7 @@ ges_base_xml_formatter_add_clip (GESBaseXmlFormatter * self,
|
|||
|
||||
entry = g_hash_table_lookup (priv->layers, GINT_TO_POINTER (layer_prio));
|
||||
if (entry == NULL) {
|
||||
g_set_error (error, GES_FORMATTER_ERROR, GES_FORMATTER_WRONG_INPUT_FILE,
|
||||
g_set_error (error, GES_ERROR, GES_ERROR_FORMATTER_MALFORMED_INPUT_FILE,
|
||||
"We got a Clip in a layer"
|
||||
" that does not exist, something is wrong either in the project file or"
|
||||
" in %s", g_type_name (G_OBJECT_TYPE (self)));
|
||||
|
|
|
@ -28,38 +28,24 @@
|
|||
G_BEGIN_DECLS
|
||||
|
||||
/**
|
||||
* GES_ASSET_ERROR:
|
||||
* GES_ERROR:
|
||||
*
|
||||
* An error happend using an asset
|
||||
* An error happend in GES
|
||||
*/
|
||||
#define GES_ASSET_ERROR g_quark_from_static_string("GES_ASSET_ERROR")
|
||||
#define GES_ERROR g_quark_from_static_string("GES_ERROR")
|
||||
|
||||
/**
|
||||
* GES_FORMATTER_ERROR:
|
||||
*
|
||||
* An error happend using a formatter
|
||||
*/
|
||||
#define GES_FORMATTER_ERROR g_quark_from_static_string("GES_FORMATTER_ERROR")
|
||||
|
||||
/**
|
||||
* GESAssetError:
|
||||
* @GES_ASSET_WRONG_ID: The ID passed is malformed
|
||||
* @GES_ASSET_ERROR_LOADING: An error happened while loading the asset
|
||||
* GESError:
|
||||
* @GES_ERROR_ASSET_WRONG_ID: The ID passed is malformed
|
||||
* @GES_ERROR_ASSET_LOADING: An error happened while loading the asset
|
||||
* @GES_ERROR_FORMATTER_MALFORMED_INPUT_FILE: The formatted files was malformed
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
GES_ASSET_WRONG_ID,
|
||||
GES_ASSET_ERROR_LOADING
|
||||
} GESAssetError;
|
||||
|
||||
/**
|
||||
* GESFormatterError:
|
||||
* @GES_FORMATTER_WRONG_INPUT_FILE: The formatted files was malformed
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
GES_FORMATTER_WRONG_INPUT_FILE,
|
||||
} GESFormatterError;
|
||||
GES_ERROR_ASSET_WRONG_ID,
|
||||
GES_ERROR_ASSET_LOADING,
|
||||
GES_ERROR_FORMATTER_MALFORMED_INPUT_FILE,
|
||||
} GESError;
|
||||
|
||||
G_END_DECLS
|
||||
#endif /* __GES_ERROR_H__ */
|
||||
|
|
|
@ -448,8 +448,8 @@ ges_uri_clip_asset_request_sync (const gchar * uri, GError ** error)
|
|||
if (asset)
|
||||
return asset;
|
||||
|
||||
if (lerror && lerror->domain == GES_ASSET_ERROR &&
|
||||
lerror->code == GES_ASSET_WRONG_ID) {
|
||||
if (lerror && lerror->domain == GES_ERROR &&
|
||||
lerror->code == GES_ERROR_ASSET_WRONG_ID) {
|
||||
g_propagate_error (error, lerror);
|
||||
|
||||
return NULL;
|
||||
|
|
Loading…
Reference in a new issue