mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-22 05:56:31 +00:00
make registry respect order of GST_PLUGIN_PATH; make the installed location go last
Original commit message from CVS: make registry respect order of GST_PLUGIN_PATH; make the installed location go last
This commit is contained in:
parent
31e37fe64c
commit
7ecd2c3772
4 changed files with 32 additions and 18 deletions
|
@ -1,3 +1,12 @@
|
|||
2005-08-25 Thomas Vander Stichele <thomas at apestaart dot org>
|
||||
|
||||
* gst/gst.c: (init_pre), (init_post):
|
||||
register the installed plugin path after the env var
|
||||
* gst/registries/gstlibxmlregistry.c: (gst_xml_registry_save):
|
||||
* gst/registries/gstxmlregistry.c: (gst_xml_registry_save):
|
||||
don't reverse order of paths; conserve the order of GST_PLUGIN_PATH
|
||||
directories, so the tests can prefer uninstalled over installed
|
||||
|
||||
2005-08-25 Thomas Vander Stichele <thomas at apestaart dot org>
|
||||
|
||||
* gst/base/gstbasetransform.h:
|
||||
|
|
25
gst/gst.c
25
gst/gst.c
|
@ -571,6 +571,8 @@ split_and_iterate (const gchar * stringlist, gchar * separator, GFunc iterator,
|
|||
static gboolean
|
||||
init_pre (void)
|
||||
{
|
||||
const gchar *plugin_path;
|
||||
|
||||
g_type_init ();
|
||||
|
||||
if (g_thread_supported ()) {
|
||||
|
@ -619,12 +621,22 @@ init_pre (void)
|
|||
gst_registry_add_path (_global_registry, PLUGINS_BUILDDIR "/gst/types");
|
||||
gst_registry_add_path (_global_registry, PLUGINS_BUILDDIR "/gst/autoplug");
|
||||
gst_registry_add_path (_global_registry, PLUGINS_BUILDDIR "/gst/indexers");
|
||||
#else
|
||||
/* add the main (installed) library path if GST_PLUGIN_PATH_ONLY not set */
|
||||
#endif /* PLUGINS_USE_BUILDDIR */
|
||||
|
||||
plugin_path = g_getenv ("GST_PLUGIN_PATH");
|
||||
#ifndef GST_DISABLE_REGISTRY
|
||||
split_and_iterate (plugin_path, G_SEARCHPATH_SEPARATOR_S, add_path_func,
|
||||
_global_registry);
|
||||
#endif /* GST_DISABLE_REGISTRY */
|
||||
|
||||
|
||||
#ifndef PLUGINS_USE_BUILDDIR
|
||||
/* add the main (installed) library path as the last path
|
||||
* if GST_PLUGIN_PATH_ONLY not set */
|
||||
if (g_getenv ("GST_PLUGIN_PATH_ONLY") == NULL) {
|
||||
gst_registry_add_path (_global_registry, PLUGINS_DIR);
|
||||
}
|
||||
#endif /* PLUGINS_USE_BUILDDIR */
|
||||
#endif
|
||||
|
||||
if (g_getenv ("GST_REGISTRY")) {
|
||||
user_reg = g_strdup (g_getenv ("GST_REGISTRY"));
|
||||
|
@ -686,7 +698,6 @@ static gboolean
|
|||
init_post (void)
|
||||
{
|
||||
GLogLevelFlags llf;
|
||||
const gchar *plugin_path;
|
||||
|
||||
#ifndef GST_DISABLE_TRACE
|
||||
GstTrace *gst_trace;
|
||||
|
@ -711,12 +722,6 @@ init_post (void)
|
|||
gst_uri_handler_get_type ();
|
||||
#endif /* GST_DISABLE_URI */
|
||||
|
||||
plugin_path = g_getenv ("GST_PLUGIN_PATH");
|
||||
#ifndef GST_DISABLE_REGISTRY
|
||||
split_and_iterate (plugin_path, G_SEARCHPATH_SEPARATOR_S, add_path_func,
|
||||
_global_registry);
|
||||
#endif /* GST_DISABLE_REGISTRY */
|
||||
|
||||
/* register core plugins */
|
||||
_gst_plugin_register_static (&plugin_desc);
|
||||
|
||||
|
|
|
@ -1171,18 +1171,18 @@ gst_xml_registry_save (GstRegistry * registry)
|
|||
CLASS (xmlregistry)->save_func (xmlregistry, "<?xml version=\"1.0\"?>\n");
|
||||
CLASS (xmlregistry)->save_func (xmlregistry, "<GST-PluginRegistry>\n");
|
||||
|
||||
walk = g_list_last (gst_registry_get_path_list (GST_REGISTRY (registry)));
|
||||
walk = gst_registry_get_path_list (GST_REGISTRY (registry));
|
||||
|
||||
CLASS (xmlregistry)->save_func (xmlregistry, "<gst-plugin-paths>\n");
|
||||
while (walk) {
|
||||
CLASS (xmlregistry)->save_func (xmlregistry, "<path>");
|
||||
CLASS (xmlregistry)->save_func (xmlregistry, (gchar *) walk->data);
|
||||
CLASS (xmlregistry)->save_func (xmlregistry, "</path>\n");
|
||||
walk = g_list_previous (walk);
|
||||
walk = g_list_next (walk);
|
||||
}
|
||||
CLASS (xmlregistry)->save_func (xmlregistry, "</gst-plugin-paths>\n");
|
||||
|
||||
walk = g_list_last (registry->plugins);
|
||||
walk = registry->plugins;
|
||||
|
||||
while (walk) {
|
||||
GstPlugin *plugin = GST_PLUGIN (walk->data);
|
||||
|
@ -1191,7 +1191,7 @@ gst_xml_registry_save (GstRegistry * registry)
|
|||
gst_xml_registry_save_plugin (xmlregistry, plugin);
|
||||
CLASS (xmlregistry)->save_func (xmlregistry, "</plugin>\n");
|
||||
|
||||
walk = g_list_previous (walk);
|
||||
walk = g_list_next (walk);
|
||||
}
|
||||
CLASS (xmlregistry)->save_func (xmlregistry, "</GST-PluginRegistry>\n");
|
||||
|
||||
|
|
|
@ -1307,18 +1307,18 @@ gst_xml_registry_save (GstRegistry * registry)
|
|||
CLASS (xmlregistry)->save_func (xmlregistry, "<?xml version=\"1.0\"?>\n");
|
||||
CLASS (xmlregistry)->save_func (xmlregistry, "<GST-PluginRegistry>\n");
|
||||
|
||||
walk = g_list_last (gst_registry_get_path_list (GST_REGISTRY (registry)));
|
||||
walk = gst_registry_get_path_list (GST_REGISTRY (registry));
|
||||
|
||||
CLASS (xmlregistry)->save_func (xmlregistry, "<gst-plugin-paths>\n");
|
||||
while (walk) {
|
||||
CLASS (xmlregistry)->save_func (xmlregistry, "<path>");
|
||||
CLASS (xmlregistry)->save_func (xmlregistry, (gchar *) walk->data);
|
||||
CLASS (xmlregistry)->save_func (xmlregistry, "</path>\n");
|
||||
walk = g_list_previous (walk);
|
||||
walk = g_list_next (walk);
|
||||
}
|
||||
CLASS (xmlregistry)->save_func (xmlregistry, "</gst-plugin-paths>\n");
|
||||
|
||||
walk = g_list_last (registry->plugins);
|
||||
walk = registry->plugins;
|
||||
|
||||
while (walk) {
|
||||
GstPlugin *plugin = GST_PLUGIN (walk->data);
|
||||
|
@ -1327,7 +1327,7 @@ gst_xml_registry_save (GstRegistry * registry)
|
|||
gst_xml_registry_save_plugin (xmlregistry, plugin);
|
||||
CLASS (xmlregistry)->save_func (xmlregistry, "</plugin>\n");
|
||||
|
||||
walk = g_list_previous (walk);
|
||||
walk = g_list_next (walk);
|
||||
}
|
||||
CLASS (xmlregistry)->save_func (xmlregistry, "</GST-PluginRegistry>\n");
|
||||
|
||||
|
|
Loading…
Reference in a new issue