Displaying 2 results from an estimated 2 matches for "filter_plugin_config".
2018 Jan 14
0
[PATCH nbdkit INCOMPLETE 6/6] filters: Implement chain of filters in front of ordinary plugin methods.
...lugin_config (const char *key, const char *value)
{
assert (dl);
@@ -422,21 +422,68 @@ plugin_config (const char *key, const char *value)
exit (EXIT_FAILURE);
}
- if (plugin.config (key, value) == -1)
- exit (EXIT_FAILURE);
+ return plugin.config (key, value);
+}
+
+static int
+filter_plugin_config (void *data, const char *key, const char *value)
+{
+ if (data == NULL)
+ return final_plugin_config (key, value);
+ else {
+ struct filter *f = data;
+
+ debug ("%s: config key=%s, value=%s", f->filename, key, value);
+
+ if (f->filter.config)
+ if (f->filter....
2018 Jan 14
10
[PATCH nbdkit INCOMPLETE 0/6] Introduce filters to nbdkit.
This patch isn't complete (patch 6/6 isn't finished) so it's just for
discussion, although it does compile and run.
This introduces to nbdkit a concept of "filters" which can be placed
in front of plugins to modify their behaviour. Some examples where
you might use filters:
* Serve a subset of the data, such as (offset, range) or a
single partition from a disk image.