[MPlayer-cvslog] r23430 - in trunk: DOCS/tech/slave.txt command.c input/input.c

albeu subversion at mplayerhq.hu
Thu May 31 11:42:15 CEST 2007


Author: albeu
Date: Thu May 31 11:42:14 2007
New Revision: 23430

Log:
Allow setting the direction in the step_property command.


Modified:
   trunk/DOCS/tech/slave.txt
   trunk/command.c
   trunk/input/input.c

Modified: trunk/DOCS/tech/slave.txt
==============================================================================
--- trunk/DOCS/tech/slave.txt	(original)
+++ trunk/DOCS/tech/slave.txt	Thu May 31 11:42:14 2007
@@ -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.

Modified: trunk/command.c
==============================================================================
--- trunk/command.c	(original)
+++ trunk/command.c	Thu May 31 11:42:14 2007
@@ -1735,7 +1735,8 @@ int run_command(MPContext * mpctx, mp_cm
 		               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)

Modified: trunk/input/input.c
==============================================================================
--- trunk/input/input.c	(original)
+++ trunk/input/input.c	Thu May 31 11:42:14 2007
@@ -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}} } },



More information about the MPlayer-cvslog mailing list