add A GST_PLUGIN_PATH_ONLY env var; if it is set, it will only scan the GST_PLUGIN_PATH locations, and not add system...

Original commit message from CVS:

* check/Makefile.am:
* gst/gst.c: (add_path_func), (init_pre):
* gst/gstregistry.c: (gst_registry_add_path):
add A GST_PLUGIN_PATH_ONLY env var; if it is set, it will
only scan the GST_PLUGIN_PATH locations, and not add
system locations
This commit is contained in:
Thomas Vander Stichele 2005-06-29 12:25:05 +00:00
parent bd728f0b2c
commit a30e9069d1
5 changed files with 25 additions and 5 deletions

View file

@ -1,3 +1,12 @@
2005-06-29 Thomas Vander Stichele <thomas at apestaart dot org>
* check/Makefile.am:
* gst/gst.c: (add_path_func), (init_pre):
* gst/gstregistry.c: (gst_registry_add_path):
add A GST_PLUGIN_PATH_ONLY env var; if it is set, it will
only scan the GST_PLUGIN_PATH locations, and not add
system locations
2005-06-29 Thomas Vander Stichele <thomas at apestaart dot org>
* docs/gst/gstreamer-sections.txt:

View file

@ -1,5 +1,6 @@
TESTS_ENVIRONMENT=\
GST_PLUGIN_PATH=$(top_builddir)/gst:$(top_builddir)/check \
GST_PLUGIN_PATH_ONLY=yes \
GST_PLUGIN_PATH=$(top_builddir)/gst \
GST_REGISTRY=$(top_builddir)/check/test-registry.xml
plugindir = $(libdir)/gstreamer-@GST_MAJORMINOR@

View file

@ -388,7 +388,6 @@ add_path_func (gpointer data, gpointer user_data)
{
GstRegistry *registry = GST_REGISTRY (user_data);
GST_INFO ("Adding plugin path: \"%s\"", (gchar *) data);
gst_registry_add_path (registry, (gchar *) data);
}
#endif
@ -504,8 +503,10 @@ init_pre (void)
PLUGINS_BUILDDIR "/gst/schedulers");
gst_registry_add_path (_global_registry, PLUGINS_BUILDDIR "/gst/indexers");
#else
/* add the main (installed) library path */
gst_registry_add_path (_global_registry, PLUGINS_DIR);
/* add the main (installed) library 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 */
if (g_getenv ("GST_REGISTRY")) {

View file

@ -41,6 +41,8 @@
#include "gstmarshal.h"
#include "gstfilter.h"
#define GST_CAT_DEFAULT GST_CAT_GST_INIT
/* Element signals and args */
enum
{
@ -227,11 +229,17 @@ gst_registry_add_path (GstRegistry * registry, const gchar * path)
g_return_if_fail (GST_IS_REGISTRY (registry));
g_return_if_fail (path != NULL);
if (strlen (path) == 0) {
GST_INFO ("Ignoring empty plugin path");
return;
}
if (g_list_find_custom (registry->paths, path, (GCompareFunc) strcmp)) {
g_warning ("path %s already added to registry", path);
return;
}
GST_INFO ("Adding plugin path: \"%s\"", path);
registry->paths = g_list_append (registry->paths, g_strdup (path));
}

View file

@ -1,5 +1,6 @@
TESTS_ENVIRONMENT=\
GST_PLUGIN_PATH=$(top_builddir)/gst:$(top_builddir)/check \
GST_PLUGIN_PATH_ONLY=yes \
GST_PLUGIN_PATH=$(top_builddir)/gst \
GST_REGISTRY=$(top_builddir)/check/test-registry.xml
plugindir = $(libdir)/gstreamer-@GST_MAJORMINOR@