[MPlayer-cvslog] r32819 - trunk/mplayer.c

reimar subversion at mplayerhq.hu
Wed Jan 26 22:51:44 CET 2011


Author: reimar
Date: Wed Jan 26 22:51:43 2011
New Revision: 32819

Log:
Update PAUSED status line with cache fill status if it changed.

Modified:
   trunk/mplayer.c

Modified: trunk/mplayer.c
==============================================================================
--- trunk/mplayer.c	Wed Jan 26 22:48:15 2011	(r32818)
+++ trunk/mplayer.c	Wed Jan 26 22:51:43 2011	(r32819)
@@ -2475,6 +2475,9 @@ static double update_video(int *blit_fra
 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 @@ static void pause_loop(void)
         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) {


More information about the MPlayer-cvslog mailing list