# HG changeset patch # User reimar # Date 1296078703 0 # Node ID 67e0128e2f1a8d765f4b09bd5ad871b1a9884c11 # Parent 005b026b12310a53438e46fe77d969ddcd35afb2 Update PAUSED status line with cache fill status if it changed. diff -r 005b026b1231 -r 67e0128e2f1a mplayer.c --- a/mplayer.c Wed Jan 26 21:48:15 2011 +0000 +++ b/mplayer.c Wed Jan 26 21:51:43 2011 +0000 @@ -2475,6 +2475,9 @@ static void pause_loop(void) { mp_cmd_t* cmd; +#ifdef CONFIG_STREAM_CACHE + int old_cache_fill = stream_cache_size > 0 ? cache_fill_status(mpctx->stream) : 0; +#endif if (!quiet) { if (term_osd && !mpctx->sh_video) { set_osd_msg(OSD_MSG_PAUSE, 1, 0, MSGTR_Paused); @@ -2514,6 +2517,22 @@ if (vf_menu) vf_menu_pause_update(vf_menu); #endif +#ifdef CONFIG_STREAM_CACHE + if (!quiet && stream_cache_size > 0) + { + int new_cache_fill = cache_fill_status(mpctx->stream); + if (new_cache_fill != old_cache_fill) { + if (term_osd && !mpctx->sh_video) { + set_osd_msg(OSD_MSG_PAUSE, 1, 0, MSGTR_Paused" %d%%", + new_cache_fill); + update_osd_msg(); + } else + mp_msg(MSGT_CPLAYER, MSGL_STATUS, MSGTR_Paused" %d%%\r", + new_cache_fill); + old_cache_fill = new_cache_fill; + } + } +#endif usec_sleep(20000); } if (cmd && cmd->id == MP_CMD_PAUSE) {