diff options
author | albeu <albeu@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2007-05-31 09:42:14 +0000 |
---|---|---|
committer | albeu <albeu@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2007-05-31 09:42:14 +0000 |
commit | f24d313473419253b38b732c35dc5249b1cd9c64 (patch) | |
tree | 173550e4181ef9e901bc2e430351125cdee86412 | |
parent | 17ac1fe1ce0c6fb63a06c0911c103d0236a8c44c (diff) |
Allow setting the direction in the step_property command.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23430 b3059339-0415-0410-9bf9-f77b7e298cf2
-rw-r--r-- | DOCS/tech/slave.txt | 6 | ||||
-rw-r--r-- | command.c | 3 | ||||
-rw-r--r-- | input/input.c | 2 |
3 files changed, 7 insertions, 4 deletions
diff --git a/DOCS/tech/slave.txt b/DOCS/tech/slave.txt index 1ca4e40838..0aa51ac121 100644 --- a/DOCS/tech/slave.txt +++ b/DOCS/tech/slave.txt @@ -249,8 +249,10 @@ speed_mult <value> speed_set <value> Set the speed to <value>. -step_property <property> [<value>] - Change property by value, or increase by a default if value is not given. +step_property <property> [value] [direction] + Change a property by value, or increase by a default if value is + not given or zero. The direction is reversed if direction is less + than zero. sub_alignment [value] Toggle/set subtitle alignment. @@ -1735,7 +1735,8 @@ int run_command(MPContext * mpctx, mp_cmd_t * cmd) cmd->args[0].v.s); } r = mp_property_do(cmd->args[0].v.s, - M_PROPERTY_STEP_UP, + cmd->args[2].v.i < 0 ? + M_PROPERTY_STEP_DOWN : M_PROPERTY_STEP_UP, arg, mpctx); step_prop_err: if (r == M_PROPERTY_UNKNOWN) diff --git a/input/input.c b/input/input.c index addce70acb..112efdb1ac 100644 --- a/input/input.c +++ b/input/input.c @@ -165,7 +165,7 @@ static mp_cmd_t mp_cmds[] = { { MP_CMD_KEYDOWN_EVENTS, "key_down_event", 1, { {MP_CMD_ARG_INT,{0}}, {-1,{0}} } }, { MP_CMD_SET_PROPERTY, "set_property", 2, { {MP_CMD_ARG_STRING, {0}}, {MP_CMD_ARG_STRING, {0}}, {-1,{0}} } }, { MP_CMD_GET_PROPERTY, "get_property", 1, { {MP_CMD_ARG_STRING, {0}}, {-1,{0}} } }, - { MP_CMD_STEP_PROPERTY, "step_property", 1, { {MP_CMD_ARG_STRING, {0}}, {MP_CMD_ARG_FLOAT,{0}}, {-1,{0}} } }, + { MP_CMD_STEP_PROPERTY, "step_property", 1, { {MP_CMD_ARG_STRING, {0}}, {MP_CMD_ARG_FLOAT,{0}}, {MP_CMD_ARG_INT,{0}}, {-1,{0}} } }, { MP_CMD_SEEK_CHAPTER, "seek_chapter", 1, { {MP_CMD_ARG_INT,{0}}, {MP_CMD_ARG_INT,{0}}, {-1,{0}} } }, { MP_CMD_SET_MOUSE_POS, "set_mouse_pos", 2, { {MP_CMD_ARG_INT,{0}}, {MP_CMD_ARG_INT,{0}}, {-1,{0}} } }, |