Mercurial > mplayer.hg
changeset 23460:44746cbd4e5b
Create a new MSGT for just the status line.
author | diego |
---|---|
date | Tue, 05 Jun 2007 16:13:00 +0000 |
parents | 2c09fe135c93 |
children | b820433922b4 |
files | cfg-common.h mencoder.c mp_msg.c mp_msg.h mplayer.c |
diffstat | 5 files changed, 10 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/cfg-common.h Tue Jun 05 15:09:51 2007 +0000 +++ b/cfg-common.h Tue Jun 05 16:13:00 2007 +0000 @@ -626,6 +626,7 @@ { "osd-menu", &mp_msg_levels[MSGT_OSD_MENU], CONF_TYPE_INT, CONF_RANGE, -1, 9, NULL }, { "identify", &mp_msg_levels[MSGT_IDENTIFY], CONF_TYPE_INT, CONF_RANGE, -1, 9, NULL }, { "ass", &mp_msg_levels[MSGT_ASS], CONF_TYPE_INT, CONF_RANGE, -1, 9, NULL }, + { "statusline", &mp_msg_levels[MSGT_STATUSLINE], CONF_TYPE_INT, CONF_RANGE, -1, 9, NULL }, {"help", "Available msg modules:\n" " global - common player errors/information\n" " cplayer - console player (mplayer.c)\n" @@ -670,6 +671,7 @@ " muxer - muxer layer\n" " identify - identify output\n" " ass - libass messages\n" + " statusline - playback/encoding status line\n" "\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL}, {NULL, NULL, 0, 0, 0, 0, NULL}
--- a/mencoder.c Tue Jun 05 15:09:51 2007 +0000 +++ b/mencoder.c Tue Jun 05 16:13:00 2007 +0000 @@ -1439,8 +1439,8 @@ (int)demuxer->movi_end); #else if(!quiet) { - if( mp_msg_test(MSGT_AVSYNC,MSGL_V) ) { - mp_msg(MSGT_AVSYNC,MSGL_STATUS,"Pos:%6.1fs %6df (%2d%%) %3dfps Trem:%4dmin %3dmb A-V:%5.3f [%d:%d] A/Vms %d/%d D/B/S %d/%d/%d \r", + if( mp_msg_test(MSGT_STATUSLINE,MSGL_V) ) { + mp_msg(MSGT_STATUSLINE,MSGL_STATUS,"Pos:%6.1fs %6df (%2d%%) %3dfps Trem:%4dmin %3dmb A-V:%5.3f [%d:%d] A/Vms %d/%d D/B/S %d/%d/%d \r", mux_v->timer, decoded_frameno, (int)(p*100), (t>1) ? (int)(decoded_frameno/t+0.5) : 0, (p>0.001) ? (int)((t/p-t)/60) : 0, @@ -1452,7 +1452,7 @@ duplicatedframes, badframes, skippedframes ); } else - mp_msg(MSGT_AVSYNC,MSGL_STATUS,"Pos:%6.1fs %6df (%2d%%) %5.2ffps Trem:%4dmin %3dmb A-V:%5.3f [%d:%d]\r", + mp_msg(MSGT_STATUSLINE,MSGL_STATUS,"Pos:%6.1fs %6df (%2d%%) %5.2ffps Trem:%4dmin %3dmb A-V:%5.3f [%d:%d]\r", mux_v->timer, decoded_frameno, (int)(p*100), (t>1) ? (float)(decoded_frameno/t) : 0, (p>0.001) ? (int)((t/p-t)/60) : 0,
--- a/mp_msg.c Tue Jun 05 15:09:51 2007 +0000 +++ b/mp_msg.c Tue Jun 05 16:13:00 2007 +0000 @@ -191,6 +191,7 @@ "RADIO", "ASS", "LOADER", + "STATUSLINE", }; int c=v_colors[lev];
--- a/mp_msg.h Tue Jun 05 15:09:51 2007 +0000 +++ b/mp_msg.h Tue Jun 05 16:13:00 2007 +0000 @@ -103,6 +103,8 @@ #define MSGT_LOADER 44 // dll loader messages +#define MSGT_STATUSLINE 45 // playback/encoding status line + #define MSGT_MAX 64 void mp_msg_init(void);
--- a/mplayer.c Tue Jun 05 15:09:51 2007 +0000 +++ b/mplayer.c Tue Jun 05 16:13:00 2007 +0000 @@ -1181,11 +1181,11 @@ // end if (erase_to_end_of_line) { line[pos] = 0; - mp_msg(MSGT_AVSYNC, MSGL_STATUS, "%s%s\r", line, erase_to_end_of_line); + mp_msg(MSGT_STATUSLINE, MSGL_STATUS, "%s%s\r", line, erase_to_end_of_line); } else { memset(&line[pos], ' ', width - pos); line[width] = 0; - mp_msg(MSGT_AVSYNC, MSGL_STATUS, "%s\r", line); + mp_msg(MSGT_STATUSLINE, MSGL_STATUS, "%s\r", line); } free(line); }