changeset 17440:de9a36b1082c

MPLAYER_VERBOSE, new enviorment variable to control verbosity before init
author ods15
date Fri, 20 Jan 2006 20:38:46 +0000
parents f6e39517d5b6
children 8218cada331c
files DOCS/man/en/mplayer.1 mp_msg.c
diffstat 2 files changed, 12 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/DOCS/man/en/mplayer.1	Fri Jan 20 19:12:22 2006 +0000
+++ b/DOCS/man/en/mplayer.1	Fri Jan 20 20:38:46 2006 +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
--- a/mp_msg.c	Fri Jan 20 19:12:22 2006 +0000
+++ b/mp_msg.c	Fri Jan 20 20:38:46 2006 +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");