From 4fa6bcbb902d500ca0a1b9d2feeab5a4e5a98345 Mon Sep 17 00:00:00 2001 From: wm4 Date: Fri, 2 Sep 2016 14:49:34 +0200 Subject: m_config: add helper function for initializing af/ao/vf/vo suboptions Normally I'd prefer a bunch of smaller functions with fewer parameters over a single function with a lot of parameters. But future changes will require messing with the parameters in a slightly more complex way, so a combined function will be needed anyway. The now-unused "global" parameter is required for later as well. --- options/m_config.h | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'options/m_config.h') diff --git a/options/m_config.h b/options/m_config.h index 4ac673859f..c8225706ee 100644 --- a/options/m_config.h +++ b/options/m_config.h @@ -106,12 +106,9 @@ struct m_config *m_config_from_obj_desc_noalloc(void *talloc_ctx, struct mp_log *log, struct m_obj_desc *desc); -int m_config_set_obj_params(struct m_config *conf, char **args); - -// Search for the object with the given name in the defaults list, and apply -// its parameters. -int m_config_apply_defaults(struct m_config *config, const char *name, - struct m_obj_settings *defaults); +struct m_config *m_config_from_obj_desc_and_args(void *ta_parent, + struct mp_log *log, struct mpv_global *global, struct m_obj_desc *desc, + const char *name, struct m_obj_settings *defaults, char **args); // Make sure the option is backed up. If it's already backed up, do nothing. // All backed up options can be restored with m_config_restore_backups(). -- cgit v1.2.3