+ return _priv_gst_plugin_load_file_for_registry (filename, NULL, error);
+}
+
+static gchar *
+extract_symname (const char *filename)
+{
+ gchar *bname, *name, *symname;
+ const gchar *dot;
+ gsize prefix_len, len;
+ int i;
+
+ bname = g_path_get_basename (filename);
+ for (i = 0; bname[i]; ++i) {
+ if (bname[i] == '-')
+ bname[i] = '_';
+ }
+
+ if (g_str_has_prefix (bname, "libgst"))
+ prefix_len = 6;
+ else if (g_str_has_prefix (bname, "lib"))
+ prefix_len = 3;
+ else if (g_str_has_prefix (bname, "gst"))
+ prefix_len = 3;
+ else
+ prefix_len = 0; /* use whole name (minus suffix) as plugin name */
+
+ dot = g_utf8_strchr (bname, -1, '.');
+ if (dot)
+ len = dot - bname - prefix_len;
+ else
+ len = strlen (bname + prefix_len);
+
+ name = g_strndup (bname + prefix_len, len);
+ g_free (bname);
+
+ symname = g_strconcat ("gst_plugin_", name, "_get_desc", NULL);
+ g_free (name);
+
+ return symname;
+}
+
+/* Note: The return value is (transfer full) although we work with floating
+ * references here. If a new plugin instance is created, it is always sinked
+ * in the registry first and a new reference is returned
+ */
+GstPlugin *
+_priv_gst_plugin_load_file_for_registry (const gchar * filename,
+ GstRegistry * registry, GError ** error)
+{
+ const GstPluginDesc *desc;