1
mirror of https://github.com/mpv-player/mpv synced 2024-12-24 07:33:46 +01:00

verbose can be negative

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@8028 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
arpi 2002-11-01 17:46:45 +00:00
parent 94b6f5baba
commit 39fe4d0cd3
22 changed files with 82 additions and 96 deletions

View File

@ -212,7 +212,7 @@ static int init(int rate_hz, int channels, int format, int flags)
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 @@ static int init(int rate_hz, int channels, int format, int flags)
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 @@ static int init(int rate_hz, int channels, int format, int flags)
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 @@ static int init(int rate_hz, int channels, int format, int flags)
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 @@ static int init(int rate_hz, int channels, int format, int flags)
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 @@ static int init(int rate_hz, int channels, int format, int flags)
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 @@ static int init(int rate_hz, int channels, int format, int flags)
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 @@ static int init(int rate_hz, int channels, int format, int flags)
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 @@ static int init(int rate_hz, int channels, int format, int flags)
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 @@ static int init(int rate_hz, int channels, int format, int flags)
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 @@ static int init(int rate_hz, int channels, int format, int flags)
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 @@ static int init(int rate_hz, int channels, int format, int flags)
}
else {
ao_data.buffersize = err;
if (verbose)
if (verbose>0)
printf("alsa-init: got buffersize=%i\n", ao_data.buffersize);
}
@ -661,7 +661,7 @@ static int init(int rate_hz, int channels, int format, int flags)
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 @@ static void audio_pause()
}
}
else {
if (verbose)
if (verbose>0)
printf("alsa-pause: paused nonblock\n");
return;
@ -762,7 +762,7 @@ static void reset()
return;
}
} else {
if (verbose)
if (verbose>0)
printf("alsa-reset: reset nonblocked");
return;
}
@ -1051,7 +1051,7 @@ static int get_space()
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 @@ static int get_space()
}
}
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);

View File

@ -17,8 +17,6 @@
#include "../mp_msg.h"
extern int verbose;
static ao_info_t info =
{
"ALSA-0.5.x audio output",

View File

@ -212,7 +212,7 @@ static int init(int rate_hz, int channels, int format, int flags)
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 @@ static int init(int rate_hz, int channels, int format, int flags)
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 @@ static int init(int rate_hz, int channels, int format, int flags)
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 @@ static int init(int rate_hz, int channels, int format, int flags)
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 @@ static int init(int rate_hz, int channels, int format, int flags)
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 @@ static int init(int rate_hz, int channels, int format, int flags)
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 @@ static int init(int rate_hz, int channels, int format, int flags)
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 @@ static int init(int rate_hz, int channels, int format, int flags)
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 @@ static int init(int rate_hz, int channels, int format, int flags)
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 @@ static int init(int rate_hz, int channels, int format, int flags)
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 @@ static int init(int rate_hz, int channels, int format, int flags)
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 @@ static int init(int rate_hz, int channels, int format, int flags)
}
else {
ao_data.buffersize = err;
if (verbose)
if (verbose>0)
printf("alsa-init: got buffersize=%i\n", ao_data.buffersize);
}
@ -661,7 +661,7 @@ static int init(int rate_hz, int channels, int format, int flags)
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 @@ static void audio_pause()
}
}
else {
if (verbose)
if (verbose>0)
printf("alsa-pause: paused nonblock\n");
return;
@ -762,7 +762,7 @@ static void reset()
return;
}
} else {
if (verbose)
if (verbose>0)
printf("alsa-reset: reset nonblocked");
return;
}
@ -1051,7 +1051,7 @@ static int get_space()
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 @@ static int get_space()
}
}
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);

View File

@ -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",

View File

@ -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 @@ static ao_info_t info =
LIBAO_EXTERN(sdl)
extern int verbose;
// Samplesize used by the SDLlib AudioSpec struct
#define SAMPLESIZE 1024
@ -153,11 +153,11 @@ static int init(int rate,int channels,int format,int flags){
/* 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 @@ static int init(int rate,int channels,int format,int flags){
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 @@ void callback(void *userdata, Uint8 *stream, int len); userdata is the pointer s
/* 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 @@ void callback(void *userdata, Uint8 *stream, int len); userdata is the pointer s
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 @@ void callback(void *userdata, Uint8 *stream, int len); userdata is the pointer s
// 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);
}

View File

@ -125,19 +125,19 @@ static int realtime_samplecounter_available(char *dev)
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 @@ static int realtime_samplecounter_available(char *dev)
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 @@ static int realtime_samplecounter_available(char *dev)
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 ");

View File

@ -71,7 +71,7 @@ static int preinit(sh_audio_t *sh_audio)
// 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,7 +219,6 @@ static int decode_audio(sh_audio_t *sh_audio,unsigned char *buf,int minlen,int m
}
// return -1;
}
if(verbose>1)
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;

View File

@ -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"

View File

@ -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"

View File

@ -232,9 +232,9 @@ static int init(sh_video_t *sh){
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);

View File

@ -151,7 +151,7 @@ while(!stream_eof(demuxer->stream)){
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 @@ while(!stream_eof(demuxer->stream)){
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 @@ while(!stream_eof(demuxer->stream)){
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 @@ while(!stream_eof(demuxer->stream)){
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 @@ while(!stream_eof(demuxer->stream)){
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 @@ while(!stream_eof(demuxer->stream)){
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");

View File

@ -156,7 +156,7 @@ while(1){
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;

View File

@ -542,7 +542,7 @@ int demux_ogg_open(demuxer_t* demuxer) {
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 @@ int demux_ogg_open(demuxer_t* demuxer) {
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 @@ int demux_ogg_open(demuxer_t* demuxer) {
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 @@ int demux_ogg_open(demuxer_t* demuxer) {
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) {

View File

@ -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 @@ static void dump_index(demuxer_t *demuxer, int stream_id)
real_index_table_t *index;
int i, entries;
if (!verbose)
if (verbose<=0)
return;
if (stream_id > MAX_STREAMS)

View File

@ -502,7 +502,7 @@ extension=NULL;
}
*fd_out=fd;
if( verbose ) {
if( verbose>0 ) {
http_debug_hdr( http_hdr );
}

View File

@ -97,7 +97,7 @@ switch(d_video->demuxer->file_format){
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;
}

View File

@ -235,8 +235,6 @@ static XF86VidModeModeInfo **vo_dga_vidmodes=NULL;
#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

View File

@ -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;

View File

@ -789,7 +789,7 @@ if(lame_param_scale>0) {
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 @@ if(sh_audio && !demuxer2){
(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,

View File

@ -682,7 +682,7 @@ if(!parse_codec_cfg(get_path("codecs.conf"))){
}
// 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) sh_audio->timer=-audio_delay;
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(rel_seek_secs || abs_seek_pos){
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);

View File

@ -2300,7 +2300,7 @@ SwsContext *getSwsContext(int srcW, int srcH, int srcFormat, int dstW, int dstH,
MSG_INFO("using C\n");
}
if((flags & SWS_PRINT_INFO) && verbose)
if((flags & SWS_PRINT_INFO) && verbose>0)
{
if(cpuCaps.hasMMX)
{

View File

@ -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,7 +623,6 @@ vobsub_add_id(vobsub_t *vob, const char *id, size_t idlen, const unsigned int in
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",
index, vob->spu_streams[index].id);
return 0;
@ -919,7 +916,6 @@ vobsub_parse_one_line(vobsub_t *vob, rar_stream_t *fd)
//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);
continue;
}