- gchar **t = NULL;
-
- t = g_new0 (gchar *, GST_RESOURCE_ERROR_NUM_ERRORS);
-
- TABLE (t, RESOURCE, FAILED,
- N_("GStreamer encountered a general resource error."));
- TABLE (t, RESOURCE, TOO_LAZY,
- N_("GStreamer developers were too lazy to assign an error code "
- "to this error." FILE_A_BUG));
- TABLE (t, RESOURCE, NOT_FOUND, N_("Resource not found."));
- TABLE (t, RESOURCE, BUSY, N_("Resource busy or not available."));
- TABLE (t, RESOURCE, OPEN_READ, N_("Could not open resource for reading."));
- TABLE (t, RESOURCE, OPEN_WRITE, N_("Could not open resource for writing."));
- TABLE (t, RESOURCE, OPEN_READ_WRITE,
- N_("Could not open resource for reading and writing."));
- TABLE (t, RESOURCE, CLOSE, N_("Could not close resource."));
- TABLE (t, RESOURCE, READ, N_("Could not read from resource."));
- TABLE (t, RESOURCE, WRITE, N_("Could not write to resource."));
- TABLE (t, RESOURCE, SEEK, N_("Could not perform seek on resource."));
- TABLE (t, RESOURCE, SYNC, N_("Could not synchronize on resource."));
- TABLE (t, RESOURCE, SETTINGS,
- N_("Could not get/set settings from/on resource."));
- TABLE (t, RESOURCE, NO_SPACE_LEFT, N_("No space left on the resource."));
-
- return t;
+ switch (code) {
+ case GST_RESOURCE_ERROR_FAILED:
+ return _("GStreamer encountered a general resource error.");
+ case GST_RESOURCE_ERROR_TOO_LAZY:
+ return _("GStreamer developers were too lazy to assign an error code "
+ "to this error." FILE_A_BUG);
+ case GST_RESOURCE_ERROR_NOT_FOUND:
+ return _("Resource not found.");
+ case GST_RESOURCE_ERROR_BUSY:
+ return _("Resource busy or not available.");
+ case GST_RESOURCE_ERROR_OPEN_READ:
+ return _("Could not open resource for reading.");
+ case GST_RESOURCE_ERROR_OPEN_WRITE:
+ return _("Could not open resource for writing.");
+ case GST_RESOURCE_ERROR_OPEN_READ_WRITE:
+ return _("Could not open resource for reading and writing.");
+ case GST_RESOURCE_ERROR_CLOSE:
+ return _("Could not close resource.");
+ case GST_RESOURCE_ERROR_READ:
+ return _("Could not read from resource.");
+ case GST_RESOURCE_ERROR_WRITE:
+ return _("Could not write to resource.");
+ case GST_RESOURCE_ERROR_SEEK:
+ return _("Could not perform seek on resource.");
+ case GST_RESOURCE_ERROR_SYNC:
+ return _("Could not synchronize on resource.");
+ case GST_RESOURCE_ERROR_SETTINGS:
+ return _("Could not get/set settings from/on resource.");
+ case GST_RESOURCE_ERROR_NO_SPACE_LEFT:
+ return _("No space left on the resource.");
+ case GST_RESOURCE_ERROR_NOT_AUTHORIZED:
+ return _("Not authorized to access resource.");
+ case GST_RESOURCE_ERROR_NUM_ERRORS:
+ default:
+ break;
+ }
+ return NULL;