[FFmpeg-devel] [PATCH 1/3] log: allow color highlighting in Cygwin's mintty

Michael Niedermayer michaelni at gmx.at
Fri Apr 4 05:50:58 CEST 2014

On Fri, Apr 04, 2014 at 12:45:29AM +0200, James Darnley wrote:
> Configure will detect the availability of the Windows' console functions and set
> HAVE_SETCONSOLETEXTATTRIBUTE.  Meaning av_log will use those functions to
> control colours.  When ffmpeg is run in Cygwin's mintty terminal emulator it
> will not use colour highlighting in this case.
> Mintty responds to the usual escape code colours (it even supports 256 colours).
> Windows' cmd.exe does not.  Fortunately it seems that Cygwin's emulation layer
> now translates the basic 16 colours into Windows' Console command functions.
> That means that we can have av_log use the standard colour commands and let
> ffmpeg print colours in both mintty and cmd.
> ---
>  libavutil/log.c |    6 +++---
>  1 files changed, 3 insertions(+), 3 deletions(-)


i suggest to factorize the proprocessor conditions though so
the same check isnt repeated multiple times, risking that they become
mismatching each other at some point in th efuture

Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

The misfortune of the wise is better than the prosperity of the fool.
-- Epicurus
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20140404/be5cc84f/attachment.asc>

More information about the ffmpeg-devel mailing list