[FFmpeg-devel] Allow to force colored output

Michael Niedermayer michaelni
Sat Dec 4 03:32:09 CET 2010


On Fri, Dec 03, 2010 at 10:21:48PM +0100, Etienne Buira wrote:
> On Fri, Dec 03, 2010 at 06:51:49PM +0100, Michael Niedermayer wrote:
> > On Mon, Nov 15, 2010 at 08:03:04AM +0100, Etienne Buira wrote:
> > > On Mon, Nov 15, 2010 at 02:07:17AM +0100, Michael Niedermayer wrote:
> > > > On Sun, Nov 14, 2010 at 05:09:31PM +0100, Etienne Buira wrote:
> > > > > Hope this one is ok, feel free to adapt to your taste.
> > > > 
> > > > >  doc/fftools-common-opts.texi |    3 ++-
> > > > >  libavutil/log.c              |    6 +++---
> > > > >  2 files changed, 5 insertions(+), 4 deletions(-)
> > > > > 8da2d1b26e1b73c92d454900f4d01e17c15e8266  ffmpeg_allow_to_force_colored_output_hns_w32s.diff
> > > > > Index: libavutil/log.c
> > > > > ===================================================================
> > > > > --- libavutil/log.c	(revision 25751)
> > > > > +++ libavutil/log.c	(working copy)
> > > > > @@ -55,16 +55,16 @@
> > > > >  #if defined(_WIN32) && !defined(__MINGW32CE__)
> > > > >          CONSOLE_SCREEN_BUFFER_INFO con_info;
> > > > >          con = GetStdHandle(STD_ERROR_HANDLE);
> > > > > -        use_color = (con != INVALID_HANDLE_VALUE) && !getenv("NO_COLOR");
> > > > > +        use_color = (con != INVALID_HANDLE_VALUE) && (!getenv("NO_COLOR") || getenv("FFMPEG_FORCE_COLOR"));
> > > > 
> > > > what does this do?
> > > > the right side wont even be evaluated if NO_COLOR isnt set
> > > 
> > > Hi.
> > > 
> > > This just makes forcing color steps over if both NO_COLOR and
> > > FFMPEG_FORCE_COLOR are set, but the priority can be set otherwise
> > > dropping this line of diff.
> > 
> > pong
> 
> I start to understand why flies fu^W^Wbikeshedding is such a popular
> word down here.

bikesheding sucks but this one was a completely unneeded hunk, the patch and
final code is simpler without it.


> 
> Anyway, this one makes NO_COLOR precedes forcing. If you have
> objections, please adjust to your taste or state clearly what is wrong.

>  doc/fftools-common-opts.texi |    3 ++-
>  libavutil/log.c              |    4 ++--
>  2 files changed, 4 insertions(+), 3 deletions(-)
> 583e901b8928a21aa2161bf00e14e67beb462aef  ffmpeg_allow_to_force_colored_output_ncp.diff

lgtm if tested


[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Democracy is the form of government in which you can choose your dictator
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20101204/b40556d8/attachment.pgp>



More information about the ffmpeg-devel mailing list