Useful to understand where and in what execution state a certain message
is generated. It is enabled only when optimizations are disabled, since
function names are not printed otherwise.
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
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.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
And provide extended coloring capabilities for debugging.
The default colors do not change in 256 more to keep
supporting people using Black on White, White on Black and
Solarized terminals.
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
Fixes out of array read
Fixes: asan_heap-oob_19d6979_6857_mmw_deadzy.ogg
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avpriv_request_sample() and avpriv_report_missing_feature() were printing bogus values for the extra arguments.
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Not all versions of windows have the console color functions,
while io.h might be needed for isatty (which can be found in
unistd.h or io.h).
Signed-off-by: Martin Storsjö <martin@martin.st>
The blue is difficult to read on several peoples terminals with black background.
Idea-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This is required for isatty, which exists on MSVC and is found by
configure, but is provided by io.h instead of unistd.h.
Signed-off-by: Martin Storsjö <martin@martin.st>
MSVC has isatty (in io.h), but not unistd.h. (isatty isn't called
at all for windows, since there's a special case block for that.)
Signed-off-by: Martin Storsjö <martin@martin.st>
The string passed to av_vlog() from libx264's X264_log overflows the 512
byte part_size, truncating x264 parameter output. Double this size
and put it in a #define so it only needs to be changed in one place.
Signed-off-by: Wolfram Gloger <video06@malloc.de>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
The only symbol this file uses from unistd.h is isatty(). By
including the header only when this function is used, the file
can be built on systems without unistd.h (which presumably also
lack isatty).
Signed-off-by: Mans Rullgard <mans@mansr.com>
This way the filters which are semantically closer to the codec layer
have a (subjectively to me) more similar color.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
The use of cyan is droped from the levels to avoid confusion
magenta/cyan/blue is used for muxer/codec/filter layer
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>