[MPlayer-dev-eng] [Patch] info command: show progress bar and elapsed/total time

Reimar Döffinger Reimar.Doeffinger at gmx.de
Wed Mar 31 19:23:49 CEST 2010


On Wed, Mar 24, 2010 at 06:19:40AM +0100, Hugo Chargois wrote:
> Index: input/input.h
> ===================================================================
> --- input/input.h	(revision 30955)
> +++ input/input.h	(working copy)
> @@ -131,6 +131,7 @@
>    MP_CMD_ASS_USE_MARGINS,
>    MP_CMD_SWITCH_TITLE,
>    MP_CMD_STOP,
> +  MP_CMD_INFO,

I don't much like yet another command.
Except for the progress bar I think it would make more sense to extend the
MP_CMD_OSD_SHOW_PROPERTY_TEXT function to do it...
Either way at least the name "info" is too unspecific.

> +	case MP_CMD_INFO:{
> +		    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);

I think that's indented one level two much, with the strange scheme that
file uses I think it should be two tabs.
Also spaces after all "," not just select ones would be nice.



More information about the MPlayer-dev-eng mailing list