summaryrefslogtreecommitdiffstats
path: root/m_option.h
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2012-09-05 02:39:12 +0200
committerwm4 <wm4@nowhere>2012-09-18 21:07:30 +0200
commitb94cdc4bafddc50ec5e1a38f9a9b85d069a21817 (patch)
tree0e92a42cea765f1b68b657ffbf3c7bf381aafe3c /m_option.h
parentc955549204c433abd1a3c8783f1b988e29315337 (diff)
downloadmpv-b94cdc4bafddc50ec5e1a38f9a9b85d069a21817.tar.bz2
mpv-b94cdc4bafddc50ec5e1a38f9a9b85d069a21817.tar.xz
options: change --vid, --aid, --sid options
The --vid, --aid, --sid options now accept the values 'off' and 'auto', instead of having the user deal with the numeric values -2 and -1. The numeric values are not allowed anymore. Remove the --audio option. It was probably meant as compensation option for --no-audio. There are no such options for sub/video, and it was not documented, so just remove it. The replacement is "--aid=auto". Also do some updates to the manpage.
Diffstat (limited to 'm_option.h')
-rw-r--r--m_option.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/m_option.h b/m_option.h
index 2b3ab13355..57fdc33610 100644
--- a/m_option.h
+++ b/m_option.h
@@ -471,6 +471,8 @@ static inline void m_option_free(const m_option_t *opt, void *dst)
#define OPT_CHOICE_OR_INT_(optname, varname, flags, minval, maxval, choices, ...) OPT_GENERAL(optname, varname, (flags) | CONF_RANGE, .min = minval, .max = maxval, .priv = (void *)&(const struct m_opt_choice_alternatives[]){OPT_HELPER_REMOVEPAREN choices, {NULL}}, __VA_ARGS__)
#define OPT_TIME(...) OPT_GENERAL(__VA_ARGS__, .type = &m_option_type_time)
+#define OPT_TRACKCHOICE(name, var) OPT_CHOICE_OR_INT(name, var, 0, 0, 8190, ({"off", -2}, {"no", -2}, {"auto", -1}))
+
// subconf must have the type struct m_sub_options.
// flagv should be M_OPT_MERGE or M_OPT_FLATTEN.
// varname refers to the field, that must be a pointer to a field described by