diff options
author | David Schleef <ds@schleef.org> | 2007-05-13 00:20:35 +0000 |
---|---|---|
committer | David Schleef <ds@schleef.org> | 2007-05-13 00:20:35 +0000 |
commit | 2fead012bef478f59a08e60a72db98484f3c6684 (patch) | |
tree | 54c917d268ee0f4e7ee93af61cf8f9321797b9d2 | |
parent | 0c76828268bc521d1a592d46d8f96c527e56617a (diff) | |
download | gstreamer-2fead012bef478f59a08e60a72db98484f3c6684.tar.gz |
gst/gstplugin.c: gst_plugin_register_func() doesn't actually do anything with the passed "module" parameter, so remov...
Original commit message from CVS:
* gst/gstplugin.c: gst_plugin_register_func() doesn't actually
do anything with the passed "module" parameter, so remove it.
Allows removal of additional vestigal code.
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | gst/gstplugin.c | 15 |
2 files changed, 13 insertions, 8 deletions
@@ -1,5 +1,11 @@ 2007-05-12 David Schleef <ds@schleef.org> + * gst/gstplugin.c: gst_plugin_register_func() doesn't actually + do anything with the passed "module" parameter, so remove it. + Allows removal of additional vestigal code. + +2007-05-12 David Schleef <ds@schleef.org> + * gst/gstplugin.c: Using sigaction should depend on HAVE_SIGACTION, not HAVE_WIN32. Switch to using g_stat() because it's more portable. diff --git a/gst/gstplugin.c b/gst/gstplugin.c index 3d188a339f..10f133db94 100644 --- a/gst/gstplugin.c +++ b/gst/gstplugin.c @@ -74,8 +74,8 @@ #define GST_CAT_DEFAULT GST_CAT_PLUGIN_LOADING -static GModule *main_module = NULL; static GList *_gst_plugin_static = NULL; +static gboolean _gst_plugin_inited; /* static variables for segfault handling of plugin loading */ static char *_gst_plugin_fault_handler_filename = NULL; @@ -107,7 +107,7 @@ static const gchar *valid_licenses[] = { }; static GstPlugin *gst_plugin_register_func (GstPlugin * plugin, - GModule * module, GstPluginDesc * desc); + GstPluginDesc * desc); static void gst_plugin_desc_copy (GstPluginDesc * dest, const GstPluginDesc * src); static void gst_plugin_desc_free (GstPluginDesc * desc); @@ -166,7 +166,7 @@ gst_plugin_error_quark (void) void _gst_plugin_register_static (GstPluginDesc * desc) { - if (main_module == NULL) { + if (!_gst_plugin_inited) { if (GST_CAT_DEFAULT) GST_LOG ("queueing static plugin \"%s\" for loading later on", desc->name); @@ -177,7 +177,7 @@ _gst_plugin_register_static (GstPluginDesc * desc) if (GST_CAT_DEFAULT) GST_LOG ("attempting to load static plugin \"%s\" now...", desc->name); plugin = g_object_new (GST_TYPE_PLUGIN, NULL); - if (gst_plugin_register_func (plugin, main_module, desc)) { + if (gst_plugin_register_func (plugin, desc)) { if (GST_CAT_DEFAULT) GST_INFO ("loaded static plugin \"%s\"", desc->name); gst_default_registry_add_plugin (plugin); @@ -188,7 +188,7 @@ _gst_plugin_register_static (GstPluginDesc * desc) void _gst_plugin_initialize (void) { - main_module = g_module_open (NULL, G_MODULE_BIND_LAZY); + _gst_plugin_inited = TRUE; /* now register all static plugins */ g_list_foreach (_gst_plugin_static, (GFunc) _gst_plugin_register_static, @@ -226,8 +226,7 @@ gst_plugin_check_version (gint major, gint minor) } static GstPlugin * -gst_plugin_register_func (GstPlugin * plugin, GModule * module, - GstPluginDesc * desc) +gst_plugin_register_func (GstPlugin * plugin, GstPluginDesc * desc) { if (!gst_plugin_check_version (desc->major_version, desc->minor_version)) { if (GST_CAT_DEFAULT) @@ -452,7 +451,7 @@ gst_plugin_load_file (const gchar * filename, GError ** error) GST_LOG ("Plugin %p for file \"%s\" prepared, registering...", plugin, filename); - if (!gst_plugin_register_func (plugin, module, plugin->orig_desc)) { + if (!gst_plugin_register_func (plugin, plugin->orig_desc)) { /* remove signal handler */ _gst_plugin_fault_handler_restore (); GST_DEBUG ("gst_plugin_register_func failed for plugin \"%s\"", filename); |