[MPlayer-dev-eng] [PATCH] added slave commands to retrieve fullscreen, subtitles
Mike Swieton
swietonm at student.gvsu.edu
Mon Sep 15 11:22:11 CEST 2003
This patch adds the commands get_vo_fullscreen and get_sub_visibility to slave
mode. They print out the values in the vo_fs and sub_visibility globals,
respectively. This way, front end programs have some way of knowing what is
going on.
Mike Swieton
--
I dislike people who talk too much. They usually say too little.
-------------- next part --------------
? fibmap_mplayer
? slavecmds.diff
Index: mplayer.c
===================================================================
RCS file: /cvsroot/mplayer/main/mplayer.c,v
retrieving revision 1.725
diff -u -r1.725 mplayer.c
--- mplayer.c 29 Aug 2003 21:41:03 -0000 1.725
+++ mplayer.c 15 Sep 2003 09:54:55 -0000
@@ -3033,6 +3033,14 @@
}
#endif
} break;
+ case MP_CMD_GET_SUB_VISIBILITY:
+ {
+#ifdef USE_SUB
+ if (sh_video) {
+ mp_msg(MSGT_GLOBAL,MSGL_INFO,"ANS_SUB_VISIBILITY=%ld\n", sub_visibility);
+ }
+#endif
+ } break;
case MP_CMD_VOBSUB_LANG:
if (vo_vobsub)
{
@@ -3065,6 +3073,11 @@
case MP_CMD_GET_TIME_LENGTH : {
mp_msg(MSGT_GLOBAL,MSGL_INFO,"ANS_LENGTH=%ld\n", demuxer_get_time_length(demuxer));
} break;
+
+ case MP_CMD_GET_VO_FULLSCREEN : {
+ if(video_out && vo_config_count)
+ mp_msg(MSGT_GLOBAL,MSGL_INFO,"ANS_VO_FULLSCREEN=%ld\n", vo_fs);
+ } break;
case MP_CMD_GET_PERCENT_POS : {
mp_msg(MSGT_GLOBAL,MSGL_INFO,"ANS_PERCENT_POSITION=%ld\n", demuxer_get_percent_pos(demuxer));
Index: DOCS/tech/slave.txt
===================================================================
RCS file: /cvsroot/mplayer/main/DOCS/tech/slave.txt,v
retrieving revision 1.5
diff -u -r1.5 slave.txt
--- DOCS/tech/slave.txt 12 Aug 2003 13:22:34 -0000 1.5
+++ DOCS/tech/slave.txt 15 Sep 2003 09:54:56 -0000
@@ -45,6 +45,8 @@
Set subtitle alignment.
sub_visibility
Toggle subtitle visibility.
+get_sub_visibility
+ Print out subtitle visibility (1 == on, 0 == off).
sub_pos <value>
Adjust subtitles position.
vobsub_lang
@@ -55,6 +57,8 @@
???
vo_fullscreen
Switch to fullscreen mode.
+get_vo_Fullscreen
+ Print out fullscreen-ness (1 == fullscreened, 0 == windowed).
panscan value [value2]
???
loadfile url
Index: input/input.c
===================================================================
RCS file: /cvsroot/mplayer/main/input/input.c,v
retrieving revision 1.84
diff -u -r1.84 input.c
--- input/input.c 2 Sep 2003 17:44:38 -0000 1.84
+++ input/input.c 15 Sep 2003 09:55:00 -0000
@@ -127,6 +127,9 @@
{ MP_CMD_CHIDE, "hide", 0, { {MP_CMD_ARG_INT,{3000}}, {-1,{0}} } },
{ MP_CMD_CRUN, "run", 1, { {MP_CMD_ARG_STRING,{0}}, {-1,{0}} } },
#endif
+
+ { MP_CMD_GET_VO_FULLSCREEN, "get_vo_fullscreen", 0, { {-1,{0}} } },
+ { MP_CMD_GET_SUB_VISIBILITY, "get_sub_visibility", 0, { {-1,{0}} } },
{ 0, NULL, 0, {} }
};
Index: input/input.h
===================================================================
RCS file: /cvsroot/mplayer/main/input/input.h,v
retrieving revision 1.37
diff -u -r1.37 input.h
--- input/input.h 14 Sep 2003 17:52:59 -0000 1.37
+++ input/input.h 15 Sep 2003 09:55:00 -0000
@@ -49,6 +49,8 @@
#define MP_CMD_TV_SET_CONTRAST 45
#define MP_CMD_TV_SET_HUE 46
#define MP_CMD_TV_SET_SATURATION 47
+#define MP_CMD_GET_VO_FULLSCREEN 48
+#define MP_CMD_GET_SUB_VISIBILITY 49
#define MP_CMD_GUI_EVENTS 5000
#define MP_CMD_GUI_LOADFILE 5001
More information about the MPlayer-dev-eng
mailing list