diff options
author | wm4 <wm4@nowhere> | 2012-09-17 08:38:19 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2012-10-12 10:10:30 +0200 |
commit | 6f1486b397d632feaa71f88b980491aea7b69256 (patch) | |
tree | cb85ed961be7bd6037a0ae402921516f93ad1808 /command.c | |
parent | a59eee489318d406497eb5fb8a95d7e23d5eee1f (diff) | |
download | mpv-6f1486b397d632feaa71f88b980491aea7b69256.tar.bz2 mpv-6f1486b397d632feaa71f88b980491aea7b69256.tar.xz |
commands: replace --hardframedrop, change framedropping property
Replace --hardframedrop with --framedrop=hard. Rename the framedrop
property from "framedropping" to "framedrop" for the sake of making
command line options have the same name as their corresponding
property. Change the property to accept choice values instead of
numeric values.
Remove unused/forgotten auto_quality variable.
Diffstat (limited to 'command.c')
-rw-r--r-- | command.c | 24 |
1 files changed, 6 insertions, 18 deletions
@@ -1280,26 +1280,13 @@ static int mp_property_border(m_option_t *prop, int action, void *arg, &vo_border, mpctx); } -/// Framedropping state (RW) -static int mp_property_framedropping(m_option_t *prop, int action, +static int mp_property_framedrop(m_option_t *prop, int action, void *arg, MPContext *mpctx) { - if (!mpctx->sh_video) return M_PROPERTY_UNAVAILABLE; - switch (action) { - case M_PROPERTY_PRINT: - if (!arg) - return M_PROPERTY_ERROR; - *(char **) arg = talloc_strdup(NULL, frame_dropping == 1 ? - mp_gtext("enabled") : - (frame_dropping == 2 ? mp_gtext("hard") : - mp_gtext("disabled"))); - return M_PROPERTY_OK; - default: - return m_property_choice(prop, action, arg, &frame_dropping); - } + return mp_property_generic_option(prop, action, arg, mpctx); } /// Color settings, try to use vf/vo then fall back on TV. (RW) @@ -1752,8 +1739,8 @@ static const m_option_t mp_properties[] = { M_OPT_RANGE, 0, 1, NULL }, { "border", mp_property_border, CONF_TYPE_FLAG, M_OPT_RANGE, 0, 1, NULL }, - { "framedropping", mp_property_framedropping, CONF_TYPE_INT, - M_OPT_RANGE, 0, 2, NULL }, + { "framedrop", mp_property_framedrop, &m_option_type_choice, + 0, 0, 0, "framedrop" }, { "gamma", mp_property_gamma, CONF_TYPE_INT, M_OPT_RANGE, -100, 100, .offset = offsetof(struct MPOpts, vo_gamma_gamma)}, { "brightness", mp_property_gamma, CONF_TYPE_INT, @@ -1828,6 +1815,7 @@ static const struct legacy_prop legacy_props[] = { {"switch_video", "video"}, {"switch_audio", "audio"}, {"switch_program", "program"}, + {"framedropping", "framedrop"}, {0} }; @@ -1916,7 +1904,7 @@ static struct property_osd_display { { "ontop", _("Stay on top: %s") }, { "rootwin", _("Rootwin: %s") }, { "border", _("Border: %s") }, - { "framedropping", _("Framedropping: %s") }, + { "framedrop", _("Framedrop: %s") }, { "deinterlace", _("Deinterlace: %s") }, { "colormatrix", _("YUV colormatrix: %s") }, { "colormatrix-input-range", _("YUV input range: %s") }, |