summaryrefslogtreecommitdiffstats
path: root/options/m_option.h
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2018-01-31 06:50:21 +0100
committerKevin Mitchell <kevmitch@gmail.com>2018-02-03 05:00:52 -0800
commitafb167cfd2521198539fbd23d772a252554221f0 (patch)
treedbd95c0f370734d94da5db9888b7e74ddd600431 /options/m_option.h
parent174261450589d8a6ff21426c1cfc3f2508620583 (diff)
downloadmpv-afb167cfd2521198539fbd23d772a252554221f0.tar.bz2
mpv-afb167cfd2521198539fbd23d772a252554221f0.tar.xz
options: slightly improve filter help output for lavfi bridge
--vf=help will now list libavfilter filters, and e.g. --vf=yadif=help will list libavfilter filter options. The latter is rather bare, because the AVOption API is really awful (holy shit how is it so bad), and would require us to handle _every_ option type manually. Alternatively we could call av_opt_show2(), which ffmpeg uses for help output in its CLI tools and which is much more detailed. But it's rather foreign and forces output through av_log(), so I don't really want to use it.
Diffstat (limited to 'options/m_option.h')
-rw-r--r--options/m_option.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/options/m_option.h b/options/m_option.h
index f47dac294e..af082a893d 100644
--- a/options/m_option.h
+++ b/options/m_option.h
@@ -129,7 +129,7 @@ struct m_obj_desc {
const char *init_options;
// Don't list entry with "help"
bool hidden;
- // Callback to print custom help if "help" is passed
+ // Callback to print custom help if "vf=entry=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
@@ -159,6 +159,10 @@ struct m_obj_list {
bool disallow_positional_parameters;
// Each sub-item is backed by global options (for AOs and VOs).
bool use_global_options;
+ // Callback to print additional custom help if "vf=help" is passed
+ void (*print_help_list)(struct mp_log *log);
+ // Callback to print help for _unknown_ entries with "vf=entry=help"
+ void (*print_unknown_entry_help)(struct mp_log *log, const char *name);
};
// Find entry by name