Commit 1654b7f1 authored by Tim-Philipp Müller's avatar Tim-Philipp Müller

Use GLib's type for GError instead of our own

We introduced our own when GLib didn't want to add a GType
for GError. But now that there is one, we can use GLib's
unconditionally and remove our version.
parent 58a4d806
......@@ -876,13 +876,11 @@ GST_STREAM_ERROR
GST_ERROR_SYSTEM
gst_error_get_message
<SUBSECTION Standard>
GST_TYPE_G_ERROR
GST_TYPE_CORE_ERROR
GST_TYPE_LIBRARY_ERROR
GST_TYPE_RESOURCE_ERROR
GST_TYPE_STREAM_ERROR
<SUBSECTION Private>
gst_g_error_get_type
gst_core_error_get_type
gst_library_error_get_type
gst_resource_error_get_type
......
......@@ -474,3 +474,8 @@ The 0.11 porting guide
GST_VALUE_HOLDS_DATE(value) -> G_VALUE_HOLDS(value,G_TYPE_DATE)
gst_value_set_date() -> g_value_set_boxed()
gst_value_get_date() -> g_value_get_boxed()
* GError/GstGError
GstGError -> GError
GST_TYPE_G_ERROR / gst_g_error_get_type() -> G_TYPE_ERROR
......@@ -746,8 +746,6 @@ init_post (GOptionContext * context, GOptionGroup * group, gpointer data,
_priv_gst_plugin_initialize ();
gst_g_error_get_type ();
/* register core plugins */
gst_plugin_register_static (GST_VERSION_MAJOR, GST_VERSION_MINOR,
"staticelements", "core elements linked into the GStreamer library",
......
......@@ -122,14 +122,6 @@ GQuark gst_ ## string ## _error_quark (void) { \
quark = g_quark_from_static_string ("gst-" # string "-error-quark"); \
return quark; }
/* FIXME: Deprecate when we depend on GLib 2.26 */
/* FIXME 0.11: remove gst_g_error_get_type() */
GType
gst_g_error_get_type (void)
{
return g_error_get_type ();
}
#define FILE_A_BUG " Please file a bug at " PACKAGE_BUGREPORT "."
static const gchar *
......
......@@ -197,8 +197,6 @@ typedef enum
GST_STREAM_ERROR_NUM_ERRORS
} GstStreamError;
#define GST_TYPE_G_ERROR (gst_g_error_get_type ())
/**
* GST_LIBRARY_ERROR:
*
......@@ -240,11 +238,6 @@ typedef enum
*/
#define GST_ERROR_SYSTEM ("system error: %s", g_strerror (errno))
/* Hide this compatibility type from introspection */
#ifndef __GI_SCANNER__
GType gst_g_error_get_type (void);
#endif
gchar *gst_error_get_message (GQuark domain, gint code);
GQuark gst_stream_error_quark (void);
GQuark gst_core_error_quark (void);
......
......@@ -386,7 +386,7 @@ gst_message_new_error (GstObject * src, GError * error, const gchar * debug)
GstStructure *structure;
structure = gst_structure_new_id (GST_QUARK (MESSAGE_ERROR),
GST_QUARK (GERROR), GST_TYPE_G_ERROR, error,
GST_QUARK (GERROR), G_TYPE_ERROR, error,
GST_QUARK (DEBUG), G_TYPE_STRING, debug, NULL);
message = gst_message_new_custom (GST_MESSAGE_ERROR, src, structure);
......@@ -413,7 +413,7 @@ gst_message_new_warning (GstObject * src, GError * error, const gchar * debug)
GstStructure *structure;
structure = gst_structure_new_id (GST_QUARK (MESSAGE_WARNING),
GST_QUARK (GERROR), GST_TYPE_G_ERROR, error,
GST_QUARK (GERROR), G_TYPE_ERROR, error,
GST_QUARK (DEBUG), G_TYPE_STRING, debug, NULL);
message = gst_message_new_custom (GST_MESSAGE_WARNING, src, structure);
......@@ -442,7 +442,7 @@ gst_message_new_info (GstObject * src, GError * error, const gchar * debug)
GstStructure *structure;
structure = gst_structure_new_id (GST_QUARK (MESSAGE_INFO),
GST_QUARK (GERROR), GST_TYPE_G_ERROR, error,
GST_QUARK (GERROR), G_TYPE_ERROR, error,
GST_QUARK (DEBUG), G_TYPE_STRING, debug, NULL);
message = gst_message_new_custom (GST_MESSAGE_INFO, src, structure);
......@@ -1335,7 +1335,7 @@ gst_message_parse_error (GstMessage * message, GError ** gerror, gchar ** debug)
structure = GST_MESSAGE_STRUCTURE (message);
error_gvalue = gst_structure_id_get_value (structure, GST_QUARK (GERROR));
g_return_if_fail (error_gvalue != NULL);
g_return_if_fail (G_VALUE_TYPE (error_gvalue) == GST_TYPE_G_ERROR);
g_return_if_fail (G_VALUE_TYPE (error_gvalue) == G_TYPE_ERROR);
error_val = (GError *) g_value_get_boxed (error_gvalue);
if (error_val)
......@@ -1375,7 +1375,7 @@ gst_message_parse_warning (GstMessage * message, GError ** gerror,
structure = GST_MESSAGE_STRUCTURE (message);
error_gvalue = gst_structure_id_get_value (structure, GST_QUARK (GERROR));
g_return_if_fail (error_gvalue != NULL);
g_return_if_fail (G_VALUE_TYPE (error_gvalue) == GST_TYPE_G_ERROR);
g_return_if_fail (G_VALUE_TYPE (error_gvalue) == G_TYPE_ERROR);
error_val = (GError *) g_value_get_boxed (error_gvalue);
if (error_val)
......@@ -1416,7 +1416,7 @@ gst_message_parse_info (GstMessage * message, GError ** gerror, gchar ** debug)
structure = GST_MESSAGE_STRUCTURE (message);
error_gvalue = gst_structure_id_get_value (structure, GST_QUARK (GERROR));
g_return_if_fail (error_gvalue != NULL);
g_return_if_fail (G_VALUE_TYPE (error_gvalue) == GST_TYPE_G_ERROR);
g_return_if_fail (G_VALUE_TYPE (error_gvalue) == G_TYPE_ERROR);
error_val = (GError *) g_value_get_boxed (error_gvalue);
if (error_val)
......
......@@ -317,7 +317,7 @@ GST_START_TEST (test_structure_new)
domain = g_quark_from_static_string ("test");
e = g_error_new (domain, 0, "a test error");
s = gst_structure_new ("name", "key", GST_TYPE_G_ERROR, e, NULL);
s = gst_structure_new ("name", "key", G_TYPE_ERROR, e, NULL);
g_error_free (e);
gst_structure_free (s);
......
......@@ -451,7 +451,6 @@ EXPORTS
gst_formats_contains
gst_fraction_get_type
gst_fraction_range_get_type
gst_g_error_get_type
gst_ghost_pad_activate_mode_default
gst_ghost_pad_construct
gst_ghost_pad_get_target
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment