From c94e4683956a09de468174ff37951abf7822d5a3 Mon Sep 17 00:00:00 2001 From: Vito Caputo Date: Mon, 29 May 2023 16:10:56 -0700 Subject: til: add til_module_setup_finalize() helper Preparatory commit for til_module_create_context() requiring setups even when there's no til_module_t.setup() method. This helper will produce the minimal til_setup_t in such cases, or hand off the task to til_module_t.setup() when present. Note the need for passing res_setting and res_desc to til_module_t.setup() despite not being a settings-construction scenario. This is because of how modules using nested settings tend to use res_setting for storing the current setting in accessing the nested instance, which must still occur even when just baking the complete setup. It's expected that any composite/meta modules utilizing other modules will use this helper to produce the baked setups, instead of the ad-hoc direct calling of til_module_t.setup() they do presently. --- src/til.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/til.h') diff --git a/src/til.h b/src/til.h index fabee0a..e9c6b82 100644 --- a/src/til.h +++ b/src/til.h @@ -47,6 +47,7 @@ int til_module_create_context(const til_module_t *module, til_stream_t *stream, til_module_context_t * til_module_destroy_context(til_module_context_t *context, til_stream_t *stream); int til_module_setup(const til_settings_t *settings, til_setting_t **res_setting, const til_setting_desc_t **res_desc, til_setup_t **res_setup); int til_module_randomize_setup(const til_module_t *module, unsigned seed, til_setup_t **res_setup, char **res_arg); +int til_module_setup_finalize(const til_module_t *module, const til_settings_t *module_settings, til_setup_t **res_setup); int til_fragmenter_slice_per_cpu(til_module_context_t *context, const til_fb_fragment_t *fragment, unsigned number, til_fb_fragment_t *res_fragment); int til_fragmenter_tile64(til_module_context_t *context, const til_fb_fragment_t *fragment, unsigned number, til_fb_fragment_t *res_fragment); -- cgit v1.2.1