Add plugin loading error code GST_PLUGIN_ERROR_NOT_A_PLUGIN to indicate that failure was expected for this .so. This ...

Original commit message from CVS:
Add plugin loading error code GST_PLUGIN_ERROR_NOT_A_PLUGIN to indicate that
failure was expected for this .so. This is important in --enable-plugin-builddir
builds to prevent non-plugin .so's in the GST_PLUGIN_PATH from causing nasty
error messages (ie libgstcontrol.so).
This commit is contained in:
Andy Wingo 2002-09-20 21:08:01 +00:00
parent ef37b7df6a
commit f0ea6c4b9f
3 changed files with 7 additions and 4 deletions

View file

@ -204,7 +204,7 @@ gst_plugin_load_plugin (GstPlugin *plugin, GError **error)
else {
g_set_error (error,
GST_PLUGIN_ERROR,
GST_PLUGIN_ERROR_MODULE,
GST_PLUGIN_ERROR_NOT_A_PLUGIN,
"Could not find plugin_desc in \"%s\"",
filename);
}

View file

@ -37,7 +37,8 @@ GQuark gst_plugin_error_quark (void);
typedef enum
{
GST_PLUGIN_ERROR_MODULE,
GST_PLUGIN_ERROR_DEPENDENCIES
GST_PLUGIN_ERROR_DEPENDENCIES,
GST_PLUGIN_ERROR_NOT_A_PLUGIN
} GstPluginError;
#define GST_PLUGIN(plugin) ((GstPlugin *) (plugin))

View file

@ -1553,8 +1553,10 @@ gst_xml_registry_rebuild (GstRegistry *registry)
} else {
GST_INFO (GST_CAT_PLUGIN_LOADING, "Plugin %s failed to load: %s",
((GstPlugin *) walk->data)->filename, error->message);
g_print ("Plugin %s failed to load\n",
((GstPlugin *) walk->data)->filename);
if (error->code != GST_PLUGIN_ERROR_NOT_A_PLUGIN)
g_print ("Plugin %s failed to load\n",
((GstPlugin *) walk->data)->filename);
g_free (((GstPlugin *) walk->data)->filename);
g_free (walk->data);