changeset 8027:b9da278e4c92

verbose can be negative
author arpi
date Fri, 01 Nov 2002 17:46:45 +0000
parents b465ba5897a3
children c06fa0b05c1c
files libao2/ao_alsa1x.c libao2/ao_alsa5.c libao2/ao_alsa9.c libao2/ao_oss.c libao2/ao_sdl.c libao2/ao_sun.c libmpcodecs/ad_acm.c libmpcodecs/dec_audio.c libmpcodecs/dec_video.c libmpcodecs/vd_vfw.c libmpdemux/asfheader.c libmpdemux/aviheader.c libmpdemux/demux_ogg.c libmpdemux/demux_real.c libmpdemux/network.c libmpdemux/video.c libvo/vo_dga.c libvo/x11_common.c mencoder.c mplayer.c postproc/swscale.c vobsub.c
diffstat 22 files changed, 82 insertions(+), 96 deletions(-) [+]
line wrap: on
line diff
--- a/libao2/ao_alsa1x.c	Fri Nov 01 16:40:15 2002 +0000
+++ b/libao2/ao_alsa1x.c	Fri Nov 01 17:46:45 2002 +0000
@@ -212,7 +212,7 @@
 
     alsa_handler = NULL;
 
-    if (verbose)
+    if (verbose>0)
 	printf("alsa-init: compiled for ALSA-%s\n", SND_LIB_VERSION_STR);
 
     if ((err = snd_card_next(&cards)) < 0 || cards < 0)
@@ -357,7 +357,7 @@
 	sprintf(devstr, "iec958:AES0=0x%x,AES1=0x%x,AES2=0x%x,AES3=0x%x", 
 		s[0], s[1], s[2], s[3]);
 
-	if (verbose)
+	if (verbose>0)
 	  printf("alsa-spdif-init: playing AC3, %i channels\n", channels);
 	break;
       case 4:
@@ -404,7 +404,7 @@
 	    return(0);
 	  }
 	
-	if (verbose)
+	if (verbose>0)
 	  printf("alsa-init: got device=%i, subdevice=%i\n", tmp_device, tmp_subdevice);
 
 	if ((err = snprintf(alsa_device, ALSA_DEVICE_SIZE, "hw:%1d,%1d", tmp_device, tmp_subdevice)) <= 0)
@@ -446,7 +446,7 @@
 	case 1:
 	  alsa_fragcount = 16;
 	  chunk_size = 512;
-	  if (verbose) {
+	  if (verbose>0) {
 	    printf("alsa-init: buffersize set manually to 8192\n");
 	    printf("alsa-init: chunksize set manually to 512\n");
 	  }
@@ -454,7 +454,7 @@
 	case 2:
 	  alsa_fragcount = 8;
 	  chunk_size = 1024;
-	  if (verbose) {
+	  if (verbose>0) {
 	    printf("alsa-init: buffersize set manually to 8192\n");
 	    printf("alsa-init: chunksize set manually to 1024\n");
 	  }
@@ -462,7 +462,7 @@
 	case 3:
 	  alsa_fragcount = 32;
 	  chunk_size = 512;
-	  if (verbose) {
+	  if (verbose>0) {
 	    printf("alsa-init: buffersize set manually to 16384\n");
 	    printf("alsa-init: chunksize set manually to 512\n");
 	  }
@@ -470,7 +470,7 @@
 	case 4:
 	  alsa_fragcount = 16;
 	  chunk_size = 1024;
-	  if (verbose) {
+	  if (verbose>0) {
 	    printf("alsa-init: buffersize set manually to 16384\n");
 	    printf("alsa-init: chunksize set manually to 1024\n");
 	  }
@@ -507,7 +507,7 @@
       if ((err = snd_pcm_nonblock(alsa_handler, set_block_mode)) < 0) {
 	printf("alsa-init: error set block-mode %s\n", snd_strerror(err));
       }
-      else if (verbose) {
+      else if (verbose>0) {
 	printf("alsa-init: pcm opend in %s\n", str_block_mode);
       }
       
@@ -580,7 +580,7 @@
 		   snd_strerror(err));
 	    return(0);
 	  }
-	if (verbose)
+	if (verbose>0)
 	  printf("alsa-init: buffer_time: %d, period_time :%d\n",alsa_buffer_time, err);
       }
 #endif
@@ -593,7 +593,7 @@
 	    printf("alsa-init: unable to set periodsize: %s\n", snd_strerror(err));
 	    return(0);
 	  }
-	else if (verbose) {
+	else if (verbose>0) {
 	  printf("alsa-init: chunksize set to %i\n", chunk_size);
 	}
 
@@ -602,7 +602,7 @@
 	  alsa_fragcount = period_val;			
 	}
 
-	if (verbose)
+	if (verbose>0)
 	  printf("alsa-init: current val=%i, fragcount=%i\n", period_val, alsa_fragcount);
 
 	if ((err = snd_pcm_hw_params_set_periods(alsa_handler, alsa_hwparams, alsa_fragcount, 0)) < 0) {
@@ -629,7 +629,7 @@
 	}
       else {
 	ao_data.buffersize = err;
-	if (verbose)
+	if (verbose>0)
 	  printf("alsa-init: got buffersize=%i\n", ao_data.buffersize);
       }
 
@@ -661,7 +661,7 @@
 	  bits_per_frame = bits_per_sample * channels;
 	  chunk_bytes = chunk_size * bits_per_frame / 8;
 
-	  if (verbose) {
+	  if (verbose>0) {
 	    printf("alsa-init: bits per sample (bps)=%i, bits per frame (bpf)=%i, chunk_bytes=%i\n",bits_per_sample,bits_per_frame,chunk_bytes);}
 
 	}//end swparams
@@ -725,7 +725,7 @@
 	}
     }
     else {
-      if (verbose)
+      if (verbose>0)
 	printf("alsa-pause: paused nonblock\n");
 
       return;
@@ -762,7 +762,7 @@
 	  return;
 	}
     } else {
-      if (verbose)
+      if (verbose>0)
 	printf("alsa-reset: reset nonblocked");
       return;
     }
@@ -1051,7 +1051,7 @@
 	str_status = "running";
       break;
     case SND_PCM_STATE_PAUSED:
-      if (verbose) printf("alsa-space: paused");
+      if (verbose>0) printf("alsa-space: paused");
       str_status = "paused";
       ret = 0;
       break;
@@ -1069,7 +1069,7 @@
       }
     }
 
-    if (verbose && str_status != "running")
+    if (verbose>0 && str_status != "running")
       printf("alsa-space: free space = %i, status=%i, %s --\n", ret, status, str_status);
     snd_pcm_status_free(status);
     
--- a/libao2/ao_alsa5.c	Fri Nov 01 16:40:15 2002 +0000
+++ b/libao2/ao_alsa5.c	Fri Nov 01 17:46:45 2002 +0000
@@ -17,8 +17,6 @@
 
 #include "../mp_msg.h"
 
-extern int verbose;
-
 static ao_info_t info = 
 {
     "ALSA-0.5.x audio output",
--- a/libao2/ao_alsa9.c	Fri Nov 01 16:40:15 2002 +0000
+++ b/libao2/ao_alsa9.c	Fri Nov 01 17:46:45 2002 +0000
@@ -212,7 +212,7 @@
 
     alsa_handler = NULL;
 
-    if (verbose)
+    if (verbose>0)
 	printf("alsa-init: compiled for ALSA-%s\n", SND_LIB_VERSION_STR);
 
     if ((err = snd_card_next(&cards)) < 0 || cards < 0)
@@ -357,7 +357,7 @@
 	sprintf(devstr, "iec958:AES0=0x%x,AES1=0x%x,AES2=0x%x,AES3=0x%x", 
 		s[0], s[1], s[2], s[3]);
 
-	if (verbose)
+	if (verbose>0)
 	  printf("alsa-spdif-init: playing AC3, %i channels\n", channels);
 	break;
       case 4:
@@ -404,7 +404,7 @@
 	    return(0);
 	  }
 	
-	if (verbose)
+	if (verbose>0)
 	  printf("alsa-init: got device=%i, subdevice=%i\n", tmp_device, tmp_subdevice);
 
 	if ((err = snprintf(alsa_device, ALSA_DEVICE_SIZE, "hw:%1d,%1d", tmp_device, tmp_subdevice)) <= 0)
@@ -446,7 +446,7 @@
 	case 1:
 	  alsa_fragcount = 16;
 	  chunk_size = 512;
-	  if (verbose) {
+	  if (verbose>0) {
 	    printf("alsa-init: buffersize set manually to 8192\n");
 	    printf("alsa-init: chunksize set manually to 512\n");
 	  }
@@ -454,7 +454,7 @@
 	case 2:
 	  alsa_fragcount = 8;
 	  chunk_size = 1024;
-	  if (verbose) {
+	  if (verbose>0) {
 	    printf("alsa-init: buffersize set manually to 8192\n");
 	    printf("alsa-init: chunksize set manually to 1024\n");
 	  }
@@ -462,7 +462,7 @@
 	case 3:
 	  alsa_fragcount = 32;
 	  chunk_size = 512;
-	  if (verbose) {
+	  if (verbose>0) {
 	    printf("alsa-init: buffersize set manually to 16384\n");
 	    printf("alsa-init: chunksize set manually to 512\n");
 	  }
@@ -470,7 +470,7 @@
 	case 4:
 	  alsa_fragcount = 16;
 	  chunk_size = 1024;
-	  if (verbose) {
+	  if (verbose>0) {
 	    printf("alsa-init: buffersize set manually to 16384\n");
 	    printf("alsa-init: chunksize set manually to 1024\n");
 	  }
@@ -507,7 +507,7 @@
       if ((err = snd_pcm_nonblock(alsa_handler, set_block_mode)) < 0) {
 	printf("alsa-init: error set block-mode %s\n", snd_strerror(err));
       }
-      else if (verbose) {
+      else if (verbose>0) {
 	printf("alsa-init: pcm opend in %s\n", str_block_mode);
       }
       
@@ -580,7 +580,7 @@
 		   snd_strerror(err));
 	    return(0);
 	  }
-	if (verbose)
+	if (verbose>0)
 	  printf("alsa-init: buffer_time: %d, period_time :%d\n",alsa_buffer_time, err);
       }
 #endif
@@ -593,7 +593,7 @@
 	    printf("alsa-init: unable to set periodsize: %s\n", snd_strerror(err));
 	    return(0);
 	  }
-	else if (verbose) {
+	else if (verbose>0) {
 	  printf("alsa-init: chunksize set to %i\n", chunk_size);
 	}
 
@@ -602,7 +602,7 @@
 	  alsa_fragcount = period_val;			
 	}
 
-	if (verbose)
+	if (verbose>0)
 	  printf("alsa-init: current val=%i, fragcount=%i\n", period_val, alsa_fragcount);
 
 	if ((err = snd_pcm_hw_params_set_periods(alsa_handler, alsa_hwparams, alsa_fragcount, 0)) < 0) {
@@ -629,7 +629,7 @@
 	}
       else {
 	ao_data.buffersize = err;
-	if (verbose)
+	if (verbose>0)
 	  printf("alsa-init: got buffersize=%i\n", ao_data.buffersize);
       }
 
@@ -661,7 +661,7 @@
 	  bits_per_frame = bits_per_sample * channels;
 	  chunk_bytes = chunk_size * bits_per_frame / 8;
 
-	  if (verbose) {
+	  if (verbose>0) {
 	    printf("alsa-init: bits per sample (bps)=%i, bits per frame (bpf)=%i, chunk_bytes=%i\n",bits_per_sample,bits_per_frame,chunk_bytes);}
 
 	}//end swparams
@@ -725,7 +725,7 @@
 	}
     }
     else {
-      if (verbose)
+      if (verbose>0)
 	printf("alsa-pause: paused nonblock\n");
 
       return;
@@ -762,7 +762,7 @@
 	  return;
 	}
     } else {
-      if (verbose)
+      if (verbose>0)
 	printf("alsa-reset: reset nonblocked");
       return;
     }
@@ -1051,7 +1051,7 @@
 	str_status = "running";
       break;
     case SND_PCM_STATE_PAUSED:
-      if (verbose) printf("alsa-space: paused");
+      if (verbose>0) printf("alsa-space: paused");
       str_status = "paused";
       ret = 0;
       break;
@@ -1069,7 +1069,7 @@
       }
     }
 
-    if (verbose && str_status != "running")
+    if (verbose>0 && str_status != "running")
       printf("alsa-space: free space = %i, status=%i, %s --\n", ret, status, str_status);
     snd_pcm_status_free(status);
     
--- a/libao2/ao_oss.c	Fri Nov 01 16:40:15 2002 +0000
+++ b/libao2/ao_oss.c	Fri Nov 01 17:46:45 2002 +0000
@@ -20,8 +20,6 @@
 #include "audio_out.h"
 #include "audio_out_internal.h"
 
-extern int verbose;
-
 static ao_info_t info = 
 {
 	"OSS/ioctl audio output",
--- a/libao2/ao_sdl.c	Fri Nov 01 16:40:15 2002 +0000
+++ b/libao2/ao_sdl.c	Fri Nov 01 17:46:45 2002 +0000
@@ -13,6 +13,9 @@
 #include <stdio.h>
 #include <stdlib.h>
 
+#include "../config.h"
+#include "../mp_msg.h"
+
 #include "audio_out.h"
 #include "audio_out_internal.h"
 #include "afmt.h"
@@ -30,9 +33,6 @@
 
 LIBAO_EXTERN(sdl)
 
-
-extern int verbose;
-
 // Samplesize used by the SDLlib AudioSpec struct
 #define SAMPLESIZE 1024
 
@@ -153,11 +153,11 @@
 	/* Allocate ring-buffer memory */
 	for(i=0;i<NUM_BUFS;i++) buffer[i]=(unsigned char *) malloc(BUFFSIZE);
 
-	printf("SDL: Samplerate: %iHz Channels: %s Format %s\n", rate, (channels > 1) ? "Stereo" : "Mono", audio_out_format_name(format));
+	mp_msg(MSGT_AO,MSGL_INFO,"SDL: Samplerate: %iHz Channels: %s Format %s\n", rate, (channels > 1) ? "Stereo" : "Mono", audio_out_format_name(format));
 
 	if(ao_subdevice) {
 		setenv("SDL_AUDIODRIVER", ao_subdevice, 1);
-		printf("SDL: using %s audio driver\n", ao_subdevice);
+		mp_msg(MSGT_AO,MSGL_INFO,"SDL: using %s audio driver\n", ao_subdevice);
 	}
 
 	ao_data.channels=channels;
@@ -189,7 +189,7 @@
 		aspec.format = AUDIO_U16MSB;
 	    break;
 	    default:
-                printf("SDL: Unsupported audio format: 0x%x.\n", format);
+                mp_msg(MSGT_AO,MSGL_WARN,"SDL: Unsupported audio format: 0x%x.\n", format);
                 return 0;
 	}
 
@@ -211,13 +211,13 @@
 
 	/* initialize the SDL Audio system */
         if (SDL_Init (SDL_INIT_AUDIO/*|SDL_INIT_NOPARACHUTE*/)) {
-                printf("SDL: Initializing of SDL Audio failed: %s.\n", SDL_GetError());
+                mp_msg(MSGT_AO,MSGL_ERR,"SDL: Initializing of SDL Audio failed: %s.\n", SDL_GetError());
                 return 0;
         }
 
 	/* Open the audio device and start playing sound! */
 	if(SDL_OpenAudio(&aspec, &obtained) < 0) {
-        	printf("SDL: Unable to open audio: %s\n", SDL_GetError());
+        	mp_msg(MSGT_AO,MSGL_ERR,"SDL: Unable to open audio: %s\n", SDL_GetError());
         	return(0);
 	} 
 
@@ -245,11 +245,11 @@
 		ao_data.format = AFMT_U16_BE;
 	    break;
 	    default:
-                printf("SDL: Unsupported SDL audio format: 0x%x.\n", obtained.format);
+                mp_msg(MSGT_AO,MSGL_WARN,"SDL: Unsupported SDL audio format: 0x%x.\n", obtained.format);
                 return 0;
 	}
 
-	if(verbose) printf("SDL: buf size = %d\n",obtained.size);
+	mp_msg(MSGT_AO,MSGL_V,"SDL: buf size = %d\n",obtained.size);
 	ao_data.buffersize=obtained.size;
 	
 	/* unsilence audio, if callback is ready */
@@ -260,7 +260,7 @@
 
 // close audio device
 static void uninit(){
-	if(verbose) printf("SDL: Audio Subsystem shutting down!\n");
+	mp_msg(MSGT_AO,MSGL_V,"SDL: Audio Subsystem shutting down!\n");
 	SDL_CloseAudio();
 	SDL_QuitSubSystem(SDL_INIT_AUDIO);
 }
--- a/libao2/ao_sun.c	Fri Nov 01 16:40:15 2002 +0000
+++ b/libao2/ao_sun.c	Fri Nov 01 17:46:45 2002 +0000
@@ -125,19 +125,19 @@
     info.play.encoding = AUDIO_ENCODING_LINEAR;
     info.play.samples = 0;
     if (ioctl(fd, AUDIO_SETINFO, &info)) {
-	if (verbose)
+	if (verbose>0)
 	    printf("rtsc: SETINFO failed\n");
 	goto error;
     }
     
     if (write(fd, silence, len) != len) {
-	if (verbose)
+	if (verbose>0)
 	    printf("rtsc: write failed");
 	goto error;
     }
 
     if (ioctl(fd, AUDIO_GETINFO, &info)) {
-	if (verbose)
+	if (verbose>0)
 	    perror("rtsc: GETINFO1");
 	goto error;
     }
@@ -159,18 +159,18 @@
 	    break;
 
 	if (ioctl(fd, AUDIO_GETINFO, &info)) {
-	    if (verbose)
+	    if (verbose>0)
 		perror("rtsc: GETINFO2 failed");
 	    goto error;
 	}
 	if (info.play.samples < last_samplecnt) {
-	    if (verbose)
+	    if (verbose>0)
 		printf("rtsc: %d > %d?\n", last_samplecnt, info.play.samples);
 	    goto error;
 	}
 
 	if ((increment = info.play.samples - last_samplecnt) > 0) {
-	    if (verbose)
+	    if (verbose>0)
 		printf("ao_sun: sample counter increment: %d\n", increment);
 	    if (increment < min_increment) {
 		min_increment = increment;
@@ -193,7 +193,7 @@
     if (min_increment < 2000)
 	rtsc_ok = RTSC_ENABLED;
 
-    if (verbose)
+    if (verbose>0)
 	printf("ao_sun: minimum sample counter increment per 10msec interval: %d\n"
 	       "\t%susing sample counter based timing code\n",
 	       min_increment, rtsc_ok == RTSC_ENABLED ? "" : "not ");
--- a/libmpcodecs/ad_acm.c	Fri Nov 01 16:40:15 2002 +0000
+++ b/libmpcodecs/ad_acm.c	Fri Nov 01 17:46:45 2002 +0000
@@ -71,7 +71,7 @@
 //    priv->o_wf->wBitsPerSample = inf_fmt->wBitsPerSample;
     priv->o_wf->cbSize = 0;
     
-    if (verbose)
+    if (verbose>0)
     {
 	mp_msg(MSGT_DECAUDIO, MSGL_V, "Input format:\n");
 	print_wave_header(in_fmt);
@@ -219,8 +219,7 @@
       }
 //      return -1;
     }
-    if(verbose>1)
-      mp_msg(MSGT_WIN32,MSGL_DBG2,"acm converted %d -> %d\n",ash.cbSrcLengthUsed,ash.cbDstLengthUsed);
+    mp_msg(MSGT_WIN32,MSGL_DBG2,"acm converted %d -> %d\n",ash.cbSrcLengthUsed,ash.cbDstLengthUsed);
     if(ash.cbSrcLengthUsed>=sh_audio->a_in_buffer_len){
       sh_audio->a_in_buffer_len=0;
     } else {
--- a/libmpcodecs/dec_audio.c	Fri Nov 01 16:40:15 2002 +0000
+++ b/libmpcodecs/dec_audio.c	Fri Nov 01 17:46:45 2002 +0000
@@ -6,8 +6,6 @@
 #include "mp_msg.h"
 #include "help_mp.h"
 
-extern int verbose; // defined in mplayer.c
-
 #include "stream.h"
 #include "demuxer.h"
 
--- a/libmpcodecs/dec_video.c	Fri Nov 01 16:40:15 2002 +0000
+++ b/libmpcodecs/dec_video.c	Fri Nov 01 17:46:45 2002 +0000
@@ -14,8 +14,6 @@
 #include "linux/timer.h"
 #include "linux/shmem.h"
 
-extern int verbose; // defined in mplayer.c
-
 #include "stream.h"
 #include "demuxer.h"
 #include "parse_es.h"
--- a/libmpcodecs/vd_vfw.c	Fri Nov 01 16:40:15 2002 +0000
+++ b/libmpcodecs/vd_vfw.c	Fri Nov 01 17:46:45 2002 +0000
@@ -232,9 +232,9 @@
 	set_csp(priv->o_bih,sh->codec->outfmt[sh->outfmtidx]);
 
     mp_msg(MSGT_WIN32, MSGL_V, "Input format:\n");
-    if(verbose) print_video_header(sh->bih);
+    if(verbose>0) print_video_header(sh->bih);
     mp_msg(MSGT_WIN32, MSGL_V, "Output format:\n");
-    if(verbose) print_video_header(priv->o_bih);
+    if(verbose>0) print_video_header(priv->o_bih);
 
     // set postprocessing level in xvid/divx4 .dll
     ICSendMessage(priv->handle, ICM_USER+80, (long)(&divx_quality), 0);
--- a/libmpdemux/asfheader.c	Fri Nov 01 16:40:15 2002 +0000
+++ b/libmpdemux/asfheader.c	Fri Nov 01 17:46:45 2002 +0000
@@ -151,7 +151,7 @@
     case ASF_GUID_PREFIX_stream_header:
       stream_read(demuxer->stream,(char*) &streamh,sizeof(streamh));
       le2me_ASF_stream_header_t(&streamh);
-      if(verbose){
+      if(verbose>0){
         mp_msg(MSGT_HEADER,MSGL_V,"stream type: %s\n",asf_chunk_type(streamh.type));
 	mp_msg(MSGT_HEADER,MSGL_V,"stream concealment: %s\n",asf_chunk_type(streamh.concealment));
 	mp_msg(MSGT_HEADER,MSGL_V,"type: %d bytes,  stream: %d bytes  ID: %d\n",(int)streamh.type_size,(int)streamh.stream_size,(int)streamh.stream_no);
@@ -233,7 +233,7 @@
         if( contenth.title_size!=0 ) {
           string=(char*)malloc(contenth.title_size);
           stream_read(demuxer->stream, string, contenth.title_size);
-          if(verbose)
+          if(verbose>0)
             print_asf_string(" Title: ", string, contenth.title_size);
 	  else
 	    pack_asf_string(string, contenth.title_size);
@@ -243,7 +243,7 @@
         if( contenth.author_size!=0 ) {
           string=(char*)realloc((void*)string, contenth.author_size);
           stream_read(demuxer->stream, string, contenth.author_size);
-          if(verbose)
+          if(verbose>0)
             print_asf_string(" Author: ", string, contenth.author_size);
 	  else
 	    pack_asf_string(string, contenth.author_size);
@@ -253,7 +253,7 @@
         if( contenth.copyright_size!=0 ) {
           string=(char*)realloc((void*)string, contenth.copyright_size);
           stream_read(demuxer->stream, string, contenth.copyright_size);
-          if(verbose)
+          if(verbose>0)
             print_asf_string(" Copyright: ", string, contenth.copyright_size);
 	  else
 	    pack_asf_string(string, contenth.copyright_size);
@@ -263,7 +263,7 @@
         if( contenth.comment_size!=0 ) {
           string=(char*)realloc((void*)string, contenth.comment_size);
           stream_read(demuxer->stream, string, contenth.comment_size);
-          if(verbose)
+          if(verbose>0)
             print_asf_string(" Comment: ", string, contenth.comment_size);
 	  else
 	    pack_asf_string(string, contenth.comment_size);
@@ -273,7 +273,7 @@
         if( contenth.rating_size!=0 ) {
           string=(char*)realloc((void*)string, contenth.rating_size);
           stream_read(demuxer->stream, string, contenth.rating_size);
-          if(verbose)
+          if(verbose>0)
             print_asf_string(" Rating: ", string, contenth.rating_size);
         }
 	mp_msg(MSGT_HEADER,MSGL_V,"\n");
--- a/libmpdemux/aviheader.c	Fri Nov 01 16:40:15 2002 +0000
+++ b/libmpdemux/aviheader.c	Fri Nov 01 17:46:45 2002 +0000
@@ -156,7 +156,7 @@
       stream_read(demuxer->stream,(char*) &avih,MIN(size2,sizeof(avih)));
       le2me_MainAVIHeader(&avih); // swap to machine endian
       chunksize-=MIN(size2,sizeof(avih));
-      if(verbose) print_avih(&avih); // else print_avih_flags(&avih);
+      if(verbose>0) print_avih(&avih); // else print_avih_flags(&avih);
       break;
     case ckidSTREAMHEADER: {      // read 'strh'
       AVIStreamHeader h;
--- a/libmpdemux/demux_ogg.c	Fri Nov 01 16:40:15 2002 +0000
+++ b/libmpdemux/demux_ogg.c	Fri Nov 01 17:46:45 2002 +0000
@@ -542,7 +542,7 @@
 	ogg_d->subs[ogg_d->num_sub].samplerate = sh_v->fps;
 	n_video++;
 	mp_msg(MSGT_DEMUX,MSGL_V,"OGG stream %d is video (old hdr)\n",ogg_d->num_sub);
-	if(verbose) print_video_header(sh_v->bih);
+	if(verbose>0) print_video_header(sh_v->bih);
 	// Old audio header
       } else if(get_uint32(pack.packet+96) == 0x05589F81) {
 	unsigned int extra_size;
@@ -563,7 +563,7 @@
 	ogg_d->subs[ogg_d->num_sub].samplerate = sh_a->samplerate; // * sh_a->channels;
 	n_audio++;
 	mp_msg(MSGT_DEMUX,MSGL_V,"OGG stream %d is audio (old hdr)\n",ogg_d->num_sub);
-	if(verbose) print_wave_header(sh_a->wf);
+	if(verbose>0) print_wave_header(sh_a->wf);
       } else
 	mp_msg(MSGT_DEMUX,MSGL_WARN,"OGG stream %d contain an old header but the header type is unknow\n",ogg_d->num_sub);
 
@@ -591,7 +591,7 @@
 	ogg_d->subs[ogg_d->num_sub].samplerate= sh_v->fps;
 	n_video++;
 	mp_msg(MSGT_DEMUX,MSGL_V,"OGG stream %d is video (new hdr)\n",ogg_d->num_sub);
-	if(verbose) print_video_header(sh_v->bih);
+	if(verbose>0) print_video_header(sh_v->bih);
 	/// New audio header
       } else if(strncmp(st->streamtype,"audio",5) == 0) {
 	char buffer[5];
@@ -614,7 +614,7 @@
 	ogg_d->subs[ogg_d->num_sub].samplerate = sh_a->samplerate; // * sh_a->channels;
 	n_audio++;
 	mp_msg(MSGT_DEMUX,MSGL_V,"OGG stream %d is audio (new hdr)\n",ogg_d->num_sub);
-	if(verbose) print_wave_header(sh_a->wf);
+	if(verbose>0) print_wave_header(sh_a->wf);
 
 	/// Check for text (subtitles) header
       } else if (strncmp(st->streamtype, "text", 4) == 0) {
--- a/libmpdemux/demux_real.c	Fri Nov 01 16:40:15 2002 +0000
+++ b/libmpdemux/demux_real.c	Fri Nov 01 17:46:45 2002 +0000
@@ -8,6 +8,9 @@
     TODO: fix the whole syncing mechanism
     
     $Log$
+    Revision 1.29  2002/11/01 17:46:43  arpi
+    verbose can be negative
+
     Revision 1.28  2002/10/10 23:24:15  arpi
     stream selection cleanup, fixed -nosound
 
@@ -193,7 +196,7 @@
     real_index_table_t *index;
     int i, entries;
 
-    if (!verbose)
+    if (verbose<=0)
 	return;
     
     if (stream_id > MAX_STREAMS)
--- a/libmpdemux/network.c	Fri Nov 01 16:40:15 2002 +0000
+++ b/libmpdemux/network.c	Fri Nov 01 17:46:45 2002 +0000
@@ -502,7 +502,7 @@
 			}
 
 			*fd_out=fd;
-			if( verbose ) {
+			if( verbose>0 ) {
 				http_debug_hdr( http_hdr );
 			}
 			
--- a/libmpdemux/video.c	Fri Nov 01 16:40:15 2002 +0000
+++ b/libmpdemux/video.c	Fri Nov 01 17:46:45 2002 +0000
@@ -97,7 +97,7 @@
       int i=sync_video_packet(d_video);
       if(i==0x1B3) break; // found it!
       if(!i || !skip_video_packet(d_video)){
-        if(verbose)  mp_msg(MSGT_DECVIDEO,MSGL_V,"NONE :(\n");
+        if(verbose>0)  mp_msg(MSGT_DECVIDEO,MSGL_V,"NONE :(\n");
         mp_msg(MSGT_DECVIDEO,MSGL_ERR,MSGTR_MpegNoSequHdr);
 	return 0;
       }
--- a/libvo/vo_dga.c	Fri Nov 01 16:40:15 2002 +0000
+++ b/libvo/vo_dga.c	Fri Nov 01 17:46:45 2002 +0000
@@ -235,8 +235,6 @@
 #endif
 
 
-extern int       verbose;          
-
 static int       vo_dga_src_format;
 static int       vo_dga_width;           // bytes per line in framebuffer
 static int       vo_dga_vp_width;        // visible pixels per line in 
--- a/libvo/x11_common.c	Fri Nov 01 16:40:15 2002 +0000
+++ b/libvo/x11_common.c	Fri Nov 01 17:46:45 2002 +0000
@@ -50,8 +50,6 @@
 int ice_layer=12;
 int stop_xscreensaver=0;
 
-extern int verbose;
-
 static int dpms_disabled=0;
 static int timeout_save=0;
 static int xscreensaver_was_running=0;
--- a/mencoder.c	Fri Nov 01 16:40:15 2002 +0000
+++ b/mencoder.c	Fri Nov 01 17:46:45 2002 +0000
@@ -789,7 +789,7 @@
     lame_set_scale(lame,lame_param_scale);
 }
 lame_init_params(lame);
-if(verbose){
+if(verbose>0){
     lame_print_config(lame);
     lame_print_internals(lame);
 }
@@ -1113,7 +1113,7 @@
 	    (int)demuxer->filepos,
 	    (int)demuxer->movi_end);
 #else
-	if(verbose) {
+	if(verbose>0) {
 		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",
 	    	mux_v->timer, decoded_frameno, (int)(p*100),
 	    	(t>1) ? (int)(decoded_frameno/t+0.5) : 0,
--- a/mplayer.c	Fri Nov 01 16:40:15 2002 +0000
+++ b/mplayer.c	Fri Nov 01 17:46:45 2002 +0000
@@ -682,7 +682,7 @@
     }
 
     // Many users forget to include command line in bugreports...
-    if(verbose){
+    if(verbose>0){
       mp_msg(MSGT_CPLAYER, MSGL_INFO, "CommandLine:");
       for(i=1;i<argc;i++)printf(" '%s'",argv[i]);
       printf("\n");
@@ -1353,14 +1353,14 @@
 
 if(!sh_audio){
   mp_msg(MSGT_CPLAYER,MSGL_INFO,MSGTR_NoSound);
-  if(verbose) mp_msg(MSGT_CPLAYER,MSGL_V,"Freeing %d unused audio chunks\n",d_audio->packs);
+  mp_msg(MSGT_CPLAYER,MSGL_V,"Freeing %d unused audio chunks\n",d_audio->packs);
   ds_free_packs(d_audio); // free buffered chunks
   d_audio->id=-2;         // do not read audio chunks
   //uninit_player(INITED_AO); // close device
 }
 if(!sh_video){
    mp_msg(MSGT_CPLAYER,MSGL_INFO,MSGTR_Video_NoVideo);
-   if(verbose) mp_msg(MSGT_CPLAYER,MSGL_V,"Freeing %d unused video chunks\n",d_video->packs);
+   mp_msg(MSGT_CPLAYER,MSGL_V,"Freeing %d unused video chunks\n",d_video->packs);
    ds_free_packs(d_video);
    d_video->id=-2;
    //if(!fixed_vo) uninit_player(INITED_VO);
@@ -2525,7 +2525,7 @@
       if(sh_audio){
 	if(d_audio->packs == 0)
 	  ds_fill_buffer(d_audio);
-	if(verbose){
+	if(verbose>0){
 	    float a_pts=d_audio->pts;
             a_pts+=(ds_tell_pts(d_audio)-sh_audio->a_in_buffer_len)/(float)sh_audio->i_bps;
 	    mp_msg(MSGT_AVSYNC,MSGL_V,"SEEK: A: %5.3f  V: %5.3f  A-V: %5.3f   \n",a_pts,d_video->pts,a_pts-d_video->pts);
--- a/postproc/swscale.c	Fri Nov 01 16:40:15 2002 +0000
+++ b/postproc/swscale.c	Fri Nov 01 17:46:45 2002 +0000
@@ -2300,7 +2300,7 @@
 			MSG_INFO("using C\n");
 	}
 
-	if((flags & SWS_PRINT_INFO) && verbose)
+	if((flags & SWS_PRINT_INFO) && verbose>0)
 	{
 		if(cpuCaps.hasMMX)
 		{
--- a/vobsub.c	Fri Nov 01 16:40:15 2002 +0000
+++ b/vobsub.c	Fri Nov 01 17:46:45 2002 +0000
@@ -30,8 +30,6 @@
 
 extern int vobsub_id;
 
-extern int verbose;
-
 /**********************************************************************
  * RAR stream handling
  * The RAR file must have the same basename as the file to open
@@ -625,8 +623,7 @@
 	memcpy(vob->spu_streams[index].id, id, idlen);
     }
     vob->spu_streams_current = index;
-    if (verbose)
-	mp_msg(MSGT_VOBSUB,MSGL_V,"[vobsub] subtitle (vobsubid): %d language %s\n",
+    mp_msg(MSGT_VOBSUB,MSGL_V,"[vobsub] subtitle (vobsubid): %d language %s\n",
 		index, vob->spu_streams[index].id);
     return 0;
 }
@@ -919,8 +916,7 @@
 	    //custom colors: ON/OFF, tridx: XXXX, colors: XXXXXX, XXXXXX, XXXXXX,XXXXXX
 	    res = vobsub_parse_cuspal(vob, line) + vobsub_parse_tridx(line) + vobsub_parse_custom(vob, line);
 	else {
-	    if (verbose)
-		mp_msg(MSGT_VOBSUB,MSGL_V, "vobsub: ignoring %s", line);
+	    mp_msg(MSGT_VOBSUB,MSGL_V, "vobsub: ignoring %s", line);
 	    continue;
 	}
 	if (res < 0)