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

Changyu Li ironyman13 at gmail.com
Thu Feb 23 00:09:21 CET 2012


Hi,

Thanks guys, I've taken your opinions into account. The default value of
progbar-align is 50 for center, 0 for top, 100 bottom.

I'm not sure how I should change the man pages though. I added
porgbar-align to the "example mplayer configuration file" section. What
else should I do?


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.f);
          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:"
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;


More information about the MPlayer-dev-eng mailing list