Mercurial > mplayer.hg
diff command.c @ 30986:2186c040f9e0
Add osd_show_progression: Show progress bar and elapsed/total time.
Patch by Hugo Chargois, hugo D chargois A free fr
author | cehoyos |
---|---|
date | Fri, 09 Apr 2010 19:20:52 +0000 |
parents | 76a13038105e |
children | 8d840754a921 |
line wrap: on
line diff
--- a/command.c Wed Apr 07 19:36:23 2010 +0000 +++ b/command.c Fri Apr 09 19:20:52 2010 +0000 @@ -2763,6 +2763,17 @@ brk_cmd = 1; break; + case MP_CMD_OSD_SHOW_PROGRESSION:{ + int len = demuxer_get_time_length(mpctx->demuxer); + int pts = demuxer_get_current_time(mpctx->demuxer); + set_osd_bar(0, "Position", 0, 100, demuxer_get_percent_pos(mpctx->demuxer)); + set_osd_msg(OSD_MSG_TEXT, 1, osd_duration, + "%c %02d:%02d:%02d / %02d:%02d:%02d", + mpctx->osd_function, pts/3600, (pts/60)%60, pts%60, + len/3600, (len/60)%60, len%60); + } + break; + #ifdef CONFIG_RADIO case MP_CMD_RADIO_STEP_CHANNEL: if (mpctx->demuxer->stream->type == STREAMTYPE_RADIO) {