Commit Graph

86 Commits

Author SHA1 Message Date
Michael Niedermayer 09ece9fa6c eval: print() support
This allows printing values via av_log from expressions.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-02-17 17:36:27 +01:00
Dave Rice 71956371a7 lavu/parseutils: add digital cinema frame sizes
Signed-off-by: Stefano Sabatini <stefasab@gmail.com>
2013-02-03 22:57:04 +01:00
Michael Niedermayer e7e14bc69a Merge commit '38c1466ca41c73c7ce347da702362cb69c151716'
* commit '38c1466ca41c73c7ce347da702362cb69c151716':
  dict: add av_dict_parse_string()
  doc: support multitable in texi2pod

Conflicts:
	doc/APIchanges
	libavutil/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-26 13:34:30 +01:00
Justin Ruggles 38c1466ca4 dict: add av_dict_parse_string()
Can be used to set multiple key/value pairs from a string.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-01-25 17:20:03 +01:00
Michael Niedermayer 25be63005f Merge commit 'b85a5e87af4254b80913fe33591d96361f30832b'
* commit 'b85a5e87af4254b80913fe33591d96361f30832b':
  lavu: Add av_strnstr()
  h264: Allow discarding the cropping information from SPS

Conflicts:
	Changelog
	doc/APIchanges
	libavcodec/avcodec.h
	libavcodec/version.h
	libavutil/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-25 14:36:45 +01:00
Vladimir Pantelic b85a5e87af lavu: Add av_strnstr()
This is a length limited version of strstr()

Signed-off-by: Vladimir Pantelic <vladoman@gmail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-01-25 10:47:51 +01:00
Jason a717fa84ed lavu/timecode: Allow drop frame mode for 60000/1001 fps
Reviewed-by: Matthieu Bouron <matthieu.bouron@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-24 21:06:24 +01:00
Stefano Sabatini 2ed0803c6c lavu/eval: extend if/ifnot functions to accept a third parameter
Add support to an if/else construct, simplify logic in expressions.
2013-01-24 12:19:01 +01:00
Michael Niedermayer 31cd1e20bb eval: add function to access the current "wallclock" time.
Reviewed-by: Stefano Sabatini <stefasab@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-23 22:22:53 +01:00
Michael Niedermayer e7e0186eeb Merge commit 'ab2ad8bd56882c0ea160b154e8b836eb71abc49d'
* commit 'ab2ad8bd56882c0ea160b154e8b836eb71abc49d':
  lavf: Add functions for SRTP decryption/encryption
  lavu: Add an API for calculating HMAC (RFC 2104)

Conflicts:
	doc/APIchanges
	libavutil/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-15 15:57:33 +01:00
Martin Storsjö 8ee288d258 lavu: Add an API for calculating HMAC (RFC 2104)
This supports HMAC-MD5 and HMAC-SHA1 for now, other hashes are
simple to add.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-01-15 11:54:19 +02:00
Michael Niedermayer dae382b5b2 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  Add version bump and APIchanges entry for Add AV_PIX_FMT_VDPAU.
  pixfmt: add picture format for VDPAU

Conflicts:
	doc/APIchanges
	libavutil/pixfmt.h
	libavutil/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-12 13:42:42 +01:00
Diego Biurrun f89466ad6f Add version bump and APIchanges entry for Add AV_PIX_FMT_VDPAU.
Also fix a lavu version typo in APIchanges.
2013-01-12 12:28:12 +01:00
Michael Niedermayer 2ce43b37fc Merge commit '6dd93ee6f1b050ad7c4b247899e83efa293ee405'
* commit '6dd93ee6f1b050ad7c4b247899e83efa293ee405':
  hlsenc: check append_entry return value
  hlsenc: use the basename to generate the list entries
  avstring: add av_basename and av_dirname

Conflicts:
	Changelog
	doc/APIchanges
	libavutil/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-30 13:54:50 +01:00
Luca Barbato d8fd06c37d avstring: add av_basename and av_dirname
Thread safe version of the common basename and dirname.
2012-12-29 17:26:22 +01:00
Michael Niedermayer a8e0d51bb8 opt: Add support to query ranges
Reviewed-by: Stefano Sabatini <stefasab@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-08 01:34:28 +01:00
Reimar Döffinger 58df8befda av_assert should use AV_LOG_PANIC.
The description of AV_LOG_PANIC 100% matches what av_assert
does, while AV_LOG_FATAL does not really.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2012-12-05 20:25:32 +01:00
Nicolas George 86a2486812 lavu/parseutils: accept %J for hours >= 24.
Allow to parse durations >= 24:00:00.
2012-12-02 11:48:56 +01:00
Stefano Sabatini c9ff32215b lavu/opt: allow to set sample and pixel format with av_opt_set_int()
This change requires the user to specify min and max value, and makes
possible to prevent the user to set AV_{SAMPLE,PIX}_FMT_NONE if
forbidden.

Add required ifdeffery in case of mixed libraries, when libavutil is
updated but not the other libraries.

This is a followup of 08d0969c14.
2012-12-01 19:33:30 +01:00
Stefano Sabatini 08d0969c14 lavu/opt: change the way default pixel and sample format value is set
Use the i64 field rather than the string value. Using a string to set a
default sample/pixel format is weird, also the new interface is more
consistent with the rest of the API.

This is technically an API break, but hopefully there are no applications
using this feature outside of FFmpeg. In order to save backward
compatibility with mixed libraries in case libavutil is updated but not
the other libraries, some ifdeffery hacks are added.

Note that the version check is only performed when class->version != 0,
since if it is not defined then we assume that no version was defined and
the class is not affected by the change.

We will luckily get rid of the hack at the next major bump.
2012-11-30 00:01:53 +01:00
Stefano Sabatini b473c9937e lavu/samplefmt: return the size of the allocated samples buffer at the next bump
Make the functions av_samples_fill_arrays, av_samples_alloc, and
avcodec_fill_audio_frame return a buffer size rather than 0 in case of
success. This will be enabled at the next libavutil major bump, in order
to preserve backward compatibility.

Returning the size allows to simplify the code, avoiding a few function
calls.
2012-11-25 23:23:24 +01:00
Stefano Sabatini 51e9f58e1c lavu/opt: add support for reading pixel and sample format through av_get_int()
Simplify backward compatibility, when switching from AV_OPT_TYPE_INT to
AV_OPT_TYPE_SAMPLE/PIXEL_FMT.
2012-11-25 20:31:39 +01:00
Stefano Sabatini 252746d052 lavu/imgutils: add consistency checks to av_image_copy_plane()
Add assertions and abort in case of invalid |dst_linesize| < bytewidth or
|src_linesize| < bytewidth.

Avoid to silently corrupt memory.
2012-11-25 18:19:59 +01:00
Stefano Sabatini c70ec631c9 lavu/opt: add av_opt_ accessors for pixel/format/image size options
The interface is implemented against the style of the other options
accessors. Possibly simplify programmatic setting of options.
2012-11-25 15:01:33 +01:00
Nicolas George 4cd74c8143 lavu/bprint: implement av_bprint_strftime(). 2012-11-17 19:47:56 +01:00
Michael Niedermayer abf91f7fee Merge commit '8f5587c3d0bc4b5f075e4282215bda91a21fc12e'
* commit '8f5587c3d0bc4b5f075e4282215bda91a21fc12e':
  cpu.h: define AV_CPU_FLAG_MMX2 for libavutil major 52
  h264: Fix parameters to ff_er_add_slice() call
  h264: always check ref_count for validity

Conflicts:
	libavcodec/h264.c
	libavutil/cpu.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-17 12:58:00 +01:00
Janne Grunau 8f5587c3d0 cpu.h: define AV_CPU_FLAG_MMX2 for libavutil major 52 2012-11-16 15:04:48 +01:00
Nicolas George 926481078b lavu/opt: fix av_opt_get_key_value() API.
Do not skip the end delimiter.
Reserve positive return values.
This is an API break, but the function was introduced less than
two weeks ago.
2012-11-16 10:36:45 +01:00
Michael Niedermayer 03b078721c Merge commit '97bf7c03b1338a867da52c159a2afecbdedcfa88'
* commit '97bf7c03b1338a867da52c159a2afecbdedcfa88':
  doc: git-howto: Leave reviewers time to react before pushing patches
  Include libavutil/channel_layout.h instead of libavutil/audioconvert.h
  lavu: rename audioconvert.* to channel_layout.* and deprecate audioconvert.h

Conflicts:
	doc/APIchanges
	doc/examples/decoding_encoding.c
	doc/git-howto.texi
	ffmpeg_filter.c
	libavcodec/flacdec.c
	libavcodec/imc.c
	libavcodec/mpegaudiodec.c
	libavcodec/utils.c
	libavfilter/asrc_anullsrc.c
	libavfilter/audio.c
	libavfilter/avfilter.c
	libavfilter/avfilter.h
	libavfilter/avfiltergraph.c
	libavfilter/buffer.c
	libavutil/Makefile
	libavutil/audioconvert.h
	libavutil/channel_layout.c
	libavutil/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-12 11:32:11 +01:00
Justin Ruggles 5980f5dd18 lavu: rename audioconvert.* to channel_layout.* and deprecate audioconvert.h 2012-11-11 13:35:12 -05:00
Stefano Sabatini 1c6962dc20 lavu: remove disabled FF_API_OLD_EVAL_NAMES code 2012-11-07 23:18:05 +01:00
Michael Niedermayer 7d26be63c2 Merge commit '5ff998a233d759d0de83ea6f95c383d03d25d88e'
* commit '5ff998a233d759d0de83ea6f95c383d03d25d88e':
  flacenc: use uint64_t for bit counts
  flacenc: remove wasted trailing 0 bits
  lavu: add av_ctz() for trailing zero bit count
  flacenc: use a separate buffer for byte-swapping for MD5 checksum on big-endian
  fate: aac: Place LATM tests and general AAC tests in different groups
  build: The A64 muxer depends on rawenc.o for ff_raw_write_packet()

Conflicts:
	doc/APIchanges
	libavutil/version.h
	tests/fate/aac.mak

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-05 22:51:20 +01:00
Justin Ruggles dfde8a34e5 lavu: add av_ctz() for trailing zero bit count 2012-11-05 15:32:29 -05:00
Stefano Sabatini 74a50e75a8 lavu: drop disabled FF_API_OLD_TC_ADJUST_FRAMENUM code 2012-11-04 18:10:39 +01:00
Nicolas George 3bdf4971ba lavu/opt: implement av_opt_get_key_value().
This function does the low-level work of av_opt_set_from_string()
but can be used when there is no option context or when a generic
handling of unknown keys is needed.

av_opt_set_from_string() is changed to make use of it.
2012-11-04 10:47:52 +01:00
Stefano Sabatini 481fdeeecf lavu/opt: add AV_OPT_SAMPLE_FMT option 2012-11-03 12:14:26 +01:00
Nicolas George 483c1aa5f1 lavu/bprint: add av_bprint_get_buffer().
It is useful to use bprint to handle a growing buffer
used with another API.
2012-11-02 15:12:29 +01:00
Michael Niedermayer ae52eb7fc7 lavu: add av_clip64()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-27 00:26:35 +02:00
Michael Niedermayer 35ce42e070 Merge commit '8b8899ac3233b4f7af83ded0dc032fad8902d714'
* commit '8b8899ac3233b4f7af83ded0dc032fad8902d714':
  fate: Declare avcodec/avformat deps in the respective Makefile snippets
  fate: Add dependencies for WMA and WavPack tests
  Improve wording and spelling of av_log_missing_feature messages.
  lavu: remove disabled FF_API_AV_FIFO_PEEK cruft

Conflicts:
	libavcodec/aacsbr.c
	libavutil/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-23 15:00:27 +02:00
Michael Niedermayer d0ac26a264 Merge commit 'c692957c4edd119920cd7f2121628dd183589e6a'
* commit 'c692957c4edd119920cd7f2121628dd183589e6a':
  lavu: remove disabled avoptions cruft
  lavu: remove disabled FF_API_GET_BITS_PER_SAMPLE_FMT cruft

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

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-23 14:50:31 +02:00
Michael Niedermayer c2a25e141e Merge commit 'add3a6902ea4d459f36655656a1f8daa409118a7'
* commit 'add3a6902ea4d459f36655656a1f8daa409118a7':
  lavu: bump major to 52

Conflicts:
	libavutil/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-23 13:17:47 +02:00
Michael Niedermayer af3fe43d84 Merge commit '2b8dd371e4d276ca0d342e82b8b4cc281be0630a'
* commit '2b8dd371e4d276ca0d342e82b8b4cc281be0630a':
  lavu: postpone recent deprecations until the next major bump
  APIchanges: update lavr bump date
  avconv: only apply presets when we have an encoder.
  atrac3: replace a calculation with FFALIGN()
  atrac3: remove unused ATRAC3Context field, sample_rate
  atrac3: use sizeof(variable) instead of sizeof(type)
  atrac3: simplify MDCT window calculation

Conflicts:
	doc/APIchanges

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-23 13:05:52 +02:00
Anton Khirnov c692957c4e lavu: remove disabled avoptions cruft 2012-10-23 07:33:05 +02:00
Anton Khirnov add3a6902e lavu: bump major to 52
In addition to the recent tables mess, the AVOption defaults behavior
changed, so an old lavc used with a new lavu will get completely messed
up defaults.
2012-10-23 07:33:05 +02:00
Anton Khirnov 2b8dd371e4 lavu: postpone recent deprecations until the next major bump 2012-10-23 07:33:05 +02:00
Anton Khirnov 00ed7f5958 lavu: remove disabled FF_API_AV_FIFO_PEEK cruft 2012-10-23 07:33:05 +02:00
Anton Khirnov 8207c67a24 lavu: remove disabled FF_API_GET_BITS_PER_SAMPLE_FMT cruft 2012-10-23 07:33:05 +02:00
Michael Niedermayer e3a91c51f7 Merge commit 'c3e15f7b39aac2012f09ee4ca86d2bc674ffdbd4'
* commit 'c3e15f7b39aac2012f09ee4ca86d2bc674ffdbd4':
  rtpdec: Don't pass a non-AVClass pointer as log context
  rtsp: Update a comment to the current filename scheme
  avcodec: handle AVERROR_EXPERIMENTAL
  avutil: Add AVERROR_EXPERIMENTAL
  avcodec: prefer decoders without CODEC_CAP_EXPERIMENTAL

Conflicts:
	doc/APIchanges
	ffmpeg.c
	libavcodec/utils.c
	libavformat/rtpdec.c
	libavutil/error.c
	libavutil/error.h
	libavutil/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-22 14:39:12 +02:00
Nathan Caldwell a893655bda avutil: Add AVERROR_EXPERIMENTAL
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2012-10-21 22:38:21 +02:00
Stefano Sabatini cdea54b4c8 lavu/parseutils: rework rational reduction logic in av_parse_ratio()
Avoid to divide num and den by gcd in case of a parsed expression, since
that is already done in av_d2q(), and force reduction in case of "a:b"
form, allowing to honour the max parameter.

The latter change is consistent with the a/b case, and with the
documentation.
2012-10-20 12:19:53 +02:00