From 543504363f0448ae4df2bc42df49a724256a4b73 Mon Sep 17 00:00:00 2001 From: cehoyos Date: Fri, 9 Apr 2010 19:20:52 +0000 Subject: Add osd_show_progression: Show progress bar and elapsed/total time. Patch by Hugo Chargois, hugo D chargois A free fr git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31028 b3059339-0415-0410-9bf9-f77b7e298cf2 --- command.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'command.c') diff --git a/command.c b/command.c index a62e0bb77f..76c2e7a767 100644 --- a/command.c +++ b/command.c @@ -2763,6 +2763,17 @@ int run_command(MPContext * mpctx, mp_cmd_t * cmd) 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) { -- cgit v1.2.3