From 90f0d4f6fa74111f38c9aedf31ecb740bc0ddf97 Mon Sep 17 00:00:00 2001 From: Matthias Vogelgesang Date: Wed, 19 Sep 2012 16:05:46 +0200 Subject: Add path from UCA_CAMERA_PATH environment variable --- src/uca-plugin-manager.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/uca-plugin-manager.c') diff --git a/src/uca-plugin-manager.c b/src/uca-plugin-manager.c index bb27215..61e43f8 100644 --- a/src/uca-plugin-manager.c +++ b/src/uca-plugin-manager.c @@ -8,6 +8,9 @@ * instantiated with uca_plugin_manager_get_filter() with a one-to-one mapping * between filter name xyz and module name libfilterxyz.so. Any errors are * reported as one of #UcaPluginManagerError codes. + * + * By default, any path listed in the %UCA_CAMERA_PATH environment variable is + * added to the search path. */ #include #include "uca-plugin-manager.h" @@ -251,10 +254,16 @@ static void uca_plugin_manager_init (UcaPluginManager *manager) { UcaPluginManagerPrivate *priv; + const gchar *uca_camera_path; manager->priv = priv = UCA_PLUGIN_MANAGER_GET_PRIVATE (manager); priv->search_paths = NULL; + uca_camera_path = g_getenv ("UCA_CAMERA_PATH"); + + if (uca_camera_path != NULL) + uca_plugin_manager_add_path (manager, uca_camera_path); + uca_plugin_manager_add_path (manager, "/usr/lib/uca"); uca_plugin_manager_add_path (manager, "/usr/lib64/uca"); uca_plugin_manager_add_path (manager, "/usr/local/lib/uca"); -- cgit v1.2.3