[MPlayer-dev-eng] Allow progress bar osd to be moved to bottom of window

Changyu Li ironyman13 at gmail.com
Fri Feb 24 00:45:02 CET 2012


Sorry about that. Corrections were made per Diego's suggestions.
-------------- next part --------------
Index: cfg-mplayer.h
===================================================================
--- cfg-mplayer.h	(revision 34753)
+++ cfg-mplayer.h	(working copy)
@@ -351,6 +351,7 @@
     {"h", help_text, CONF_TYPE_PRINT, CONF_NOCFG|CONF_GLOBAL, 0, 0, NULL},
 
     {"vd", vd_conf, CONF_TYPE_SUBCONFIG, 0, 0, 0, NULL},
+    {"progbar-align", &progbar_align, CONF_TYPE_INT, CONF_GLOBAL, 0, 100, NULL},
     {NULL, NULL, 0, 0, 0, 0, NULL}
 };
 
Index: sub/sub.c
===================================================================
--- sub/sub.c	(revision 34753)
+++ sub/sub.c	(working copy)
@@ -528,6 +528,7 @@
 
 int vo_osd_progbar_type=-1;
 int vo_osd_progbar_value=100;   // 0..256
+int progbar_align=50;
 
 // if we have n=256 bars then OSD progbar looks like below
 //
@@ -555,7 +556,7 @@
 
     // calculate bbox corners:
     {	int h=0;
-        int y=(dys-vo_font->height)/2;
+        int y=((dys-vo_font->height)*progbar_align)/100;
         int delimw=vo_font->width[OSD_PB_START]
      		  +vo_font->width[OSD_PB_END]
      		  +vo_font->charspace;
Index: DOCS/man/en/mplayer.1
===================================================================
--- DOCS/man/en/mplayer.1	(revision 34753)
+++ DOCS/man/en/mplayer.1	(working copy)
@@ -533,6 +533,8 @@
 mf=type=png:fps=25
 # Eerie negative images are cool.
 vf=eq2=1.0:\-0.8
+# OSD progress bar vertical alignment
+progbar-align=50
 .fi
 .PP
 .I "EXAMPLE MENCODER CONFIGURATION FILE:"
@@ -2609,6 +2611,10 @@
 formats).
 .
 .TP
+.B \-progbar-align <0-100>
+Specify the vertical alignment of the progress bar.
+.
+.TP
 .B \-sid <ID> (also see \-slang, \-vobsubid)
 Display the subtitle stream specified by <ID> (0\-31).
 MPlayer prints the available subtitle IDs when run in verbose (\-v) mode.
Index: mplayer.h
===================================================================
--- mplayer.h	(revision 34753)
+++ mplayer.h	(working copy)
@@ -36,6 +36,7 @@
 
 extern float  audio_delay;
 extern double start_pts;
+extern int progbar_align;
 
 /* for the GUI */
 extern int auto_quality;
Index: etc/example.conf
===================================================================
--- etc/example.conf	(revision 34753)
+++ etc/example.conf	(working copy)
@@ -160,6 +160,8 @@
 #vf-clr=yes
 
 
+# OSD progress bar vertical alignment
+#progbar-align=50
 
 # You can also include other configuration files.
 #include = /path/to/the/file/you/want/to/include


More information about the MPlayer-dev-eng mailing list