Mercurial > mplayer.hg
changeset 34686:ff81a1db421e
Allow to set the OST progress position.
Patch by Changyu Li, ironyman13 at gmail.
author | cigaes |
---|---|
date | Fri, 24 Feb 2012 20:19:46 +0000 |
parents | 311b47301ea7 |
children | 86632acf9c8d |
files | DOCS/man/en/mplayer.1 cfg-mplayer.h etc/example.conf mplayer.h sub/sub.c |
diffstat | 5 files changed, 13 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/DOCS/man/en/mplayer.1 Fri Feb 24 17:26:35 2012 +0000 +++ b/DOCS/man/en/mplayer.1 Fri Feb 24 20:19:46 2012 +0000 @@ -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,11 @@ formats). . .TP +.B \-progbar\-align <0-100> +Specify the vertical alignment of the progress bar +(0: top, 100: bottom, default is 50, i.e. centered). +. +.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.
--- a/cfg-mplayer.h Fri Feb 24 17:26:35 2012 +0000 +++ b/cfg-mplayer.h Fri Feb 24 20:19:46 2012 +0000 @@ -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} };
--- a/etc/example.conf Fri Feb 24 17:26:35 2012 +0000 +++ b/etc/example.conf Fri Feb 24 20:19:46 2012 +0000 @@ -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
--- a/mplayer.h Fri Feb 24 17:26:35 2012 +0000 +++ b/mplayer.h Fri Feb 24 20:19:46 2012 +0000 @@ -36,6 +36,7 @@ extern float audio_delay; extern double start_pts; +extern int progbar_align; /* for the GUI */ extern int auto_quality;
--- a/sub/sub.c Fri Feb 24 17:26:35 2012 +0000 +++ b/sub/sub.c Fri Feb 24 20:19:46 2012 +0000 @@ -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;