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

Clément Bœsch ubitux at gmail.com
Thu Jan 27 14:11:23 CET 2011


On Wed, Jan 26, 2011 at 10:51:44PM +0100, reimar wrote:
> 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)
> +        {

if (!quiet && stream_cache_size > 0) {

</Diego>

> +            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) {
> _______________________________________________
> MPlayer-cvslog mailing list
> MPlayer-cvslog at mplayerhq.hu
> https://lists.mplayerhq.hu/mailman/listinfo/mplayer-cvslog

-- 
Clément B.


More information about the MPlayer-cvslog mailing list