plugin_path = g_getenv("GST_PLUGIN_PATH");
- split_and_iterate (plugin_path, G_SEARCHPATH_SEPARATOR_S, add_path_func, _global_registry);
+ split_and_iterate (plugin_path, G_SEARCHPATH_SEPARATOR_S, add_path_func, _user_registry);
/* register core plugins */
_gst_plugin_register_static (&plugin_desc);
gst_scheduler_factory_set_default_name (arg);
break;
case ARG_REGISTRY:
- gst_registry_option_set (arg);
+ GST_XML_REGISTRY (_global_registry)->location = g_strdup (arg);
break;
default:
g_warning ("option %d not recognized", option->val);
return TRUE;
}
+static void
+plugin_added_func (GstRegistry *registry, GstPlugin *plugin, gpointer user_data)
+{
+ GST_INFO (GST_CAT_PLUGIN_LOADING, "added plugin %s with %d features\n", plugin->name, plugin->numfeatures);
+}
+
static gboolean
gst_xml_registry_open_func (GstXMLRegistry *registry, GstXMLRegistryMode mode)
{
+ gulong handler_id;
GList *paths = GST_REGISTRY (registry)->paths;
if (mode == GST_XML_REGISTRY_READ) {
if (!plugin_times_older_than (paths, get_time (registry->location))) {
GST_INFO (GST_CAT_GST_INIT, "Registry out of date, rebuilding...");
+ handler_id = g_signal_connect (G_OBJECT (registry), "plugin_added",
+ G_CALLBACK (plugin_added_func), NULL);
+
gst_registry_rebuild (GST_REGISTRY (registry));
- gst_registry_save (GST_REGISTRY (registry));
- if (!plugin_times_older_than (paths, get_time (registry->location))) {
- GST_INFO (GST_CAT_GST_INIT, "Registry still out of date, something is wrong...");
- return FALSE;
+ g_signal_handler_disconnect (registry, handler_id);
+
+ if (GST_REGISTRY (registry)->flags & GST_REGISTRY_WRITABLE) {
+ gst_registry_save (GST_REGISTRY (registry));
+ if (!plugin_times_older_than (paths, get_time (registry->location))) {
+ GST_INFO (GST_CAT_GST_INIT, "Registry still out of date, something is wrong...");
+ return FALSE;
+ }
}
}
while ((dirent = g_dir_read_name (dir))) {
gchar *dirname;
+ if (*dirent == '=') {
+ /* =build, =inst, etc. -- automake distcheck directories */
+ continue;
+ }
+
dirname = g_strjoin ("/", directory, dirent, NULL);
gst_xml_registry_rebuild_recurse (registry, dirname);
g_free(dirname);
while (walk) {
gchar *path = (gchar *) walk->data;
+ GST_INFO (GST_CAT_PLUGIN_LOADING, "Rebuilding registry %p in directory %s...", registry, path);
+
gst_xml_registry_rebuild_recurse (xmlregistry, path);
walk = g_list_next (walk);