diff options
-rw-r--r-- | cfg-common.h | 2 | ||||
-rw-r--r-- | mencoder.c | 6 | ||||
-rw-r--r-- | mp_msg.c | 1 | ||||
-rw-r--r-- | mp_msg.h | 2 | ||||
-rw-r--r-- | mplayer.c | 4 |
5 files changed, 10 insertions, 5 deletions
diff --git a/cfg-common.h b/cfg-common.h index d1817e3d04..234b6ab9e2 100644 --- a/cfg-common.h +++ b/cfg-common.h @@ -626,6 +626,7 @@ m_option_t msgl_config[]={ { "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 @@ m_option_t msgl_config[]={ " 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} diff --git a/mencoder.c b/mencoder.c index 089473711a..e1c7ef2823 100644 --- a/mencoder.c +++ b/mencoder.c @@ -1439,8 +1439,8 @@ if(sh_audio && !demuxer2){ (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 @@ if(sh_audio && !demuxer2){ 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, @@ -191,6 +191,7 @@ void mp_msg(int mod, int lev, const char *format, ... ){ "RADIO", "ASS", "LOADER", + "STATUSLINE", }; int c=v_colors[lev]; @@ -103,6 +103,8 @@ extern int verbose; #define MSGT_LOADER 44 // dll loader messages +#define MSGT_STATUSLINE 45 // playback/encoding status line + #define MSGT_MAX 64 void mp_msg_init(void); @@ -1181,11 +1181,11 @@ static void print_status(float a_pos, float a_v, float corr) // 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); } |