changeset 13228:a47aaa6b7324

slave mode command to en/disable vsync, patch by Aurelien Jacobs <aurel at gnuage.org>
author faust3
date Thu, 02 Sep 2004 12:02:06 +0000
parents 45f25ea0c5fa
children b1e482fcd919
files input/input.c input/input.h mplayer.c
diffstat 3 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/input/input.c	Thu Sep 02 11:34:25 2004 +0000
+++ b/input/input.c	Thu Sep 02 12:02:06 2004 +0000
@@ -103,6 +103,7 @@
   { MP_CMD_VO_ROOTWIN, "vo_rootwin", 0, { {-1,{0}} } },
   { MP_CMD_SCREENSHOT, "screenshot", 0, { {-1,{0}} } },
   { MP_CMD_PANSCAN, "panscan",1,  { {MP_CMD_ARG_FLOAT,{0}}, {MP_CMD_ARG_INT,{0}}, {-1,{0}} } },
+  { MP_CMD_SWITCH_VSYNC, "switch_vsync", 0, { {MP_CMD_ARG_INT,{0}}, {-1,{0}} } },
   { MP_CMD_LOADFILE, "loadfile", 1, { {MP_CMD_ARG_STRING, {0}}, {-1,{0}} } },
   { MP_CMD_LOADLIST, "loadlist", 1, { {MP_CMD_ARG_STRING, {0}}, {-1,{0}} } },
   { MP_CMD_VF_CHANGE_RECTANGLE, "change_rectangle", 2, { {MP_CMD_ARG_INT,{0}}, {MP_CMD_ARG_INT,{0}}, {-1,{0}}}},
--- a/input/input.h	Thu Sep 02 11:34:25 2004 +0000
+++ b/input/input.h	Thu Sep 02 12:02:06 2004 +0000
@@ -55,6 +55,7 @@
 #define MP_CMD_VO_ONTOP 51
 #define MP_CMD_SUB_SELECT 52
 #define MP_CMD_VO_ROOTWIN 53
+#define MP_CMD_SWITCH_VSYNC 54
 
 #define MP_CMD_GUI_EVENTS       5000
 #define MP_CMD_GUI_LOADFILE     5001
--- a/mplayer.c	Thu Sep 02 11:34:25 2004 +0000
+++ b/mplayer.c	Thu Sep 02 12:02:06 2004 +0000
@@ -2980,6 +2980,9 @@
 	tv_step_chanlist((tvi_handle_t*)(demuxer->priv));
     } break;
 #endif
+    case MP_CMD_SWITCH_VSYNC:  {
+      vo_vsync = ( cmd->nargs > 0 )? cmd->args[0].v.i : !vo_vsync;
+    } break;
     case MP_CMD_VO_FULLSCREEN:
     {
 #ifdef HAVE_NEW_GUI