diff options
author | Vito Caputo <vcaputo@pengaru.com> | 2023-06-03 14:51:39 -0700 |
---|---|---|
committer | Vito Caputo <vcaputo@pengaru.com> | 2023-06-03 14:51:39 -0700 |
commit | 09c67051ff526fd25e6929c90fcaa0ce8cfb6079 (patch) | |
tree | 2856db32c0cdb1a4da0da010ad3fc1119b6d52a4 /src/til.h | |
parent | e0cbb8f476b220ef80de9bbe8159435c78d4e921 (diff) |
til,modules/rtv: supply settings to til_module_setup_randomize()
Rather than creating an orphaned settings instance private to
til_module_setup_randomize(), the function now requires the
settings instance be provided.
The one remaining caller of this function is modules::rtv. Now
that rtv is responsible for creating the settings beforehand, and
the settings may be created with a path prefix, rtv gets its
til_module_context_t->setup.path prefixed for all the channel
settings.
Another improvement is now the channel settings instance gets
created from the module name as the settings string. So while
it's not yet possible to sparsely specify settings with others
being randomized, at least now when log_channels=on is in effect,
the printed args include the top-level channel module.
Having proper complete paths for the rtv channel modules is
especially visible in --print-paths output FYI.
An interesting test for exercising all this is:
```
$ src/rototiller --module=rtv,duration=0,context_duration=0,snow_module=none,channels=all,log_channels=on --print-pipes --defaults --go 2>/tmp/channels
in another terminal:
$ tail -F /tmp/channels
```
watch the chaos unfold
Diffstat (limited to 'src/til.h')
-rw-r--r-- | src/til.h | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -47,7 +47,7 @@ void til_module_render(til_module_context_t *context, til_stream_t *stream, unsi int til_module_create_context(const til_module_t *module, til_stream_t *stream, unsigned seed, unsigned ticks, unsigned n_cpus, til_setup_t *setup, til_module_context_t **res_context); 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_setup_randomize(const til_module_t *module, unsigned seed, til_setup_t **res_setup, char **res_arg); +int til_module_setup_randomize(const til_module_t *module, til_settings_t *settings, 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); |