* 2000 Wim Taymans <wtay@chello.be>
*
* gstregistry.c: handle registry
- *
+ *
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
(GInstanceInitFunc) gst_registry_init,
NULL
};
+
registry_type = g_type_register_static (G_TYPE_OBJECT, "GstRegistry",
®istry_info, G_TYPE_FLAG_ABSTRACT);
}
/**
* gst_registry_add_path:
* @registry: the registry to add the path to
- * @path: the path to add to the registry
+ * @path: the path to add to the registry
*
* Add the given path to the registry. The syntax of the
* path is specific to the registry. If the path has already been
* @registry: the registry to add the plugin to
* @plugin: the plugin to add
*
- * Add the plugin to the registry. The plugin-added signal
- * will be emitted.
+ * Add the plugin to the registry. The plugin-added signal will be emitted.
*
* Returns: TRUE on success.
*/
plugin->manager = registry;
registry->plugins = g_list_prepend (registry->plugins, plugin);
+ GST_DEBUG ("emitting plugin-added for filename %s", plugin->filename);
g_signal_emit (G_OBJECT (registry), gst_registry_signals[PLUGIN_ADDED], 0,
plugin);
* @user_data: user data passed to the filter function
*
* Runs a filter against all plugins in the registry and returns a GList with
- * the results. If the first flag is set, only the first match is
+ * the results. If the first flag is set, only the first match is
* returned (as a list with a single object).
*
* Returns: a GList of plugins, g_list_free after use.
* @first: only return first match
* @user_data: user data passed to the filter function
*
- * Runs a filter against all features of the plugins in the registry
- * and returns a GList with the results.
- * If the first flag is set, only the first match is
+ * Runs a filter against all features of the plugins in the registry
+ * and returns a GList with the results.
+ * If the first flag is set, only the first match is
* returned (as a list with a single object).
*
* Returns: a GList of plugin features, g_list_free after use.
*
* Find the pluginfeature with the given name and type in the registry.
*
- * Returns: The pluginfeature with the given name and type or NULL
+ * Returns: The pluginfeature with the given name and type or NULL
* if the plugin was not found.
*/
GstPluginFeature *
*
* Bring the plugin from the registry into memory.
*
- * Returns: a value indicating the result
+ * Returns: a value indicating the result
*/
GstRegistryReturn
gst_registry_load_plugin (GstRegistry * registry, GstPlugin * plugin)
*
* Unload the plugin from the given registry.
*
- * Returns: a value indicating the result
+ * Returns: a value indicating the result
*/
GstRegistryReturn
gst_registry_unload_plugin (GstRegistry * registry, GstPlugin * plugin)
*
* Update the plugin in the given registry.
*
- * Returns: a value indicating the result
+ * Returns: a value indicating the result
*/
GstRegistryReturn
gst_registry_update_plugin (GstRegistry * registry, GstPlugin * plugin)
gst_registry = GST_REGISTRY (registry);
paths = gst_registry->paths;
+ GST_CAT_DEBUG (GST_CAT_GST_INIT, "opening registry %s", registry->location);
g_return_val_if_fail (registry->open == FALSE, FALSE);
return FALSE;
}
} else {
- GST_CAT_INFO (GST_CAT_PLUGIN_LOADING,
+ GST_CAT_INFO (GST_CAT_GST_INIT,
"Can't write to this registry and it's out of date, ignoring it");
return FALSE;
}
}
+ GST_CAT_DEBUG (GST_CAT_GST_INIT, "opening registry %s for reading",
+ registry->location);
registry->regfile = fopen (registry->location, "r");
} else if (mode == GST_XML_REGISTRY_WRITE) {
g_return_val_if_fail (gst_registry->flags & GST_REGISTRY_WRITABLE, FALSE);
+ GST_CAT_DEBUG (GST_CAT_GST_INIT, "opening registry %s for writing",
+ registry->location);
registry->regfile = fopen (registry->location, "w");
}
static gboolean
gst_xml_registry_close_func (GstXMLRegistry * registry)
{
+ GST_CAT_DEBUG (GST_CAT_GST_INIT, "closing registry %s", registry->location);
fclose (registry->regfile);
registry->open = FALSE;