summaryrefslogtreecommitdiff
path: root/plugins/indexers/gstmemindex.c
diff options
context:
space:
mode:
authorDavid Schleef <ds@schleef.org>2005-09-18 06:59:25 +0000
committerDavid Schleef <ds@schleef.org>2005-09-18 06:59:25 +0000
commitcb798ac570e4a4f86001d5d26af550eb09f4c329 (patch)
treea8391cb1600dcf4deeb6ce811ff16cd1757612ea /plugins/indexers/gstmemindex.c
parent687441277937689ccb2bbcd7520428b62754a5ea (diff)
check/Makefile.am: Fix environment variables.
Original commit message from CVS: * check/Makefile.am: Fix environment variables. * check/gst/gstplugin.c: Fix for API changes. * tools/gst-inspect.c: Fix for API changes. * tools/gst-xmlinspect.c: Fix for API changes. * gst/gstelementfactory.c: * gst/gstplugin.c: * gst/gstplugin.h: * gst/gstpluginfeature.c: * gst/gstpluginfeature.h: * gst/gstregistry.c: * gst/gstregistry.h: * gst/gstregistryxml.c: * gst/gsttypefind.c: * gst/gsttypefindfactory.c: * gst/indexers/gstfileindex.c: * gst/indexers/gstmemindex.c: * gst/schedulers/Makefile.am: Change registry to keep track of both plugins and features, removing the feature tracking from plugins themselves.
Diffstat (limited to 'plugins/indexers/gstmemindex.c')
-rw-r--r--plugins/indexers/gstmemindex.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/plugins/indexers/gstmemindex.c b/plugins/indexers/gstmemindex.c
index c3ef4c240..8c752643e 100644
--- a/plugins/indexers/gstmemindex.c
+++ b/plugins/indexers/gstmemindex.c
@@ -411,10 +411,16 @@ gst_mem_index_plugin_init (GstPlugin * plugin)
factory = gst_index_factory_new ("memindex",
"A index that stores entries in memory", gst_mem_index_get_type ());
- if (factory != NULL) {
- gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (factory));
- } else {
- g_warning ("could not register memindex");
+ if (factory == NULL) {
+ g_warning ("failed to create memindex factory");
+ return FALSE;
}
+
+ GST_PLUGIN_FEATURE (factory)->plugin_name = g_strdup (plugin->desc.name);
+ GST_PLUGIN_FEATURE (factory)->loaded = TRUE;
+
+ gst_registry_add_feature (gst_registry_get_default (),
+ GST_PLUGIN_FEATURE (factory));
+
return TRUE;
}