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

Changyu Li ironyman13 at gmail.com
Thu Feb 23 01:11:25 CET 2012


Hi, 

So in summary, example added to etc/example.conf and
DOC/man/en/mplayer.1. Description added to OSD/SUBTITLE OPTIONS section.
Floating point stuff is removed. Anything else to add?

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
+# progress bar osd vertical alignment
+progbar-align=50
  .fi
  .PP
  .I "EXAMPLE MENCODER CONFIGURATION FILE:"
@@ -2920,8 +2922,12 @@
  .B \-vobsubid <0\-31>
  Specify the VOBsub subtitle ID.
  .
+.TP
+.B \-progbar-align <0-100>
+Specify the vertical alignment of the progress bar.
  .
  .
+.
  .SH "AUDIO OUTPUT OPTIONS (MPLAYER ONLY)"
  .
  .TP
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
  
  
+# progress bar osd 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