summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Vogelgesang <matthias.vogelgesang@gmail.com>2012-09-19 16:05:46 +0200
committerMatthias Vogelgesang <matthias.vogelgesang@gmail.com>2012-09-19 16:05:46 +0200
commit90f0d4f6fa74111f38c9aedf31ecb740bc0ddf97 (patch)
tree07efbccb7f5c7db75044d9c912b90b8a4e689ca2
parentaf00a17308fd17ea454021649a36f2f397a6da2b (diff)
downloadlibuca-90f0d4f6fa74111f38c9aedf31ecb740bc0ddf97.tar.gz
libuca-90f0d4f6fa74111f38c9aedf31ecb740bc0ddf97.tar.bz2
libuca-90f0d4f6fa74111f38c9aedf31ecb740bc0ddf97.tar.xz
libuca-90f0d4f6fa74111f38c9aedf31ecb740bc0ddf97.zip
Add path from UCA_CAMERA_PATH environment variable
-rw-r--r--src/uca-plugin-manager.c9
1 files changed, 9 insertions, 0 deletions
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 <gmodule.h>
#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");