diff options
author | wm4 <wm4@nowhere> | 2018-01-12 04:02:55 +0100 |
---|---|---|
committer | Kevin Mitchell <kevmitch@gmail.com> | 2018-01-13 03:26:45 -0800 |
commit | 6d4b4c0de3152bc2deb2df09ec3e98e032124593 (patch) | |
tree | e257216a98e0a40610dc90e6e526152ea7f63833 /options/m_option.h | |
parent | 23edaf4412e378dabf061b6e852f7314b38b8020 (diff) | |
download | mpv-6d4b4c0de3152bc2deb2df09ec3e98e032124593.tar.bz2 mpv-6d4b4c0de3152bc2deb2df09ec3e98e032124593.tar.xz |
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.
Diffstat (limited to 'options/m_option.h')
-rw-r--r-- | options/m_option.h | 5 |
1 files changed, 5 insertions, 0 deletions
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; |