[MPlayer-cvslog] r34774 - in trunk: DOCS/man/en/mplayer.1 cfg-mplayer.h etc/example.conf mplayer.h sub/sub.c

cigaes subversion at mplayerhq.hu
Fri Feb 24 21:19:47 CET 2012


Author: cigaes
Date: Fri Feb 24 21:19:46 2012
New Revision: 34774

Log:
Allow to set the OST progress position.

Patch by Changyu Li, ironyman13 at gmail.

Modified:
   trunk/cfg-mplayer.h
   trunk/etc/example.conf
   trunk/mplayer.h
   trunk/sub/sub.c

Changes in other areas also in this revision:
Modified:
   trunk/DOCS/man/en/mplayer.1

Modified: trunk/cfg-mplayer.h
==============================================================================
--- trunk/cfg-mplayer.h	Fri Feb 24 18:26:35 2012	(r34773)
+++ trunk/cfg-mplayer.h	Fri Feb 24 21:19:46 2012	(r34774)
@@ -351,6 +351,7 @@ const m_option_t mplayer_opts[]={
     {"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}
 };
 

Modified: trunk/etc/example.conf
==============================================================================
--- trunk/etc/example.conf	Fri Feb 24 18:26:35 2012	(r34773)
+++ trunk/etc/example.conf	Fri Feb 24 21:19:46 2012	(r34774)
@@ -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

Modified: trunk/mplayer.h
==============================================================================
--- trunk/mplayer.h	Fri Feb 24 18:26:35 2012	(r34773)
+++ trunk/mplayer.h	Fri Feb 24 21:19:46 2012	(r34774)
@@ -36,6 +36,7 @@ extern int use_menu;
 
 extern float  audio_delay;
 extern double start_pts;
+extern int progbar_align;
 
 /* for the GUI */
 extern int auto_quality;

Modified: trunk/sub/sub.c
==============================================================================
--- trunk/sub/sub.c	Fri Feb 24 18:26:35 2012	(r34773)
+++ trunk/sub/sub.c	Fri Feb 24 21:19:46 2012	(r34774)
@@ -528,6 +528,7 @@ TODO: support for separated graphics sym
 
 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 @@ static inline void vo_update_text_progba
 
     // 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;


More information about the MPlayer-cvslog mailing list