mirror of
https://github.com/mpv-player/mpv
synced 2025-01-18 13:14:36 +00:00
changes according to OSD calculations
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@1728 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
60737e3845
commit
7e4dac5d3d
13
libvo/sub.c
13
libvo/sub.c
@ -34,8 +34,8 @@ int vo_osd_progbar_value=100; // 0..256
|
||||
|
||||
// if we have n=256 bars then OSD progbar looks like below
|
||||
//
|
||||
// 0 1 2 3 ... 256 <= vo_osd_progbar_value
|
||||
// | | | | |
|
||||
// 0 1 2 3 ... 256 <= vo_osd_progbar_value
|
||||
// | | | | |
|
||||
// [ === === === ... === ]
|
||||
//
|
||||
// the above schema is rescalled to n=elems bars
|
||||
@ -56,12 +56,9 @@ inline static void vo_draw_text_progbar(int dxs,int dys,void (*draw_alpha)(int x
|
||||
|
||||
if (vo_osd_progbar_value<=0)
|
||||
mark=0;
|
||||
else {
|
||||
int mm=vo_osd_progbar_value*elems;
|
||||
mark=mm>>8;
|
||||
if (mm & 0x00FF) mark++;
|
||||
if (mark>elems) mark=elems;
|
||||
}
|
||||
else if ((mark=(vo_osd_progbar_value*elems)>>8)>elems)
|
||||
mark=elems;
|
||||
|
||||
// printf("osd.progbar width=%d xpos=%d\n",width,x);
|
||||
|
||||
c=vo_osd_progbar_type;
|
||||
|
10
mplayer.c
10
mplayer.c
@ -1759,11 +1759,11 @@ if(rel_seek_secs || abs_seek_pos){
|
||||
// Set OSD:
|
||||
if(osd_level){
|
||||
int len=((demuxer->movi_end-demuxer->movi_start)>>8);
|
||||
if(len>0){
|
||||
osd_visible=sh_video->fps; // 1 sec
|
||||
vo_osd_progbar_type=0;
|
||||
vo_osd_progbar_value=(demuxer->filepos-demuxer->movi_start)/len;
|
||||
}
|
||||
if (len>0){
|
||||
osd_visible=sh_video->fps; // 1 sec
|
||||
vo_osd_progbar_type=0;
|
||||
vo_osd_progbar_value=(demuxer->filepos-demuxer->movi_start)/len;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user