Commit Graph

83 Commits

Author SHA1 Message Date
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
Martin Storsjö 1d9c2dc89a Don't include common.h from avutil.h
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-08-15 22:32:06 +03:00
Michael Niedermayer 50bfd547b9 log: fix compilation failure on mingw due to reference to undefined set_color256
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-07-07 12:57:13 +02:00
Paul B Mahol 1842b27564 lavu: 256 color support
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2012-07-07 01:41:55 +00:00
Michael Niedermayer ee7214c59a log: change color for filters from blue to bright green
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>
2012-06-28 00:36:32 +02:00
Michael Niedermayer 3b0ad040b3 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  log: Include io.h on windows
  lavr: x86: merge some branches
  x86: cpu: whitespace (mostly) cosmetics
  x86: fft: win64: fix stack alignment for memcpy() call

Conflicts:
	libavutil/log.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-06-26 01:13:07 +02:00
Ronald S. Bultje 246154a9af log: Include io.h on windows
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>
2012-06-25 23:28:36 +03:00
Michael Niedermayer 244682dd08 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  log: Only include unistd.h if configure found it
  ape: create audio stream before reading tags.
  mov: make a length variable larger.
  image2: Add "start_number" private option to the demuxer
  image2: Add "start_number" private option to the muxer
  avconv: remove a forgotten debugging printf.
  avconv: use more descriptive names for hardcoded filters.
  avconv: remove redundant handling of async.
  doc/filters: fix typo.
  h264: use asm cabac reader under a generic condition

Conflicts:
	ffmpeg.c
	libavformat/img2dec.c
	libavformat/img2enc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-06-24 21:34:54 +02:00
Martin Storsjö 145a8096d5 log: Only include unistd.h if configure found it
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>
2012-06-24 12:36:22 +03:00
Michael Niedermayer e847f41285 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  libspeexenc: add supported sample rates and channel layouts.
  Replace usleep() calls with av_usleep()
  lavu: add av_usleep() function
  utvideo: mark interlaced frames as such
  utvideo: Fix interlaced prediction for RGB utvideo.
  cosmetics: do not use full path for local headers
  lavu/file: include unistd.h only when available
  configure: check for unistd.h
  log: include unistd.h only when needed
  lavf: include libavutil/time.h instead of redeclaring av_gettime()

Conflicts:
	configure
	doc/APIchanges
	ffmpeg.c
	ffplay.c
	libavcodec/utvideo.c
	libavutil/avutil.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-06-22 22:34:02 +02:00
Wolfram Gloger 258dfff839 extend log line buffer sizes
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>
2012-06-22 19:16:51 +02:00
Mans Rullgard 539df61193 log: include unistd.h only when needed
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>
2012-06-21 22:53:35 +01:00
Michael Niedermayer bc210bfca6 log: flip highlight bit for codec & muxer layer
This way the encoder/muxer side is bold

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-06-20 17:22:18 +02:00
Michael Niedermayer e69263cd01 avutil: add get_category() for the case where one AVClass can have more than 1 category
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-06-19 17:22:02 +02:00
Michael Niedermayer b76f77ee0d log: swap colors for muxer and codec layer
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>
2012-06-19 17:13:45 +02:00
Michael Niedermayer eb7efc126a log: color prefixes according to their source.
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>
2012-06-03 22:12:14 +02:00
Michael Niedermayer 2191aef93b log: cleanup color arrays
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-06-03 21:56:35 +02:00
Michael Niedermayer 394b692b70 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  avprobe: restore pseudo-INI old style format for compatibility.
  avprobe: fix formatting.
  log: make colored output more colorful.
  rtsp: Check for dynamic payload handlers if no static payload mapping was found

Conflicts:
	Changelog
	doc/ffprobe.texi
	ffprobe.c
	libavutil/log.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-05-28 00:50:23 +02:00
Anton Khirnov 780ff97fef log: make colored output more colorful.
Green for verbose, cyan for debug.
2012-05-26 21:14:17 +02:00
Michael Niedermayer 7c7c5b2415 avutil/log: allow av_log_set_callback (NULL)
Idea-by: Don Moir <donmoir@comcast.net>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-05-10 19:11:23 +02:00
Clément Bœsch 625751c47a log: use a different color for debug (green). 2012-01-09 22:35:45 +01:00
Nicolas George 26c6fec9d9 lavu: introduce av_log_format_line. 2011-12-08 18:47:47 +01:00
Michael Niedermayer 707138593a Merge remote-tracking branch 'qatar/master'
* qatar/master:
  adpcmenc: cosmetics: pretty-printing
  ac3dec: cosmetics: pretty-printing
  yuv4mpeg: cosmetics: pretty-printing
  shorten: remove dead initialization
  roqvideodec: set AVFrame reference before reget_buffer.
  bmp: fix some 1bit samples.
  latmdec: add fate test for audio config change
  oma: PCM support
  oma: better format detection with small probe buffer
  oma: clearify ambiguous if condition
  wavpack: Properly clip samples during lossy decode
  Code clean-up for crc.c, lfg.c, log.c, random_see.d, rational.c and tree.c.
  Cleaned pixdesc.c file in libavutil
  zmbv.c: coding style clean-up.
  xan.c: coding style clean-up.
  mpegvideo.c: code cleanup - first 500 lines.

Conflicts:
	Changelog
	libavcodec/adpcmenc.c
	libavcodec/bmp.c
	libavcodec/zmbv.c
	libavutil/log.c
	libavutil/pixdesc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-05 00:11:57 +01:00
Yordan Makariev 425b45d4b0 Code clean-up for crc.c, lfg.c, log.c, random_see.d, rational.c and tree.c.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-12-03 15:13:48 -08:00
Michael Niedermayer 988f585fcb Merge remote-tracking branch 'qatar/master'
* qatar/master: (44 commits)
  replacement Indeo 3 decoder
  gsm demuxer: do not allocate packet twice.
  flvenc: use first packet delay as global delay.
  ac3enc: doxygen update.
  imc: return error codes instead of 0 for error conditions.
  imc: return meaningful error codes instead of -1
  imc: do not set channel layout for stereo
  imc: validate channel count
  imc: check for ff_fft_init() failure
  imc: check output buffer size before decoding
  imc: use DSPContext.bswap16_buf() to byte-swap packet data
  rtsp: add allowed_media_types option
  libgsm: add flush function to reset the decoder state when seeking
  libgsm: simplify decoding by using a loop
  gsm: log error message when packet is too small
  libgsmdec: do not needlessly set *data_size to 0
  gsmdec: do not needlessly set *data_size to 0
  gsmdec: add flush function to reset the decoder state when seeking
  libgsmdec: check output buffer size before decoding
  gsmdec: log error message when output buffer is too small.
  ...

Conflicts:
	Changelog
	ffplay.c
	libavcodec/indeo3.c
	libavcodec/mjpeg_parser.c
	libavcodec/vp3.c
	libavformat/cutils.c
	libavformat/id3v2.c
	libavutil/parseutils.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-11-03 02:16:26 +01:00
Diego Biurrun f36b390275 Replace some forgotten FFmpeg references by Libav. 2011-11-02 10:42:55 +01:00
Michael Niedermayer 6841c8c579 Merge remote branch 'qatar/master'
* qatar/master:
  log: Fix an oob array read.
  cosmetics: trim trailing whitespace in postproc
  Ban strncpy() it's too easy to misuse.
  psymodel: Remove wrapper functions.
  aacenc: Replace loop counters in aac_encode_frame() with more descriptive 'ch' and 'w'.
  regtest: remove redundant flags in jpg test
  regtest: use run_ffmpeg in do_image_formats
  regtest: simplify encoding functions
  ffmpeg.c: check for interlaced flag in the correct place.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-05-09 04:50:56 +02:00
Alex Converse 847aaec682 log: Fix an oob array read. 2011-05-08 13:34:05 -07:00
Alex Converse 1a5e4fd8c5 Replace strncpy() with av_strlcpy(). 2011-05-03 21:20:13 -07:00
Reinhard Tartler 0247bdee25 Fix races in default av_log handler
Prevent competing threads from overwriting (shared) buffers.

Original patch by: Michael Niedermayer <michaelni@gmx.at>
2011-04-29 22:46:13 +02:00
Michael Niedermayer 10d2ae8cf7 Merge remote branch 'qatar/master'
* qatar/master:
  Makefile: Include dependencies for test tools, too
  Remove a version check in av_log made unnecessary by the big bump.
  update last major version increase dates in APIchanges
  Reduce picture size for yadif.
  oggdec: use av_freep() instead of av_free()
  avio: Fix sanity checks in ffurl_read*
  libavformat: Free AVFormatContext->streams
  libavformat: Make protocols pass URLContext as log context where available
  asf: remove commented out code in asf_read_seek
not pulled:  libpostproc: Remove crufty code disabled by the big bump.
  Reflect 0.7_beta1 release in the Changelog
not pulled:  sws: remove disabled cruft.
  lavu: remove disabled ff_random_get_seed cruft.
  lavu: remove disabled sha1 cruft.

Conflicts:
	Changelog
	libavutil/sha1.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-21 03:37:05 +02:00
Diego Biurrun 63de9e7d80 Remove a version check in av_log made unnecessary by the big bump. 2011-04-20 18:19:04 +02:00
Michael Niedermayer efb5fa79f5 Merge remote branch 'qatar/master'
* qatar/master: (37 commits)
  In avcodec_open(), set return code to an error value only when an error occurs instead of unconditionally at the start of the function.
  lavc: remove reference to opt.h from Makefile.
  prefer avio_check() over url_exist()
  avio: remove AVIO_* access symbols in favor of new AVIO_FLAG_* symbols
  lavu: remove misc disabled cruft
  lavu: remove FF_API_OLD_IMAGE_NAMES cruft
NOT PULLED  lavu: remove FF_API_OLD_EVAL_NAMES cruft
  lavc: remove misc disabled cruft.
  lavc: remove the FF_API_INOFFICIAL cruft.
  lavc: remove the FF_API_SET_STRING_OLD cruft.
  lavc: remove the FF_API_USE_LPC cruft.
  lavc: remove the FF_API_SUBTITLE_OLD cruft.
  lavc: remove the FF_API_VIDEO_OLD cruft.
  lavc: remove the FF_API_AUDIO_OLD cruft.
  lavc: remove the FF_API_OPT_SHOW cruft.
  lavc: remove the FF_API_MM_FLAGS cruft.
  lavf: remove misc disabled cruft.
  lavf: remove FF_API_INDEX_BUILT cruft
  lavf: remove FF_API_URL_CLASS cruft.
  lavf: remove FF_API_SYMVER cruft
  ...

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-20 04:48:23 +02:00
Anton Khirnov 490a022d86 lavu: remove misc disabled cruft 2011-04-19 19:04:28 +02:00
Michael Niedermayer 48ee302e0f Fix apparently exploitable race condition.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-03-25 02:24:32 +01:00
Michael Niedermayer 0a51362b3f log:Sanitize string of most control chars before printing.
This may be security relevant depending upon the used terminal.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-03-25 01:16:22 +01:00
Mans Rullgard 2912e87a6c Replace FFmpeg with Libav in licence headers
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-03-19 13:33:20 +00:00
Daniel Verkamp dfaa9f3cb3 Recognize FFMPEG_FORCE_NOCOLOR environment variable on Win32
Fixes issue 2461

Originally committed as revision 26186 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-01 20:08:15 +00:00
Stefano Sabatini 3011ecdeb7 Introduce FFMPEG_FORCE_NOCOLOR, with the same meaning and use of
NO_COLOR (but properly prefixed for avoiding namespace conflicts).

Originally committed as revision 25899 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-06 21:47:10 +00:00
Etienne Buira 129983408d Allow to force colored output.
Patch by Etienne Buira, etienne d buira d lists a free d fr

Originally committed as revision 25888 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-05 13:56:49 +00:00
Michael Niedermayer d7cd001ff2 indent
Originally committed as revision 25178 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-09-24 16:18:40 +00:00
Michael Niedermayer 8a19053361 Cosmetic (rename detect_repeats to is_atty which matches the truth)
Originally committed as revision 25177 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-09-24 16:18:10 +00:00
Michael Niedermayer 1c1c80f0a3 2nd try to fix av_log() repeated detection
Originally committed as revision 25174 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-09-24 15:37:01 +00:00