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

James Darnley james.darnley
Thu Apr 22 02:31:12 CEST 2010

On 22 April 2010 01:12, Michael Niedermayer <michaelni at gmx.at> wrote:
> the idea is good, your implementation is not
> it should be looking something like
> ff_set_console_color(int fd, int color){
> ? ?if (isatty(fd))
> ? ? ? ?fprintf( fd, "\033[...
> #endif
> }

That doesn't sound very easy to use on Windows because you need a
console handle and then you need to store the the original colours so
you can restore them.

Also, you can't fprintf into int fd  But that can be corrected by
passing FILE *fd and then using isatty(fileno(fd))

More information about the ffmpeg-devel mailing list