[MPlayer-dev-eng] [PATCH] printf --> mp_msg in libvo/font_load.c

Ivan Kalvachev ivan at cacad.com
Mon Nov 8 02:03:13 CET 2004


On Mon, 8 Nov 2004 00:38:55 +0100
Diego Biurrun <diego at biurrun.de> wrote:

> Ivan Kalvachev writes:
> > On Sun, 7 Nov 2004 18:09:48 +0100
> > Diego Biurrun <diego at biurrun.de> wrote:
> > 
> > > Ivan Kalvachev writes:
> > > > On Sat, 6 Nov 2004 16:38:48 +0100
> > > > Diego Biurrun <diego at biurrun.de> wrote:
> > > > 
> > > > > While looking for places with excessive verbosity I came across the
> > > > > bitmap font parser which still printfs quite a bit of things to the
> > > > > console.  I moved a few of those messages to verbose level and
> > > > > converted the printfs to mp_msg calls.  The patch looks pretty trivial
> > > > > to me, still I would be happy if someone checked if I used the correct
> > > > > MSGT_ and MSGL_.
> > > > > 
> > > > > If nobody protests I'll commit this in the next few days.
> > > > 
> > > > There are a lot of msg-es that you have put as INFO, the most obiously wrong one is this:
> > > > 
> > > > +              mp_msg(MSGT_OSD, MSGL_INFO, "error in font desc: end<start for char '%c'\n",chr);
> > > >                                      ^^^^___^^^^^
> > > > Look again and all messages that are errors should output MSGL_ERR. (they usually invoke "goto fail_out;");
> > > > MSG_INFO should be only on these that are shown at normal work.
> > > > I think you got the verbose ok (DBG)
> > > > The non fatal errors are MSGL_WARN.
> > > 
> > > OK, thanks for the review, here is the next try.
> > 
> > Oops, it looks like i lied to you. DBG2 is displayed at verbose >2,
> > this means that the right is MSGL_V (verbose >=1).
> > Take a look of mp_msg.h, that's my source ;)
> 
> No, DBG2 is displayed with verbose >= 2, not >2.
> 
> Actually, I haven't changed when those messages get printed.  They
> appear with -v -v just as they did before.

Well so i wasn't wrong 1'st time :))

> 
> > Also the last 
> > 
> >   +mp_msg(MSGT_OSD, MSGL_V, "Font %s loaded successfully! (%d chars)\n",fname,chardb);
> > 
> > should be INFO, as it is always displayed.
> 
> Changing this is exactly the point of my patch.  It is is supposed to
> convert the printf calls to mp_msg and reduce verbosity, i.e. print
> less to the screen.
> 
> Any more comments?  Commit is pending ;-)
> 

Just one. Next time attach the patch too :P
Commit and add your name for cola donation.

Wish You Best
   Ivan Kalvachev
  iive




More information about the MPlayer-dev-eng mailing list