summaryrefslogtreecommitdiffstats
path: root/options
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2017-12-20 05:50:42 +0100
committerMartin Herkt <lachs0r@srsfckn.biz>2017-12-21 19:51:30 +0100
commit29647880551c7b15944d6299a2cd5d502a4efb88 (patch)
tree8fa5e3ba96f251788fdee2860540255ce818c387 /options
parent688768b9bda24a06efac4349ad25e8fac09c35e5 (diff)
downloadmpv-29647880551c7b15944d6299a2cd5d502a4efb88.tar.bz2
mpv-29647880551c7b15944d6299a2cd5d502a4efb88.tar.xz
options: deprecate --ff- options and properties
Some old crap which nobody needs and which probably nobody uses. This relies on a GCC extension: using "## __VA_ARGS__" to remove the comma from the argument list if the va args are empty. It's supported by clang, and there's some chance newer standards will introduce a proper way to do this. (Even if it breaks somewhere, it will be a problem only for 1 release, since I want to drop the deprecated properties immediately.)
Diffstat (limited to 'options')
-rw-r--r--options/m_option.h5
-rw-r--r--options/options.c9
2 files changed, 9 insertions, 5 deletions
diff --git a/options/m_option.h b/options/m_option.h
index 104fd9519c..d61fde963d 100644
--- a/options/m_option.h
+++ b/options/m_option.h
@@ -670,8 +670,9 @@ extern const char m_option_path_separator;
#define OPT_SIZE_BOX(...) \
OPT_GENERAL(struct m_geometry, __VA_ARGS__, .type = &m_option_type_size_box)
-#define OPT_TRACKCHOICE(name, var) \
- OPT_CHOICE_OR_INT(name, var, 0, 0, 8190, ({"no", -2}, {"auto", -1}))
+#define OPT_TRACKCHOICE(name, var, ...) \
+ OPT_CHOICE_OR_INT(name, var, 0, 0, 8190, ({"no", -2}, {"auto", -1}), \
+ ## __VA_ARGS__)
#define OPT_ASPECT(...) \
OPT_GENERAL(float, __VA_ARGS__, .type = &m_option_type_aspect)
diff --git a/options/options.c b/options/options.c
index 63cd93c53f..af55529260 100644
--- a/options/options.c
+++ b/options/options.c
@@ -323,9 +323,12 @@ const m_option_t mp_opts[] = {
OPT_TRACKCHOICE("vid", stream_id[0][STREAM_VIDEO]),
OPT_TRACKCHOICE("sid", stream_id[0][STREAM_SUB]),
OPT_TRACKCHOICE("secondary-sid", stream_id[1][STREAM_SUB]),
- OPT_TRACKCHOICE("ff-aid", stream_id_ff[STREAM_AUDIO]),
- OPT_TRACKCHOICE("ff-vid", stream_id_ff[STREAM_VIDEO]),
- OPT_TRACKCHOICE("ff-sid", stream_id_ff[STREAM_SUB]),
+ OPT_TRACKCHOICE("ff-aid", stream_id_ff[STREAM_AUDIO],
+ .deprecation_message = "no replacement"),
+ OPT_TRACKCHOICE("ff-vid", stream_id_ff[STREAM_VIDEO],
+ .deprecation_message = "no replacement"),
+ OPT_TRACKCHOICE("ff-sid", stream_id_ff[STREAM_SUB],
+ .deprecation_message = "no replacement"),
OPT_ALIAS("sub", "sid"),
OPT_ALIAS("video", "vid"),
OPT_ALIAS("audio", "aid"),