From 6d4b4c0de3152bc2deb2df09ec3e98e032124593 Mon Sep 17 00:00:00 2001 From: wm4 Date: Fri, 12 Jan 2018 04:02:55 +0100 Subject: audio: add global options for resampler defaults This is part of trying to get rid of --af-defaults, and the af resample filter. It requires a complicated mechanism to set the defaults on the resample filter for backwards compatibility. --- options/m_option.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'options/m_option.h') diff --git a/options/m_option.h b/options/m_option.h index a1039e2a82..405b59da0a 100644 --- a/options/m_option.h +++ b/options/m_option.h @@ -32,6 +32,7 @@ typedef struct m_option m_option_t; struct m_config; struct mp_log; struct mpv_node; +struct mpv_global; ///////////////////////////// Options types declarations //////////////////// @@ -129,6 +130,10 @@ struct m_obj_desc { bool hidden; // Callback to print custom help if "help" is passed void (*print_help)(struct mp_log *log); + // Callback that allows you to override the static default values. The + // pointer p points to the struct described by options/priv_size, with + // priv_defaults already applied. You can write to it to set any defaults. + void (*set_defaults)(struct mpv_global *global, void *p); // Set by m_obj_list_find(). If the requested name is an old alias, this // is set to the old name (while the name field uses the new name). const char *replaced_name; -- cgit v1.2.3