# HG changeset patch # User cigaes # Date 1330114786 0 # Node ID ff81a1db421ec4f4b16bf1d83ce89868eedd9765 # Parent 311b47301ea72b5b0d8d5be1fec01e8ab325e24e Allow to set the OST progress position. Patch by Changyu Li, ironyman13 at gmail. diff -r 311b47301ea7 -r ff81a1db421e DOCS/man/en/mplayer.1 --- 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 (also see \-slang, \-vobsubid) Display the subtitle stream specified by (0\-31). MPlayer prints the available subtitle IDs when run in verbose (\-v) mode. diff -r 311b47301ea7 -r ff81a1db421e cfg-mplayer.h --- 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} }; diff -r 311b47301ea7 -r ff81a1db421e etc/example.conf --- 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 diff -r 311b47301ea7 -r ff81a1db421e mplayer.h --- 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; diff -r 311b47301ea7 -r ff81a1db421e sub/sub.c --- 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;