aboutsummaryrefslogtreecommitdiffstats
path: root/src/decoder_plugin.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/decoder_plugin.h')
-rw-r--r--src/decoder_plugin.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/decoder_plugin.h b/src/decoder_plugin.h
index 7034103ba..35a76bb38 100644
--- a/src/decoder_plugin.h
+++ b/src/decoder_plugin.h
@@ -22,6 +22,7 @@
#include <stdbool.h>
#include <stddef.h>
+struct config_param;
struct input_stream;
struct tag;
@@ -39,7 +40,7 @@ struct decoder_plugin {
* have/need one this must return < 0 if there is an error and
* >= 0 otherwise
*/
- bool (*init)(void);
+ bool (*init)(const struct config_param *param);
/**
* optional, set this to NULL if the InputPlugin doesn't have/need one
@@ -81,14 +82,17 @@ struct decoder_plugin {
/**
* Initialize a decoder plugin.
*
+ * @param param a configuration block for this plugin, or NULL if none
+ * is configured
* @return true if the plugin was initialized successfully, false if
* the plugin is not available
*/
static inline bool
-decoder_plugin_init(const struct decoder_plugin *plugin)
+decoder_plugin_init(const struct decoder_plugin *plugin,
+ const struct config_param *param)
{
return plugin->init != NULL
- ? plugin->init()
+ ? plugin->init(param)
: true;
}