summaryrefslogtreecommitdiffstats
path: root/command.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2012-09-17 08:45:35 +0200
committerwm4 <wm4@nowhere>2012-10-12 10:10:30 +0200
commit10437c35df5d3944625fa6cee05e565b0791fe15 (patch)
tree31dfa05575fdeac18121328ea4ffe9aea3fdafd8 /command.c
parent6f1486b397d632feaa71f88b980491aea7b69256 (diff)
downloadmpv-10437c35df5d3944625fa6cee05e565b0791fe15.tar.bz2
mpv-10437c35df5d3944625fa6cee05e565b0791fe15.tar.xz
commands: rename "osdlevel" option and property, make it a choice
Rename both the option and property to "osd-level", which fits a bit better with the general naming scheme. Make it a choice instead of an integer range. I failed to come up with good names for the various levels, so leave them as-is. Remove the useless property handler for the "loop" property too.
Diffstat (limited to 'command.c')
-rw-r--r--command.c21
1 files changed, 4 insertions, 17 deletions
diff --git a/command.c b/command.c
index cdfeb835bf..a68b8f3228 100644
--- a/command.c
+++ b/command.c
@@ -194,20 +194,6 @@ static int mp_property_generic_option(struct m_option *prop, int action,
return M_PROPERTY_NOT_IMPLEMENTED;
}
-/// OSD level (RW)
-static int mp_property_osdlevel(m_option_t *prop, int action, void *arg,
- MPContext *mpctx)
-{
- return m_property_choice(prop, action, arg, &mpctx->opts.osd_level);
-}
-
-/// Loop (RW)
-static int mp_property_loop(m_option_t *prop, int action, void *arg,
- MPContext *mpctx)
-{
- return mp_property_generic_option(prop, action, arg, mpctx);
-}
-
/// Playback speed (RW)
static int mp_property_playback_speed(m_option_t *prop, int action,
void *arg, MPContext *mpctx)
@@ -1652,9 +1638,9 @@ static int mp_property_tv_color(m_option_t *prop, int action, void *arg,
*/
static const m_option_t mp_properties[] = {
// General
- { "osdlevel", mp_property_osdlevel, CONF_TYPE_INT,
- M_OPT_RANGE, 0, 3, NULL },
- { "loop", mp_property_loop, &m_option_type_choice,
+ { "osd-level", mp_property_generic_option, &m_option_type_choice,
+ 0, 0, 0, "osd-level" },
+ { "loop", mp_property_generic_option, &m_option_type_choice,
0, 0, 0, "loop" },
{ "speed", mp_property_playback_speed, CONF_TYPE_FLOAT,
M_OPT_RANGE, 0.01, 100.0, NULL },
@@ -1816,6 +1802,7 @@ static const struct legacy_prop legacy_props[] = {
{"switch_audio", "audio"},
{"switch_program", "program"},
{"framedropping", "framedrop"},
+ {"osdlevel", "osd-level"},
{0}
};