summaryrefslogtreecommitdiffstats
path: root/mplayer.c
diff options
context:
space:
mode:
authordiego <diego@b3059339-0415-0410-9bf9-f77b7e298cf2>2005-06-30 09:38:55 +0000
committerdiego <diego@b3059339-0415-0410-9bf9-f77b7e298cf2>2005-06-30 09:38:55 +0000
commit98f824366fd7752240e9ae391d83bc6dce824ed4 (patch)
treeb0beee1cf98fa55cb20540f6dcc9dca9c597ef28 /mplayer.c
parent9062a75990e999d29fec80e392d045f3aa6d8962 (diff)
downloadmpv-98f824366fd7752240e9ae391d83bc6dce824ed4.tar.bz2
mpv-98f824366fd7752240e9ae391d83bc6dce824ed4.tar.xz
Make the OSD display state information when cycling OSD states with 'o'.
based on a patch by Paul TT < paulltt - at- hackerjournal - dot - it > git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@15863 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'mplayer.c')
-rw-r--r--mplayer.c20
1 files changed, 18 insertions, 2 deletions
diff --git a/mplayer.c b/mplayer.c
index ee53be1d7a..0496527c26 100644
--- a/mplayer.c
+++ b/mplayer.c
@@ -1032,6 +1032,7 @@ int osd_show_tv_channel = 25;
int osd_show_ontop = 0;
int osd_show_rootwin = 0;
int osd_show_framedropping = 0;
+int osd_show_status = 0;
int rtc_fd=-1;
@@ -2918,6 +2919,10 @@ if (stream->type==STREAMTYPE_DVDNAV && dvd_nav_still)
osd_level=(osd_level+1)%(MAX_OSD_LEVEL+1);
else
osd_level= v > MAX_OSD_LEVEL ? MAX_OSD_LEVEL : v;
+ /* Show OSD state when disabled, but not when an explicit
+ argument is given to the osd command, i.e. in slave mode. */
+ if (v < 0 && osd_level <= 1)
+ osd_show_status = 9;
}
#endif
} break;
@@ -3980,6 +3985,11 @@ if ((user_muted | edl_muted) != mixer.muted) mixer_mute(&mixer);
//================= Update OSD ====================
#ifdef USE_OSD
+ if (osd_level == 0 && osd_show_status > 0 && sh_video){
+ snprintf(vo_osd_text, 63, "OSD: disabled");
+ vo_osd_changed(OSDTYPE_OSD);
+ osd_show_status--;
+ }
if(osd_level>=1 && sh_video){
int pts=sh_video->pts;
char osd_text_tmp[64];
@@ -4111,13 +4121,19 @@ if ((user_muted | edl_muted) != mixer.muted) mixer_mute(&mixer);
snprintf(osd_text_tmp, 63, "%c %02d:%02d:%02d%s",osd_function,pts/3600,(pts/60)%60,pts%60,percentage_text);
} else osd_text_tmp[0]=0;
+ if (osd_level == 1 && osd_show_status > 0){
+ strncpy(osd_text_tmp, "OSD: enabled", 63);
+ strncpy(vo_osd_text, osd_text_tmp, 63);
+ vo_osd_changed(OSDTYPE_OSD);
+ osd_show_status--;
+ }
if(strcmp(vo_osd_text, osd_text_tmp)) {
strncpy(vo_osd_text, osd_text_tmp, 63);
vo_osd_changed(OSDTYPE_OSD);
}
} else {
- if(vo_osd_text) {
- vo_osd_text=NULL;
+ if(vo_osd_text && osd_show_status <= 0) {
+ vo_osd_text=NULL;
vo_osd_changed(OSDTYPE_OSD);
}
}