[MPlayer-dev-eng] MPLAYER_VERBOSE environment variable?

Chuck Blake cb at mit.edu
Thu Jan 19 16:58:03 CET 2006


Diego Biurrun [diego at biurrun.de] wrote:
>Maybe say a word about negative values, it's not completely obvious that
>you can use negative values.
>
>Please send one patch that includes everything, makes applying it
>easier.

Here you go.  I tried to make the man page a little more explicit.

I also added a ".TP" I forgot to sep from the MPLAYER_HOME part.

More significantly I ammended the limitation note in the earlier
section for -msglevel.  That was just an oversight on my part earlier.

cb

Index: mp_msg.c
===================================================================
RCS file: /cvsroot/mplayer/main/mp_msg.c,v
retrieving revision 1.31
diff -u -w -r1.31 mp_msg.c
--- mp_msg.c	7 Dec 2005 05:12:07 -0000	1.31
+++ mp_msg.c	19 Jan 2006 15:48:59 -0000
@@ -26,6 +26,9 @@
 
 void mp_msg_init(){
     int i;
+    char *env = getenv("MPLAYER_VERBOSE");
+    if (env)
+        verbose = atoi(env);
 #ifdef USE_I18N
 #ifdef MP_DEBUG
     fprintf(stdout, "Using GNU internationalization\n");
Index: DOCS/man/en/mplayer.1
===================================================================
RCS file: /cvsroot/mplayer/main/DOCS/man/en/mplayer.1,v
retrieving revision 1.1206
diff -u -w -r1.1206 mplayer.1
--- DOCS/man/en/mplayer.1	16 Jan 2006 01:37:32 -0000	1.1206
+++ DOCS/man/en/mplayer.1	19 Jan 2006 15:49:02 -0000
@@ -552,7 +552,8 @@
 See '\-msglevel help' for a list of all modules.
 .br
 .I NOTE:
-Messages printed before the command line is loaded cannot be controlled.
+Messages printed before the command line is parsed can be controlled only
+by $MPLAYER_VERBOSE, which applies to all modules.
 .br
 Available levels:
 .PD 0
@@ -9184,6 +9185,13 @@
 .B MPLAYER_HOME
 Directory where MPlayer looks for user settings.
 .
+.TP
+.B MPLAYER_VERBOSE
+Set the initial verbosity level across all message modules.
+The default is 0.  Negative values result in fewer messages
+while positive values result in more.
+See also \-v and \-msglevel above.
+.
 .SS libaf:
 .
 .TP




More information about the MPlayer-dev-eng mailing list