[MPlayer-dev-eng] [PATCH] libmplayer

The Wanderer inverseparadox at comcast.net
Fri Jun 17 21:53:11 CEST 2005


Bryan Wilkerson wrote:

> As discussed in an earlier thread, attached is a patch that provides
> a shared library interface for mplayer. Configure, make and install
> have all been updated to build the lib and install it.  Currently
> only supported on *nix systems and only tested on Linux.

<extensive snip, into libmplayer.c>

> +	if(!quiet)
> +	{
> +		// TODO : should probably have a Resumed msg
> +		printf("                       \n"); //clear pause and go to next line

Please do not use printf except in debugging code, i.e. commented out or
inside #if 0 (and ideally not then either), both because it precludes
the possibility of sending output to stdout and - notably in the current
case - because an underlying library should AFAIK never use stdout. Use
mp_msg instead. According to my best awareness, the fact that this is
not printed if "quiet" is requested does not change the general
principle; my understanding is that verbosity should be controlled
entirely through MSGL_, rather than explicitly via "quiet".

Looking through the current mplayer.c, I notice that there are several
places where printf is still used... I thought I'd gotten rid of all of
those, but apparently if so others have slipped in without my noticing;
it looks like I've been negligent. I'll try to get to correcting that in
the near future.

-- 
       The Wanderer

Warning: Simply because I argue an issue does not mean I agree with any
side of it.

A government exists to serve its citizens, not to control them.




More information about the MPlayer-dev-eng mailing list