[MPlayer-dev-eng] Dynamic change subtitle position

Tomas Konir moje at molly.vabo.cz
Tue Feb 26 14:38:38 CET 2002


Hi
I made small patch to allow dynamic change subtitle position.
I think that if there is possibility to set position as start parameter 
the logic is make it set while running.

	MOJE

P.S. excuse my bad english


-- 
Tomas Konir
Brno
ICQ 25849167


----- patch

diff -Nur main_test/input/input.c main/input/input.c
--- main_test/input/input.c	Mon Feb 25 14:14:27 2002
+++ main/input/input.c	Tue Feb 26 14:04:46 2002
@@ -49,6 +49,7 @@
   { MP_CMD_HUE, "hue",1,  { {MP_CMD_ARG_INT,{0}}, {MP_CMD_ARG_INT,{0}}, {-1,{0}} } },
   { MP_CMD_SATURATION, "saturation",1,  { {MP_CMD_ARG_INT,{0}}, {MP_CMD_ARG_INT,{0}}, {-1,{0}} }  },
   { MP_CMD_FRAMEDROPPING, "frame_drop",0, { { MP_CMD_ARG_INT,{-1} }, {-1,{0}} } },
+  { MP_CMD_SUB_POS, "sub_pos", 1, { {MP_CMD_ARG_INT,{0}}, {MP_CMD_ARG_INT,{0}}, {-1,{0}} } },
 #ifdef USE_TV
   { MP_CMD_TV_STEP_CHANNEL, "tv_step_channel", 1,  { { MP_CMD_ARG_INT ,{0}}, {-1,{0}} }},
   { MP_CMD_TV_STEP_NORM, "tv_step_norm",0, { {-1,{0}} }  },
@@ -174,6 +175,8 @@
   { { '7', 0 }, "saturation -1" },
   { { '8', 0 }, "saturation 1" },
   { { 'd', 0 }, "frame_drop" },
+  { { 'r', 0 }, "sub_pos +5" },
+  { { 't', 0 }, "sub_pos -5" },
 #ifdef USE_TV
   { { 'h', 0 }, "tv_step_channel 1" },
   { { 'k', 0 }, "tv_step_channel -1" },
diff -Nur main_test/input/input.h main/input/input.h
--- main_test/input/input.h	Mon Feb 25 14:14:27 2002
+++ main/input/input.h	Tue Feb 26 14:11:38 2002
@@ -22,6 +22,7 @@
 #define MP_CMD_TV_STEP_NORM 18
 #define MP_CMD_TV_STEP_CHANNEL_LIST 19
 #define MP_CMD_VO_FULLSCREEN 20
+#define MP_CMD_SUB_POS 21
 
 #define MP_CMD_GUI_EVENTS       5000
 #define MP_CMD_GUI_LOADFILE     5001
diff -Nur main_test/mplayer.c main/mplayer.c
--- main_test/mplayer.c	Mon Feb 25 14:14:26 2002
+++ main/mplayer.c	Tue Feb 26 14:24:57 2002
@@ -2645,6 +2645,15 @@
 #endif
 	video_out->control(VOCTRL_FULLSCREEN, 0);
     } break;
+    case MP_CMD_SUB_POS:
+    {
+        int v;
+	v = cmd->args[0].v.i;
+    
+	sub_pos+=v;
+	if(sub_pos >100) sub_pos=100;
+	if(sub_pos <0) sub_pos=0;
+    }	break;
     default : {
 #ifdef HAVE_NEW_GUI
       if ( ( use_gui )&&( cmd->id > MP_CMD_GUI_EVENTS ) ) guiGetEvent( guiIEvent,(char *)cmd->id );




More information about the MPlayer-dev-eng mailing list