mirror of
https://github.com/Rafostar/clapper.git
synced 2025-08-29 23:32:04 +02:00
clapper: enhancers-loader: Support loading extra enhancers
Allow setting an additional dir(s) with "CLAPPER_ENHANCERS_EXTRA_PATH" env. This should allow to add other enhancers without removing default ones. If app/user needs to remove default ones, "CLAPPER_ENHANCERS_PATH" env can be set to empty.
This commit is contained in:
@@ -84,6 +84,7 @@ clapper_enhancers_loader_initialize (void)
|
||||
peas_engine_enable_loader (_engine, "python");
|
||||
peas_engine_enable_loader (_engine, "gjs");
|
||||
|
||||
load_enhancers:
|
||||
dir_paths = g_strsplit (enhancers_path, G_SEARCHPATH_SEPARATOR_S, 0);
|
||||
|
||||
for (i = 0; dir_paths[i]; ++i)
|
||||
@@ -91,6 +92,11 @@ clapper_enhancers_loader_initialize (void)
|
||||
|
||||
g_strfreev (dir_paths);
|
||||
|
||||
/* Support loading additional enhancers from non-default directory */
|
||||
enhancers_path = g_getenv ("CLAPPER_ENHANCERS_EXTRA_PATH");
|
||||
if (enhancers_path && *enhancers_path != '\0')
|
||||
goto load_enhancers;
|
||||
|
||||
if (gst_debug_category_get_threshold (GST_CAT_DEFAULT) >= GST_LEVEL_INFO) {
|
||||
GListModel *list = (GListModel *) _engine;
|
||||
guint n_items = g_list_model_get_n_items (list);
|
||||
|
Reference in New Issue
Block a user