[FFmpeg-devel] [PATCH] add colours to warnings and errors

James Darnley james.darnley
Sat Apr 24 03:03:58 CEST 2010

Attached is hopefully the final revision.
It should not alter the behavior when _WIN32 is not defined at compile time.
When it is, colour will be printed in:
 - "plain" cmd.exe
 - cygwin and msys cmd.exe terminals when "tty" is not in the CYGWIN
environment variable

Other terminals in which you might run a native Windows executable
look like they are SOL.  If they get changed so that isatty() returns
true when you would expect it to then they should start working
without any change to ffmpeg.

If someone wanted to try and make a hack for isatty() then I suggest
this as a starting point:
Some state of the stderr pipe might let you find if it is attached to
a cygwin tty.  I tried to recreate that myself but I wasn't very
successful.  I also think that I showed that you can't know whether it
is rxvt or another program using the pipe, perl or python for example.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: colours.diff
Type: application/octet-stream
Size: 3147 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100424/f3f20691/attachment.obj>

More information about the ffmpeg-devel mailing list