[MPlayer-cvslog] r23478 - in trunk: cfg-common.h mencoder.c mp_msg.c mp_msg.h mplayer.c

diego subversion at mplayerhq.hu
Tue Jun 5 18:13:00 CEST 2007


Author: diego
Date: Tue Jun  5 18:13:00 2007
New Revision: 23478

Log:
Create a new MSGT for just the status line.


Modified:
   trunk/cfg-common.h
   trunk/mencoder.c
   trunk/mp_msg.c
   trunk/mp_msg.h
   trunk/mplayer.c

Modified: trunk/cfg-common.h
==============================================================================
--- trunk/cfg-common.h	(original)
+++ trunk/cfg-common.h	Tue Jun  5 18:13:00 2007
@@ -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}
 

Modified: trunk/mencoder.c
==============================================================================
--- trunk/mencoder.c	(original)
+++ trunk/mencoder.c	Tue Jun  5 18:13:00 2007
@@ -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, 

Modified: trunk/mp_msg.c
==============================================================================
--- trunk/mp_msg.c	(original)
+++ trunk/mp_msg.c	Tue Jun  5 18:13:00 2007
@@ -191,6 +191,7 @@ void mp_msg(int mod, int lev, const char
                                 "RADIO",
                                 "ASS",
                                 "LOADER",
+                                "STATUSLINE",
         };
 
         int c=v_colors[lev];

Modified: trunk/mp_msg.h
==============================================================================
--- trunk/mp_msg.h	(original)
+++ trunk/mp_msg.h	Tue Jun  5 18:13:00 2007
@@ -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);

Modified: trunk/mplayer.c
==============================================================================
--- trunk/mplayer.c	(original)
+++ trunk/mplayer.c	Tue Jun  5 18:13:00 2007
@@ -1181,11 +1181,11 @@ static void print_status(float a_pos, fl
   // 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);
 }



More information about the MPlayer-cvslog mailing list