# HG changeset patch # User ods15 # Date 1137789526 0 # Node ID de9a36b1082cbe8aa589529d0a41f450651c2b39 # Parent f6e39517d5b6dd3055d0f76efeaa710f816642bc MPLAYER_VERBOSE, new enviorment variable to control verbosity before init diff -r f6e39517d5b6 -r de9a36b1082c DOCS/man/en/mplayer.1 --- 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 diff -r f6e39517d5b6 -r de9a36b1082c mp_msg.c --- 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");