2006-05-19 19:24:35 +00:00
|
|
|
#include <glib/gerror.h>
|
|
|
|
#include <gst/gstmessage.h>
|
2006-08-11 20:53:33 +00:00
|
|
|
#include <glib/gquark.h>
|
2006-05-19 19:24:35 +00:00
|
|
|
|
2006-05-20 22:35:40 +00:00
|
|
|
gchar *
|
2009-04-07 09:27:20 +00:00
|
|
|
gstsharp_message_parse_error (GstMessage * message)
|
2006-05-19 19:24:35 +00:00
|
|
|
{
|
2009-04-07 09:27:20 +00:00
|
|
|
GError *gerror;
|
|
|
|
gchar *error;
|
2006-05-19 19:24:35 +00:00
|
|
|
|
2009-04-07 09:27:20 +00:00
|
|
|
gst_message_parse_error (message, &gerror, NULL);
|
2006-05-19 19:24:35 +00:00
|
|
|
|
2009-04-07 09:27:20 +00:00
|
|
|
error = g_strdup (gerror->message);
|
|
|
|
g_error_free (gerror);
|
|
|
|
|
|
|
|
return error;
|
2006-05-19 19:24:35 +00:00
|
|
|
}
|
2006-08-11 20:53:33 +00:00
|
|
|
|
|
|
|
GError *
|
2009-04-07 09:27:20 +00:00
|
|
|
gstsharp_message_error_new ()
|
2006-08-11 20:53:33 +00:00
|
|
|
{
|
2009-04-07 09:27:20 +00:00
|
|
|
GQuark domain = g_quark_from_string ("test");
|
|
|
|
return g_error_new (domain, 10, "test error");
|
2006-08-11 20:53:33 +00:00
|
|
|
}
|