[MPlayer-dev-eng] [PATCH] reduce verbosity in some places

Diego Biurrun diego at biurrun.de
Mon Nov 8 01:37:23 CET 2004


Reimar Döffinger writes:
>  
> > I've had these changes lying in my local tree for some time which move
> > some messages to verbose mode, cutting down a bit on MPlayer's
> > verbosity.
> > 
> > If nobody objects I will apply this soon.
> 
> > -	printf("[%x] ", p[i]);
> > -    printf("\n");
> > +	mp_msg(MSGT_HEADER, MSGL_V, "[%x] ", p[i]);
> > +    mp_msg(MSGT_HEADER, MSGL_V, "\n");
> >    }
> > -  printf("===========================\n");
> > +  mp_msg(MSGT_HEADER, MSGL_V, "==========================================================================\n");
> >  }
> 
> There is a check for the verbosity level at the place where this
> function is called... I would prefer if this checking would be done in
> only one place... Maybe allow a level parameter when calling this
> function? What do the others think?

What exactly do you have in mind?

> > -  mp_msg(MSGT_CPLAYER,MSGL_INFO, "MPlayer " VERSION " (C) 2000-2004 MPlayer Team\n\n");
> > +  mp_msg(MSGT_CPLAYER,MSGL_INFO, "MPlayer " VERSION " (C) 2000-2004 MPlayer Team\n");
> 
> > -  mp_msg(MSGT_CPLAYER,MSGL_INFO, "MEncoder " VERSION " (C) 2000-2004 MPlayer Team\n\n");
> > +  mp_msg(MSGT_CPLAYER,MSGL_INFO, "MEncoder " VERSION " (C) 2000-2004 MPlayer Team\n");
> 
> I'm not so sure if removing the newlines is such a good idea... It might
> make reading/finding things more difficult...

I don't think so, see below..

> > @@ -177,7 +177,7 @@
> >  	{"avi", &out_file_format, CONF_TYPE_FLAG, 0, 0, MUXER_TYPE_AVI, NULL},
> >  	{"mpeg", &out_file_format, CONF_TYPE_FLAG, 0, 0, MUXER_TYPE_MPEG, NULL},
> >  	{"rawvideo", &out_file_format, CONF_TYPE_FLAG, 0, 0, MUXER_TYPE_RAWVIDEO, NULL},
> > -	{"help", "\nAvailable output formats:\n"
> > +	{"help", "Available output formats:\n"
> >  	"   avi      - Microsoft Audio/Video Interleaved\n"
> >  	"   mpeg     - MPEG-1 system stream format\n"
> >  	"   rawvideo - (video only, one stream only) raw stream, no muxing\n"
> 
> Instead of removing the newlines at the beginning I'd actually prefer to
> have some for -ac help -vc help etc...
> For those the output looks like this, it all hangs together far to much
> for my taste...
> 
> > Reading config file /etc/mplayer/mplayer.conf
> > Reading config file /home/reimar/.mplayer/config
> > Reading /home/reimar/.mplayer/codecs.conf: 77 audio & 181 video codecs
> > Available video codecs:
> > vc:         vfm:      status:   info:  [lib/dll]
> > mpegpes     mpegpes   working   Mpeg PES output (.mpg or Dxr3/DVB card)
> > mpeg12      libmpeg2  working   MPEG 1 or 2 (libmpeg2)

Just look what my local tree prints:

silver:/usr/src/mplayer/dev$ ./mplayer -ac help
MPlayer dev-CVS-041009-21:35-3.3.4 (C) 2000-2004 MPlayer Team

Available audio codecs:
ac:         afm:      status:   info:  [lib/dll]
wma9dmo     dmo       working   Windows Media Audio 9 DMO  [wma9dmod.dll]
wmadmo      dmo       working   Windows Media Audio DMO  [wmadmod.dll]

:-)


> > --- libvo/x11_common.c	8 Aug 2004 23:22:04 -0000	1.176
> > +++ libvo/x11_common.c	9 Oct 2004 19:44:40 -0000
> > @@ -1626,7 +1627,7 @@
> >                  DPMSInfo(mDisplay, &state, &onoff);
> >                  if (onoff)
> >                  {
> > -                    mp_msg(MSGT_VO, MSGL_INFO,
> > +                    mp_msg(MSGT_VO, MSGL_V,
> >                             "Successfully enabled DPMS\n");
> >                  } else
> 
> You should at least keep it consistent with the disabled message, line 1684 or is this intended to be like this?

Good catch, fixed.

What about the rest of this patch, leaving out the mp_msg calls called
from other functions for now, OK to commit?

Diego




More information about the MPlayer-dev-eng mailing list