Mercurial > mplayer.hg
comparison 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 |
comparison
equal
deleted
inserted
replaced
30985:76e1dd50dccf | 30986:2186c040f9e0 |
---|---|
2761 /* NOP */ ; | 2761 /* NOP */ ; |
2762 mpctx->eof = PT_STOP; | 2762 mpctx->eof = PT_STOP; |
2763 brk_cmd = 1; | 2763 brk_cmd = 1; |
2764 break; | 2764 break; |
2765 | 2765 |
2766 case MP_CMD_OSD_SHOW_PROGRESSION:{ | |
2767 int len = demuxer_get_time_length(mpctx->demuxer); | |
2768 int pts = demuxer_get_current_time(mpctx->demuxer); | |
2769 set_osd_bar(0, "Position", 0, 100, demuxer_get_percent_pos(mpctx->demuxer)); | |
2770 set_osd_msg(OSD_MSG_TEXT, 1, osd_duration, | |
2771 "%c %02d:%02d:%02d / %02d:%02d:%02d", | |
2772 mpctx->osd_function, pts/3600, (pts/60)%60, pts%60, | |
2773 len/3600, (len/60)%60, len%60); | |
2774 } | |
2775 break; | |
2776 | |
2766 #ifdef CONFIG_RADIO | 2777 #ifdef CONFIG_RADIO |
2767 case MP_CMD_RADIO_STEP_CHANNEL: | 2778 case MP_CMD_RADIO_STEP_CHANNEL: |
2768 if (mpctx->demuxer->stream->type == STREAMTYPE_RADIO) { | 2779 if (mpctx->demuxer->stream->type == STREAMTYPE_RADIO) { |
2769 int v = cmd->args[0].v.i; | 2780 int v = cmd->args[0].v.i; |
2770 if (v > 0) | 2781 if (v > 0) |