command: add better runtime filter toggling method

Basically, see the example in input.rst.

This is better than the "old" vf-toggle method, because it doesn't
require the user to duplicate the filter string in mpv.conf and
input.conf.

Some aspects of this changes are untested, so enjoy your alpha testing.
This commit is contained in:
wm4
2017-03-25 17:07:40 +01:00
parent 29f9e44723
commit 7d424b4ce4
8 changed files with 100 additions and 32 deletions

View File

@@ -146,6 +146,8 @@ struct m_obj_list {
// Allow unknown entries, for which a dummy entry is inserted, and whose
// options are skipped and ignored.
bool allow_unknown_entries;
// Allow syntax for disabling entries.
bool allow_disable_entries;
// This helps with confusing error messages if unknown flag options are used.
bool disallow_positional_parameters;
// Each sub-item is backed by global options (for AOs and VOs).
@@ -162,6 +164,8 @@ typedef struct m_obj_settings {
char *name;
// Optional user-defined name.
char *label;
// User enable flag.
bool enabled;
// NULL terminated array of parameter/value pairs.
char **attribs;
} m_obj_settings_t;