Permalink
Browse files

Merge remote-tracking branch 'qatar/master'

* qatar/master:
  avprobe, cmdutils: K&R formatting cosmetics
  tests: K&R formatting cosmetics for test programs
  lavf: free packets for muxers implementing interleave_packet().
  lavf: fix and extend av_interleaved_write_frame() doxy.
  mov: Remove dead stores for spherical coordinates for channel position.
  error_resilience: K&R formatting cosmetics
  RELEASE_NOTES: mention hiding private symbols in shared builds.
  RELEASE_NOTES: mention some notable API changes in 0.8

Conflicts:
	cmdutils.h
	doc/RELEASE_NOTES
	ffprobe.c
	libavcodec/error_resilience.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
  • Loading branch information...
2 parents 6fd4b8a + 0184bbe commit c130428ab5a17911d0bfa11f804ec05e6f7a53e6 @michaelni michaelni committed Jan 19, 2012
Showing with 1,054 additions and 873 deletions.
  1. +12 −6 cmdutils.h
  2. +32 −2 doc/RELEASE_NOTES
  3. +12 −9 ffprobe.c
  4. +713 −595 libavcodec/error_resilience.c
  5. +12 −3 libavformat/avformat.h
  6. +3 −4 libavformat/mov.c
  7. +6 −3 libavformat/utils.c
  8. +36 −36 tests/audiogen.c
  9. +5 −4 tests/base64.c
  10. +58 −55 tests/rotozoom.c
  11. +90 −87 tests/tiny_psnr.c
  12. +75 −69 tests/videogen.c
View
@@ -105,7 +105,8 @@ int opt_timelimit(const char *opt, const char *arg);
* @param min the minimum valid accepted value
* @param max the maximum valid accepted value
*/
-double parse_number_or_die(const char *context, const char *numstr, int type, double min, double max);
+double parse_number_or_die(const char *context, const char *numstr, int type,
+ double min, double max);
/**
* Parse a string specifying a time and return its corresponding
@@ -121,7 +122,8 @@ double parse_number_or_die(const char *context, const char *numstr, int type, do
*
* @see parse_date()
*/
-int64_t parse_time_or_die(const char *context, const char *timestr, int is_duration);
+int64_t parse_time_or_die(const char *context, const char *timestr,
+ int is_duration);
typedef struct SpecifierOpt {
char *specifier; /**< stream/chapter/program/... specifier */
@@ -167,7 +169,8 @@ typedef struct {
const char *argname;
} OptionDef;
-void show_help_options(const OptionDef *options, const char *msg, int mask, int value);
+void show_help_options(const OptionDef *options, const char *msg, int mask,
+ int value);
/**
* Show help for all options with given flags in class and all its
@@ -193,7 +196,8 @@ void parse_options(void *optctx, int argc, char **argv, const OptionDef *options
*
* @return on success 1 if arg was consumed, 0 otherwise; negative number on error
*/
-int parse_option(void *optctx, const char *opt, const char *arg, const OptionDef *options);
+int parse_option(void *optctx, const char *opt, const char *arg,
+ const OptionDef *options);
/**
* Find the '-loglevel' option in the command line args and apply it.
@@ -221,7 +225,8 @@ int check_stream_specifier(AVFormatContext *s, AVStream *st, const char *spec);
* @param st A stream from s for which the options should be filtered.
* @return a pointer to the created dictionary
*/
-AVDictionary *filter_codec_opts(AVDictionary *opts, AVCodec *codec, AVFormatContext *s, AVStream *st);
+AVDictionary *filter_codec_opts(AVDictionary *opts, AVCodec *codec,
+ AVFormatContext *s, AVStream *st);
/**
* Setup AVCodecContext options for avformat_find_stream_info().
@@ -234,7 +239,8 @@ AVDictionary *filter_codec_opts(AVDictionary *opts, AVCodec *codec, AVFormatCont
* @return pointer to the created array of dictionaries, NULL if it
* cannot be created
*/
-AVDictionary **setup_find_stream_info_opts(AVFormatContext *s, AVDictionary *codec_opts);
+AVDictionary **setup_find_stream_info_opts(AVFormatContext *s,
+ AVDictionary *codec_opts);
/**
* Print an error message to stderr, indicating filename and a human
View
@@ -6,7 +6,6 @@ Release Notes
General notes
-------------
-
This release is binary compatible with 0.8. The 'ffmpeg' command-line tool has
been extended to also support the command line syntax and features of a tool
called avconv.
@@ -32,13 +31,44 @@ API changes
A number of additional APIs have been introduced and some existing
functions have been deprecated and are scheduled for removal in the next
-release. Please see the file doc/APIchanges for details along with
+release. Significant API changes include:
+
+* new audio decoding API which decodes from an AVPacket to an AVFrame and
+is able to use AVCodecContext.get_buffer() in the similar way as video decoding.
+
+* new audio encoding API which encodes from an AVFrame to an AVPacket, thus
+allowing it to properly output timing information and side data.
+
+* rewritten AVOptions API with better built-in support for private options.
+
+* private options support for demuxers [avformat_open_input()], muxers
+[avformat_write_header()], encoders and decoders [avcodec_open2()].
+As a result, many format- or codec-specific fields and flags in AVFormatContext
+and AVCodecContext were deprecated -- notably most of CODEC_FLAG2_* and many
+CODEC_FLAG_*.
+
+* new API for custom IO interrupt callbacks.
+
+* #include cleanup in libavutil -- libavutil/avutil.h no longer includes all
+the other headers in libavutil, they must be included manually. One specific
+result is that libavutil/mathematics.h is no longer included from
+libavcodec/avcodec.h, which is a common source of errors.
+
+Please see the file doc/APIchanges for details along with
similar programmer-centric information.
Other notable changes
---------------------
+Libavcodec and libavformat built as shared libraries now hide non-public
+symbols. This will break applications using those symbols. Possible solutions
+are, in order of preference:
+1) Try finding a way of accomplishing the same with public API.
+2) If there is no corresponding public API, but you think there should be,
+post a request on the user mailing list or IRC channel.
+3) Finally if your program needs access to FFmpeg / libavcodec / libavformat
+internals for some special reason then the best solution is to link statically.
Please see the Changelog file for a more detailed list of changes.
View
@@ -109,13 +109,13 @@ static char *value_string(char *buf, int buf_size, struct unit_value uv)
if (uv.unit == unit_byte_str && use_byte_value_binary_prefix) {
index = (long long int) (log(vald)/log(2)) / 10;
- index = av_clip(index, 0, FF_ARRAY_ELEMS(binary_unit_prefixes) -1);
- vald /= pow(2, index*10);
+ index = av_clip(index, 0, FF_ARRAY_ELEMS(binary_unit_prefixes) - 1);
+ vald /= pow(2, index * 10);
prefix_string = binary_unit_prefixes[index];
} else {
index = (long long int) (log10(vald)) / 3;
- index = av_clip(index, 0, FF_ARRAY_ELEMS(decimal_unit_prefixes) -1);
- vald /= pow(10, index*3);
+ index = av_clip(index, 0, FF_ARRAY_ELEMS(decimal_unit_prefixes) - 1);
+ vald /= pow(10, index * 3);
prefix_string = decimal_unit_prefixes[index];
}
@@ -1557,7 +1557,8 @@ static int open_input_file(AVFormatContext **fmt_ctx_ptr, const char *filename)
AVFormatContext *fmt_ctx = NULL;
AVDictionaryEntry *t;
- if ((err = avformat_open_input(&fmt_ctx, filename, iformat, &format_opts)) < 0) {
+ if ((err = avformat_open_input(&fmt_ctx, filename,
+ iformat, &format_opts)) < 0) {
print_error(filename, err);
return err;
}
@@ -1581,8 +1582,9 @@ static int open_input_file(AVFormatContext **fmt_ctx_ptr, const char *filename)
AVCodec *codec;
if (!(codec = avcodec_find_decoder(stream->codec->codec_id))) {
- av_log(NULL, AV_LOG_ERROR, "Unsupported codec with id %d for input stream %d\n",
- stream->codec->codec_id, stream->index);
+ av_log(NULL, AV_LOG_ERROR,
+ "Unsupported codec with id %d for input stream %d\n",
+ stream->codec->codec_id, stream->index);
} else if (avcodec_open2(stream->codec, codec, NULL) < 0) {
av_log(NULL, AV_LOG_ERROR, "Error while opening codec for input stream %d\n",
stream->index);
@@ -1700,8 +1702,9 @@ static int opt_format(const char *opt, const char *arg)
static void opt_input_file(void *optctx, const char *arg)
{
if (input_filename) {
- av_log(NULL, AV_LOG_ERROR, "Argument '%s' provided as input filename, but '%s' was already specified.\n",
- arg, input_filename);
+ av_log(NULL, AV_LOG_ERROR,
+ "Argument '%s' provided as input filename, but '%s' was already specified.\n",
+ arg, input_filename);
exit(1);
}
if (!strcmp(arg, "-"))
Oops, something went wrong.

0 comments on commit c130428

Please sign in to comment.