Commit Graph

125 Commits

Author SHA1 Message Date
Ganesh Ajjanagadde 63cdb6e4a5 avutil/log: fix zero length gnu_printf format string warning
This should fix warning reported by fate client:
http://fate.ffmpeg.org/report.cgi?time=20150917113121&slot=x86_32-linux-gnu-gcc-4.5.1-have_6regs.
Untested.

Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-09-17 18:58:01 +02:00
Michael Niedermayer 954b5e340e Merge commit 'eaa2d123f0a643664721593d248ece6bcd85f1e6'
* commit 'eaa2d123f0a643664721593d248ece6bcd85f1e6':
  log: Print a full backtrace along with error messages under Valgrind

Conflicts:
	libavutil/log.c
	libavutil/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-04-20 23:30:33 +02:00
Vittorio Giovara eaa2d123f0 log: Print a full backtrace along with error messages under Valgrind
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>
2015-04-20 19:20:57 +01:00
Michael Niedermayer 8e8219e0f0 Merge commit 'c253340ae6f74ffd8798bbd476e46d1b33a2d56e'
* commit 'c253340ae6f74ffd8798bbd476e46d1b33a2d56e':
  log: Introduce a more verbose debug level

Conflicts:
	doc/APIchanges
	doc/fftools-common-opts.texi
	libavutil/log.c
	libavutil/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-04-20 02:48:19 +02:00
Vittorio Giovara c253340ae6 log: Introduce a more verbose debug level
And deprecate av_dlog macro.
2015-04-19 12:41:59 +01:00
Luca Barbato d995f0a155 log: Unbreak no-tty support on 256color terminals 2014-09-26 20:56:16 +02:00
Michael Niedermayer 2422a7ffe4 Loose mplayer in MPlayer/incoming/
Found-by: Clément Bœsch <u@pkh.me>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-03 16:03:44 +02:00
Michael Niedermayer 3e7b4b9fbd Add direct link to ML in missing_feature_sample()
Reviewed-by: Clément Bœsch <u@pkh.me>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-03 15:58:27 +02:00
Michael Niedermayer 7c71076470 avutil/log: fix memleak from 669a09fb37
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-29 03:13:51 +02:00
tue46wsdgxfjrt 669a09fb37 Add AV_LOG_PRINT_LEVEL flag to include log severity in default log formatting.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-26 19:27:33 +02:00
Michael Niedermayer 4f698be8f6 avutil/log: add av_log_get_flags()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-12 20:25:10 +02:00
Michael Niedermayer 7ac2f7e413 avutil/log: factor "level != AV_LOG_INFO/8" checks out
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-09 16:30:16 +02:00
James Darnley 16509d3a28 log: allow color highlighting in Cygwin's mintty
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>
2014-04-04 04:20:14 +02:00
Luca Barbato 9464b69da6 log: Unbreak windows support
Add the missing define.
2014-04-03 23:43:47 +02:00
Michael Niedermayer 609ef89703 avutil/log: remove stray ;
regression since  5a18b215f7

Reported-by: J_Darnley
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-03 22:59:39 +02:00
Michael Niedermayer 49e040e868 avutil/log: fix negative log levels
These where broken by 7763118cae

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-03 22:44:04 +02:00
Michael Niedermayer 1f8a6bef78 avutil/log: add code to test av_log()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-03 22:38:30 +02:00
Michael Niedermayer 5a18b215f7 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  log: Do not assume the TERM variable is always set

Conflicts:
	libavutil/log.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-03 22:18:26 +02:00
Michael Niedermayer 002feaf6e2 Merge commit '28b9ac4e48f3405a82e8e87ead336188215cf1e6'
* commit '28b9ac4e48f3405a82e8e87ead336188215cf1e6':
  log: Remove undefined behaviour

Conflicts:
	libavutil/log.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-03 20:53:30 +02:00
Michael Niedermayer c16e006181 Merge commit '7763118cae4eb468b032dbd29af15a011c2c233b'
* commit '7763118cae4eb468b032dbd29af15a011c2c233b':
  log: Support for 256color terminals

Conflicts:
	doc/APIchanges
	libavutil/log.c
	libavutil/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-03 20:44:14 +02:00
Luca Barbato 061e340c05 log: Factorize check_color_terminal() out 2014-04-03 20:04:34 +02:00
Luca Barbato 4ede1862dc log: Do not assume the TERM variable is always set 2014-04-03 18:43:25 +02:00
Luca Barbato 28b9ac4e48 log: Remove undefined behaviour 2014-04-03 18:43:24 +02:00
Luca Barbato 7763118cae log: Support for 256color terminals
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>
2014-04-03 15:54:49 +02:00
Lukasz Marek 19b3a25048 lavu/log: add device categories
Signed-off-by: Lukasz Marek <lukasz.m.luki@gmail.com>
2014-03-03 23:34:31 +01:00
Michael Niedermayer 74744790a3 Merge commit '25a1ba814ad80056247fd357ec4c6911324a3f66'
* commit '25a1ba814ad80056247fd357ec4c6911324a3f66':
  log: Have function parameter names match between .c and .h file

Conflicts:
	libavutil/log.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-02-12 14:41:24 +01:00
Diego Biurrun 25a1ba814a log: Have function parameter names match between .c and .h file
This fixes two related Doxygen warnings.
2014-02-12 12:08:02 +01:00
Michael Niedermayer a044a183a3 avutil/log: skip IO calls on empty strings
These occur when no context is set for example, thus they are common

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-06 23:30:34 +01:00
Michael Niedermayer d6838309fe avutil/log: skip setting color for default (AV_LOG_INFO) level
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-06 23:28:57 +01:00
Michael Niedermayer 2c21e2ee4c avutil/log: merge calls that set ansi color and print the string
about 1/3 or so faster

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-06 23:27:45 +01:00
Michael Niedermayer 808c10e728 avutil/log: check that len is within the buffer before reading it
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>
2013-11-27 17:06:42 +01:00
Michael Niedermayer 423ae31354 avutil/log: make default av_log callback thread safe
This uses a pthread mutex

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-23 18:15:49 +02:00
Michael Niedermayer 3ed65d98c6 avutil/log: fix race between setting and using the log callback
Found-by: wm4
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-17 00:49:55 +02:00
Michael Niedermayer 148310ca16 avutil/log: Use bprint for part
This should fix the issue with strings longer than 1024

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-10 18:17:30 +02:00
Nicolas George 39bb26f91b lavu/log: do not skip overwritten lines.
If the line ends with \r, it will not flood the tty, and
the "Last message repeated" line would overwrite it.
Fix bug introduced by c25d1ba.
2013-08-07 16:01:45 +02:00
Nicolas George c25d1ba556 lavu/log: print prefix after \r.
Should fix trac ticket #2797 because of the progress line.
2013-07-20 11:06:19 +02:00
Michael Niedermayer 8fdec02fd1 Merge commit '0420c810ceb430003f9f2793c5cfa1fe84657f3d'
* commit '0420c810ceb430003f9f2793c5cfa1fe84657f3d':
  log: pass the correct parameters to missing_feature_sample

Conflicts:
	libavutil/log.c

See: 572e38a513

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-05 12:43:57 +02:00
Luca Barbato 0420c810ce log: pass the correct parameters to missing_feature_sample
CC:libav-stable@libav.org
2013-07-04 21:25:11 +02:00
Michael Niedermayer 7edb984dd0 avutil/log: Fix context pointer used for get_category()
Fixes calling a random pointer

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-30 20:06:24 +02:00
Michael Niedermayer a057552212 avutil/log: dont count&print repeats for empty strings
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-26 23:41:29 +02:00
Michael Niedermayer 74b1c32a80 avutil/log: leave prefix printing state on empty input.
Fixes printing the prefix after an empty string was printed

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-26 20:31:25 +02:00
James Almer 572e38a513 log: Remove redundant va_list creation from missing_feature_sample()
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>
2013-04-13 21:14:34 +02:00
Michael Niedermayer 905e7eb413 Merge commit 'f099d3d1d5466bd63f4ab36270d169ff9ea613b8'
* commit 'f099d3d1d5466bd63f4ab36270d169ff9ea613b8':
  Add av_log_{ask_for_sample|missing_feature} replacements to libavutil
  ismindex: Check the return value of allocations

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-14 12:15:02 +01:00
Diego Biurrun f099d3d1d5 Add av_log_{ask_for_sample|missing_feature} replacements to libavutil
This allows reporting missing features and requesting samples from
all libraries in a standard way; with a simplified API.
2013-03-13 20:42:06 +01:00
Michael Niedermayer 99efd59626 Merge commit 'cb45553f577f8e0ebfe05d3287e1b6fa5859b967'
* commit 'cb45553f577f8e0ebfe05d3287e1b6fa5859b967':
  Remove pointless #undefs of previously forbidden functions.
  fate: Add dependencies for bmp, cdxl, dfa, mp3

Conflicts:
	doc/examples/muxing.c
	libavfilter/filtfmts.c
	libavutil/des.c
	libavutil/eval.c
	libavutil/log.c
	libavutil/parseutils.c
	tests/fate/mp3.mak

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-05 13:34:45 +01:00
Anton Khirnov cb45553f57 Remove pointless #undefs of previously forbidden functions. 2012-12-04 21:40:22 +01:00
Michael Niedermayer 5473f6258c Merge remote-tracking branch 'qatar/master'
* qatar/master:
  configure: Use headers in the check for _beginthreadex for w32threads
  avutil: Use a configure check to enable windows console functions
  avutil: Include io.h with a separate condition from windows console functions

Conflicts:
	libavutil/log.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-01 13:10:48 +01:00
Martin Storsjö 7e6a11bcf7 avutil: Use a configure check to enable windows console functions
Not all versions or API subsets of windows have these functions.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-11-30 16:56:57 +02:00
Martin Storsjö b70abd5b61 avutil: Include io.h with a separate condition from windows console functions
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>
2012-11-30 16:56:54 +02:00
Michael Niedermayer c581cb4e4f Merge remote-tracking branch 'qatar/master'
* qatar/master:
  Fix even more missing includes after the common.h removal
  build: Factor out rangecoder dependencies to CONFIG_RANGECODER
  build: Factor out error resilience dependencies to CONFIG_ERROR_RESILIENCE
  x86: avcodec: Consistently name all init files
  Add more missing includes after removing the implicit common.h
  Add some more missing includes after removing the implicit common.h
  Don't include common.h from avutil.h
  rtmp: Automatically compute the hash for SWFVerification

Conflicts:
	configure
	doc/APIchanges
	doc/examples/decoding_encoding.c
	libavcodec/Makefile
	libavcodec/assdec.c
	libavcodec/audio_frame_queue.c
	libavcodec/avpacket.c
	libavcodec/dv_profile.c
	libavcodec/dwt.c
	libavcodec/libtheoraenc.c
	libavcodec/rawdec.c
	libavcodec/rv40dsp.c
	libavcodec/tiff.c
	libavcodec/tiffenc.c
	libavcodec/v210dec.h
	libavcodec/vc1dsp.c
	libavcodec/x86/Makefile
	libavfilter/asrc_anullsrc.c
	libavfilter/avfilter.c
	libavfilter/buffer.c
	libavfilter/formats.c
	libavfilter/vf_ass.c
	libavfilter/vf_drawtext.c
	libavfilter/vf_fade.c
	libavfilter/vf_select.c
	libavfilter/video.c
	libavfilter/vsrc_testsrc.c
	libavformat/version.h
	libavutil/audioconvert.c
	libavutil/error.h
	libavutil/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-08-16 16:20:30 +02:00