From: ronag Date: Wed, 21 Sep 2011 21:29:59 +0000 (+0000) Subject: 2.0.0.2: Updated ffmpeg. X-Git-Tag: dependencies_subtree~13 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=bf5418d7ea7edf82c6706a59888da50155a59c31;p=casparcg 2.0.0.2: Updated ffmpeg. --- diff --git a/ffmpeg 0.8/bin/avcodec-53.dll b/ffmpeg 0.8/bin/avcodec-53.dll index 6d2bd040c..59a01c7d0 100644 Binary files a/ffmpeg 0.8/bin/avcodec-53.dll and b/ffmpeg 0.8/bin/avcodec-53.dll differ diff --git a/ffmpeg 0.8/bin/avdevice-53.dll b/ffmpeg 0.8/bin/avdevice-53.dll index 3aedf51ef..cadd1b0e8 100644 Binary files a/ffmpeg 0.8/bin/avdevice-53.dll and b/ffmpeg 0.8/bin/avdevice-53.dll differ diff --git a/ffmpeg 0.8/bin/avfilter-2.dll b/ffmpeg 0.8/bin/avfilter-2.dll index eb327d821..24f5f2c5b 100644 Binary files a/ffmpeg 0.8/bin/avfilter-2.dll and b/ffmpeg 0.8/bin/avfilter-2.dll differ diff --git a/ffmpeg 0.8/bin/avformat-53.dll b/ffmpeg 0.8/bin/avformat-53.dll index a8f7fc1a1..d1c9f63f8 100644 Binary files a/ffmpeg 0.8/bin/avformat-53.dll and b/ffmpeg 0.8/bin/avformat-53.dll differ diff --git a/ffmpeg 0.8/bin/avutil-51.dll b/ffmpeg 0.8/bin/avutil-51.dll index cdd1b4fd8..7cf986c23 100644 Binary files a/ffmpeg 0.8/bin/avutil-51.dll and b/ffmpeg 0.8/bin/avutil-51.dll differ diff --git a/ffmpeg 0.8/bin/postproc-51.dll b/ffmpeg 0.8/bin/postproc-51.dll index d06055cea..55860cdd4 100644 Binary files a/ffmpeg 0.8/bin/postproc-51.dll and b/ffmpeg 0.8/bin/postproc-51.dll differ diff --git a/ffmpeg 0.8/bin/swresample-0.dll b/ffmpeg 0.8/bin/swresample-0.dll new file mode 100644 index 000000000..0b43fede0 Binary files /dev/null and b/ffmpeg 0.8/bin/swresample-0.dll differ diff --git a/ffmpeg 0.8/bin/swscale-2.dll b/ffmpeg 0.8/bin/swscale-2.dll index 38d5d3e22..6f9bfddde 100644 Binary files a/ffmpeg 0.8/bin/swscale-2.dll and b/ffmpeg 0.8/bin/swscale-2.dll differ diff --git a/ffmpeg 0.8/include/libavcodec/avcodec.h b/ffmpeg 0.8/include/libavcodec/avcodec.h index 9690bd1bb..f4f895537 100644 --- a/ffmpeg 0.8/include/libavcodec/avcodec.h +++ b/ffmpeg 0.8/include/libavcodec/avcodec.h @@ -361,6 +361,9 @@ enum CodecID { /* other specific kind of codecs (generally used for attachments) */ CODEC_ID_FIRST_UNKNOWN = 0x18000, ///< A dummy ID pointing at the start of various fake codecs. CODEC_ID_TTF= 0x18000, + CODEC_ID_BINTEXT, + CODEC_ID_XBIN, + CODEC_ID_IDF, CODEC_ID_PROBE= 0x19000, ///< codec_id is not known (like CODEC_ID_NONE) but lavf should attempt to identify it @@ -605,6 +608,7 @@ typedef struct RcOverride{ #define CODEC_FLAG2_LOCAL_HEADER 0x00000008 ///< Place global headers at every keyframe instead of in extradata. #define CODEC_FLAG2_SKIP_RD 0x00004000 ///< RD optimal MB level residual skipping #define CODEC_FLAG2_CHUNKS 0x00008000 ///< Input bitstream might be truncated at a packet boundaries instead of only at frame boundaries. +#define CODEC_FLAG2_SHOW_ALL 0x00400000 ///< Show all frames before the first keyframe /** * @defgroup deprecated_flags Deprecated codec flags * Use corresponding private codec options instead. @@ -1181,6 +1185,8 @@ typedef struct AVFrame { * New fields can be added to the end with minor version bumps. * Removal, reordering and changes to existing fields require a major * version bump. + * Please use AVOptions (av_opt* / av_set/get*()) to access these fields from user + * applications. * sizeof(AVCodecContext) must not be used outside libav*. */ typedef struct AVCodecContext { @@ -2481,12 +2487,14 @@ typedef struct AVCodecContext { */ int chromaoffset; +#if FF_API_X264_GLOBAL_OPTS /** * Influences how often B-frames are used. * - encoding: Set by user. * - decoding: unused */ - int bframebias; + attribute_deprecated int bframebias; +#endif /** * trellis RD quantization @@ -2495,12 +2503,13 @@ typedef struct AVCodecContext { */ int trellis; +#if FF_API_X264_GLOBAL_OPTS /** * Reduce fluctuations in qp (before curve compression). * - encoding: Set by user. * - decoding: unused */ - float complexityblur; + attribute_deprecated float complexityblur; /** * in-loop deblocking filter alphac0 parameter @@ -2508,7 +2517,7 @@ typedef struct AVCodecContext { * - encoding: Set by user. * - decoding: unused */ - int deblockalpha; + attribute_deprecated int deblockalpha; /** * in-loop deblocking filter beta parameter @@ -2516,14 +2525,14 @@ typedef struct AVCodecContext { * - encoding: Set by user. * - decoding: unused */ - int deblockbeta; + attribute_deprecated int deblockbeta; /** * macroblock subpartition sizes to consider - p8x8, p4x4, b8x8, i8x8, i4x4 * - encoding: Set by user. * - decoding: unused */ - int partitions; + attribute_deprecated int partitions; #define X264_PART_I4X4 0x001 /* Analyze i4x4 */ #define X264_PART_I8X8 0x002 /* Analyze i8x8 (requires 8x8 transform) */ #define X264_PART_P8X8 0x010 /* Analyze p16x8, p8x16 and p8x8 */ @@ -2535,7 +2544,8 @@ typedef struct AVCodecContext { * - encoding: Set by user. * - decoding: unused */ - int directpred; + attribute_deprecated int directpred; +#endif /** * Audio cutoff bandwidth (0 means "automatic") @@ -4417,4 +4427,12 @@ int av_lockmgr_register(int (*cb)(void **mutex, enum AVLockOp op)); */ enum AVMediaType avcodec_get_type(enum CodecID codec_id); +/** + * Get the AVClass for AVCodecContext. It can be used in combination with + * AV_OPT_SEARCH_FAKE_OBJ for examining options. + * + * @see av_opt_find(). + */ +const AVClass *avcodec_get_class(void); + #endif /* AVCODEC_AVCODEC_H */ diff --git a/ffmpeg 0.8/include/libavcodec/version.h b/ffmpeg 0.8/include/libavcodec/version.h index 77009c548..bca20f6ad 100644 --- a/ffmpeg 0.8/include/libavcodec/version.h +++ b/ffmpeg 0.8/include/libavcodec/version.h @@ -21,7 +21,7 @@ #define AVCODEC_VERSION_H #define LIBAVCODEC_VERSION_MAJOR 53 -#define LIBAVCODEC_VERSION_MINOR 12 +#define LIBAVCODEC_VERSION_MINOR 16 #define LIBAVCODEC_VERSION_MICRO 0 #define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \ diff --git a/ffmpeg 0.8/include/libavdevice/avdevice.h b/ffmpeg 0.8/include/libavdevice/avdevice.h index 74c26fb63..68e3a46a8 100644 --- a/ffmpeg 0.8/include/libavdevice/avdevice.h +++ b/ffmpeg 0.8/include/libavdevice/avdevice.h @@ -23,7 +23,7 @@ #include "libavformat/avformat.h" #define LIBAVDEVICE_VERSION_MAJOR 53 -#define LIBAVDEVICE_VERSION_MINOR 3 +#define LIBAVDEVICE_VERSION_MINOR 4 #define LIBAVDEVICE_VERSION_MICRO 0 #define LIBAVDEVICE_VERSION_INT AV_VERSION_INT(LIBAVDEVICE_VERSION_MAJOR, \ diff --git a/ffmpeg 0.8/include/libavfilter/avfilter.h b/ffmpeg 0.8/include/libavfilter/avfilter.h index 50b5d1cba..f948e5424 100644 --- a/ffmpeg 0.8/include/libavfilter/avfilter.h +++ b/ffmpeg 0.8/include/libavfilter/avfilter.h @@ -29,8 +29,8 @@ #include "libavutil/rational.h" #define LIBAVFILTER_VERSION_MAJOR 2 -#define LIBAVFILTER_VERSION_MINOR 37 -#define LIBAVFILTER_VERSION_MICRO 0 +#define LIBAVFILTER_VERSION_MINOR 43 +#define LIBAVFILTER_VERSION_MICRO 2 #define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \ LIBAVFILTER_VERSION_MINOR, \ @@ -40,6 +40,13 @@ LIBAVFILTER_VERSION_MICRO) #define LIBAVFILTER_BUILD LIBAVFILTER_VERSION_INT +#ifndef FF_API_OLD_VSINK_API +#define FF_API_OLD_VSINK_API (LIBAVUTIL_VERSION_MAJOR < 3) +#endif +#ifndef FF_API_OLD_ALL_FORMATS_API +#define FF_API_OLD_ALL_FORMATS_API (LIBAVUTIL_VERSION_MAJOR < 3) +#endif + #include /** @@ -102,7 +109,7 @@ typedef struct AVFilterBuffer { typedef struct AVFilterBufferRefAudioProps { int64_t channel_layout; ///< channel layout of audio buffer int nb_samples; ///< number of audio samples per channel - uint32_t sample_rate; ///< audio buffer sample rate + int sample_rate; ///< audio buffer sample rate int planar; ///< audio buffer - planar or packed } AVFilterBufferRefAudioProps; @@ -254,20 +261,33 @@ AVFilterFormats *avfilter_make_format64_list(const int64_t *fmts); */ int avfilter_add_format(AVFilterFormats **avff, int64_t fmt); +#if FF_API_OLD_ALL_FORMATS_API /** - * Return a list of all formats supported by FFmpeg for the given media type. + * @deprecated Use avfilter_make_all_formats() instead. */ +attribute_deprecated AVFilterFormats *avfilter_all_formats(enum AVMediaType type); +#endif + +/** + * Return a list of all formats supported by FFmpeg for the given media type. + */ +AVFilterFormats *avfilter_make_all_formats(enum AVMediaType type); + +/** + * A list of all channel layouts supported by libavfilter. + */ +extern const int64_t avfilter_all_channel_layouts[]; /** * Return a list of all channel layouts supported by FFmpeg. */ -AVFilterFormats *avfilter_all_channel_layouts(void); +AVFilterFormats *avfilter_make_all_channel_layouts(void); /** * Return a list of all audio packing formats. */ -AVFilterFormats *avfilter_all_packing_formats(void); +AVFilterFormats *avfilter_make_all_packing_formats(void); /** * Return a format list which contains the intersection of the formats of @@ -386,9 +406,7 @@ struct AVFilterPad { * * Input audio pads only. */ - AVFilterBufferRef *(*get_audio_buffer)(AVFilterLink *link, int perms, - enum AVSampleFormat sample_fmt, int nb_samples, - int64_t channel_layout, int planar); + AVFilterBufferRef *(*get_audio_buffer)(AVFilterLink *link, int perms, int nb_samples); /** * Callback called after the slices of a frame are completely sent. If @@ -472,9 +490,8 @@ AVFilterBufferRef *avfilter_default_get_video_buffer(AVFilterLink *link, int perms, int w, int h); /** default handler for get_audio_buffer() for audio inputs */ -AVFilterBufferRef *avfilter_default_get_audio_buffer(AVFilterLink *link, int perms, - enum AVSampleFormat sample_fmt, int nb_samples, - int64_t channel_layout, int planar); +AVFilterBufferRef *avfilter_default_get_audio_buffer(AVFilterLink *link, + int perms, int nb_samples); /** * Helpers for query_formats() which set all links to the same list of @@ -506,9 +523,8 @@ AVFilterBufferRef *avfilter_null_get_video_buffer(AVFilterLink *link, int perms, int w, int h); /** get_audio_buffer() handler for filters which simply pass audio along */ -AVFilterBufferRef *avfilter_null_get_audio_buffer(AVFilterLink *link, int perms, - enum AVSampleFormat sample_fmt, int size, - int64_t channel_layout, int planar); +AVFilterBufferRef *avfilter_null_get_audio_buffer(AVFilterLink *link, + int perms, int nb_samples); /** * Filter definition. This defines the pads a filter contains, and all the @@ -623,7 +639,11 @@ struct AVFilterLink { AVRational sample_aspect_ratio; ///< agreed upon sample aspect ratio /* These parameters apply only to audio */ int64_t channel_layout; ///< channel layout of current buffer (see libavutil/audioconvert.h) +#if LIBAVFILTER_VERSION_MAJOR < 3 int64_t sample_rate; ///< samples per second +#else + int sample_rate; ///< samples per second +#endif int planar; ///< agreed upon packing mode of audio buffers. true if planar. int format; ///< agreed upon media format @@ -727,16 +747,12 @@ avfilter_get_video_buffer_ref_from_arrays(uint8_t * const data[4], const int lin * @param link the output link to the filter from which the buffer will * be requested * @param perms the required access permissions - * @param sample_fmt the format of each sample in the buffer to allocate * @param nb_samples the number of samples per channel - * @param channel_layout the number and type of channels per sample in the buffer to allocate - * @param planar audio data layout - planar or packed * @return A reference to the samples. This must be unreferenced with * avfilter_unref_buffer when you are finished with it. */ AVFilterBufferRef *avfilter_get_audio_buffer(AVFilterLink *link, int perms, - enum AVSampleFormat sample_fmt, int nb_samples, - int64_t channel_layout, int planar); + int nb_samples); /** * Create an audio buffer reference wrapped around an already diff --git a/ffmpeg 0.8/include/libavfilter/buffersink.h b/ffmpeg 0.8/include/libavfilter/buffersink.h new file mode 100644 index 000000000..c5ae7dcdd --- /dev/null +++ b/ffmpeg 0.8/include/libavfilter/buffersink.h @@ -0,0 +1,88 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVFILTER_VSINK_BUFFER_H +#define AVFILTER_VSINK_BUFFER_H + +/** + * @file + * memory buffer sink API for audio and video + */ + +#include "avfilter.h" + +/** + * Struct to use for initializing a buffersink context. + */ +typedef struct { + const enum PixelFormat *pixel_fmts; ///< list of allowed pixel formats, terminated by PIX_FMT_NONE +} AVBufferSinkParams; + +/** + * Create an AVBufferSinkParams structure. + * + * Must be freed with av_free(). + */ +AVBufferSinkParams *av_buffersink_params_alloc(void); + +/** + * Struct to use for initializing an abuffersink context. + */ +typedef struct { + const enum AVSampleFormat *sample_fmts; ///< list of allowed sample formats, terminated by AV_SAMPLE_FMT_NONE + const int64_t *channel_layouts; ///< list of allowed channel layouts, terminated by -1 + const int *packing_fmts; ///< list of allowed packing formats +} AVABufferSinkParams; + +/** + * Create an AVABufferSinkParams structure. + * + * Must be freed with av_free(). + */ +AVABufferSinkParams *av_abuffersink_params_alloc(void); + +/** + * Tell av_buffersink_get_buffer_ref() to read video/samples buffer + * reference, but not remove it from the buffer. This is useful if you + * need only to read a video/samples buffer, without to fetch it. + */ +#define AV_BUFFERSINK_FLAG_PEEK 1 + +/** + * Get an audio/video buffer data from buffer_sink and put it in bufref. + * + * This function works with both audio and video buffer sinks. + * + * @param buffer_sink pointer to a buffersink or abuffersink context + * @param flags a combination of AV_BUFFERSINK_FLAG_* flags + * @return >= 0 in case of success, a negative AVERROR code in case of + * failure + */ +int av_buffersink_get_buffer_ref(AVFilterContext *buffer_sink, + AVFilterBufferRef **bufref, int flags); + +#if FF_API_OLD_VSINK_API +/** + * @deprecated Use av_buffersink_get_buffer_ref() instead. + */ +attribute_deprecated +int av_vsink_buffer_get_video_buffer_ref(AVFilterContext *buffer_sink, + AVFilterBufferRef **picref, int flags); +#endif + +#endif /* AVFILTER_VSINK_BUFFER_H */ diff --git a/ffmpeg 0.8/include/libavfilter/vsink_buffer.h b/ffmpeg 0.8/include/libavfilter/vsink_buffer.h deleted file mode 100644 index 88b4c1d25..000000000 --- a/ffmpeg 0.8/include/libavfilter/vsink_buffer.h +++ /dev/null @@ -1,47 +0,0 @@ -/* - * This file is part of FFmpeg. - * - * FFmpeg is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * FFmpeg is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with FFmpeg; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#ifndef AVFILTER_VSINK_BUFFER_H -#define AVFILTER_VSINK_BUFFER_H - -/** - * @file - * memory buffer sink API for video - */ - -#include "avfilter.h" - -/** - * Tell av_vsink_buffer_get_video_buffer_ref() to read the picref, but not - * remove it from the buffer. This is useful if you need only to read - * the picref, without to fetch it. - */ -#define AV_VSINK_BUF_FLAG_PEEK 1 - -/** - * Get a video buffer data from buffer_sink and put it in picref. - * - * @param buffer_sink pointer to a buffer sink context - * @param flags a combination of AV_VSINK_BUF_FLAG_* flags - * @return >= 0 in case of success, a negative AVERROR code in case of - * failure - */ -int av_vsink_buffer_get_video_buffer_ref(AVFilterContext *buffer_sink, - AVFilterBufferRef **picref, int flags); - -#endif /* AVFILTER_VSINK_BUFFER_H */ diff --git a/ffmpeg 0.8/include/libavformat/avformat.h b/ffmpeg 0.8/include/libavformat/avformat.h index e43588126..40ba81b01 100644 --- a/ffmpeg 0.8/include/libavformat/avformat.h +++ b/ffmpeg 0.8/include/libavformat/avformat.h @@ -646,7 +646,7 @@ typedef struct AVStream { int64_t last_dts; int64_t duration_gcd; int duration_count; - double duration_error[MAX_STD_TIMEBASES]; + double duration_error[2][2][MAX_STD_TIMEBASES]; int64_t codec_info_duration; } *info; @@ -1720,4 +1720,12 @@ int av_match_ext(const char *filename, const char *extensions); */ int avformat_query_codec(AVOutputFormat *ofmt, enum CodecID codec_id, int std_compliance); +/** + * Get the AVClass for AVFormatContext. It can be used in combination with + * AV_OPT_SEARCH_FAKE_OBJ for examining options. + * + * @see av_opt_find(). + */ +const AVClass *avformat_get_class(void); + #endif /* AVFORMAT_AVFORMAT_H */ diff --git a/ffmpeg 0.8/include/libavformat/version.h b/ffmpeg 0.8/include/libavformat/version.h index 6d22be049..2e4e50a86 100644 --- a/ffmpeg 0.8/include/libavformat/version.h +++ b/ffmpeg 0.8/include/libavformat/version.h @@ -24,7 +24,7 @@ #include "libavutil/avutil.h" #define LIBAVFORMAT_VERSION_MAJOR 53 -#define LIBAVFORMAT_VERSION_MINOR 10 +#define LIBAVFORMAT_VERSION_MINOR 12 #define LIBAVFORMAT_VERSION_MICRO 0 #define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \ diff --git a/ffmpeg 0.8/include/libavutil/avstring.h b/ffmpeg 0.8/include/libavutil/avstring.h index 662af6b70..2be84a9ed 100644 --- a/ffmpeg 0.8/include/libavutil/avstring.h +++ b/ffmpeg 0.8/include/libavutil/avstring.h @@ -110,6 +110,16 @@ size_t av_strlcat(char *dst, const char *src, size_t size); */ size_t av_strlcatf(char *dst, size_t size, const char *fmt, ...) av_printf_format(3, 4); +/** + * Print arguments following specified format into a large enough auto + * allocated buffer. It is similar to GNU asprintf(). + * @param fmt printf-compatible format string, specifying how the + * following parameters are used. + * @return the allocated string + * @note You have to free the string yourself with av_free(). + */ +char *av_asprintf(const char *fmt, ...) av_printf_format(1, 2); + /** * Convert a number to a av_malloced string. */ diff --git a/ffmpeg 0.8/include/libavutil/avutil.h b/ffmpeg 0.8/include/libavutil/avutil.h index 236622ed8..9282e5b89 100644 --- a/ffmpeg 0.8/include/libavutil/avutil.h +++ b/ffmpeg 0.8/include/libavutil/avutil.h @@ -40,8 +40,8 @@ #define AV_VERSION(a, b, c) AV_VERSION_DOT(a, b, c) #define LIBAVUTIL_VERSION_MAJOR 51 -#define LIBAVUTIL_VERSION_MINOR 14 -#define LIBAVUTIL_VERSION_MICRO 0 +#define LIBAVUTIL_VERSION_MINOR 16 +#define LIBAVUTIL_VERSION_MICRO 1 #define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \ LIBAVUTIL_VERSION_MINOR, \ @@ -69,6 +69,9 @@ #ifndef FF_API_AV_FIFO_PEEK #define FF_API_AV_FIFO_PEEK (LIBAVUTIL_VERSION_MAJOR < 52) #endif +#ifndef FF_API_OLD_AVOPTIONS +#define FF_API_OLD_AVOPTIONS (LIBAVUTIL_VERSION_MAJOR < 52) +#endif /** * Return the LIBAVUTIL_VERSION_INT constant. diff --git a/ffmpeg 0.8/include/libavutil/opt.h b/ffmpeg 0.8/include/libavutil/opt.h index 68873de56..95ce12c6a 100644 --- a/ffmpeg 0.8/include/libavutil/opt.h +++ b/ffmpeg 0.8/include/libavutil/opt.h @@ -134,7 +134,7 @@ const AVOption *av_find_opt(void *obj, const char *name, const char *unit, int m * when 0 then no av_free() nor av_strdup() will be used * @return 0 if the value has been set, or an AVERROR code in case of * error: - * AVERROR(ENOENT) if no matching option exists + * AVERROR_OPTION_NOT_FOUND if no matching option exists * AVERROR(ERANGE) if the value is out of range * AVERROR(EINVAL) if the value is not valid */ @@ -160,8 +160,17 @@ const AVOption *av_next_option(void *obj, const AVOption *last); */ int av_opt_show2(void *obj, void *av_log_obj, int req_flags, int rej_flags); +/** + * Set the values of all AVOption fields to their default values. + * + * @param s an AVOption-enabled struct (its first member must be a pointer to AVClass) + */ void av_opt_set_defaults(void *s); + +#if FF_API_OLD_AVOPTIONS +attribute_deprecated void av_opt_set_defaults2(void *s, int mask, int flags); +#endif /** * Parse the key/value pairs list in opts. For each key/value pair @@ -216,6 +225,13 @@ int av_opt_set_dict(void *obj, struct AVDictionary **options); #define AV_OPT_SEARCH_CHILDREN 0x0001 /**< Search in possible children of the given object first. */ +/** + * The obj passed to av_opt_find() is fake -- only a double pointer to AVClass + * instead of a required pointer to a struct containing AVClass. This is + * useful for searching for options without needing to allocate the corresponding + * object. + */ +#define AV_OPT_SEARCH_FAKE_OBJ 0x0002 /** * Look for an option in an object. Consider only options which @@ -223,6 +239,8 @@ int av_opt_set_dict(void *obj, struct AVDictionary **options); * * @param[in] obj A pointer to a struct whose first element is a * pointer to an AVClass. + * Alternatively a double pointer to an AVClass, if + * AV_OPT_SEARCH_FAKE_OBJ search flag is set. * @param[in] name The name of the option to look for. * @param[in] unit When searching for named constants, name of the unit * it belongs to. diff --git a/ffmpeg 0.8/include/libswresample/swresample.h b/ffmpeg 0.8/include/libswresample/swresample.h new file mode 100644 index 000000000..05c4f6dc0 --- /dev/null +++ b/ffmpeg 0.8/include/libswresample/swresample.h @@ -0,0 +1,79 @@ +/* + * Copyright (C) 2011 Michael Niedermayer (michaelni@gmx.at) + * + * This file is part of libswresample + * + * libswresample is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * libswresample is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with libswresample; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef SWR_H +#define SWR_H + +#include +#include "libavutil/samplefmt.h" + +#define LIBSWRESAMPLE_VERSION_MAJOR 0 +#define LIBSWRESAMPLE_VERSION_MINOR 0 +#define LIBSWRESAMPLE_VERSION_MICRO 0 + +#define SWR_CH_MAX 16 + +#define SWR_FLAG_RESAMPLE 1///< Force resampling even if equal sample rate +//TODO use int resample ? +//long term TODO can we enable this dynamically? + + +struct SwrContext; + +/** + * Allocate SwrContext. + * @see swr_init(),swr_free() + * @return NULL on error + */ +struct SwrContext *swr_alloc(void); + +/** + * Initialize context after user parameters have been set. + * @return negativo n error + */ +int swr_init(struct SwrContext *s); + +/** + * Allocate SwrContext. + * @see swr_init(),swr_free() + * @return NULL on error + */ +struct SwrContext *swr_alloc2(struct SwrContext *s, int64_t out_ch_layout, enum AVSampleFormat out_sample_fmt, int out_sample_rate, + int64_t in_ch_layout, enum AVSampleFormat in_sample_fmt, int in_sample_rate, + int log_offset, void *log_ctx); + +/** + * Free the given SwrContext. + * And set the pointer to NULL + */ +void swr_free(struct SwrContext **s); + +/** + * Convert audio. + * @param in_count Number of input samples available in one channel. + * @param out_count Amount of space available for output in samples per channel. + * @return number of samples output per channel + */ +int swr_convert(struct SwrContext *s, uint8_t *out[SWR_CH_MAX], int out_count, + const uint8_t *in [SWR_CH_MAX], int in_count); + +void swr_compensate(struct SwrContext *s, int sample_delta, int compensation_distance); + +#endif diff --git a/ffmpeg 0.8/include/libswscale/swscale.h b/ffmpeg 0.8/include/libswscale/swscale.h index f84e8798b..bdde675a8 100644 --- a/ffmpeg 0.8/include/libswscale/swscale.h +++ b/ffmpeg 0.8/include/libswscale/swscale.h @@ -32,7 +32,7 @@ #include "libavutil/pixfmt.h" #define LIBSWSCALE_VERSION_MAJOR 2 -#define LIBSWSCALE_VERSION_MINOR 0 +#define LIBSWSCALE_VERSION_MINOR 1 #define LIBSWSCALE_VERSION_MICRO 0 #define LIBSWSCALE_VERSION_INT AV_VERSION_INT(LIBSWSCALE_VERSION_MAJOR, \ @@ -354,5 +354,12 @@ void sws_convertPalette8ToPacked32(const uint8_t *src, uint8_t *dst, int num_pix */ void sws_convertPalette8ToPacked24(const uint8_t *src, uint8_t *dst, int num_pixels, const uint8_t *palette); +/** + * Get the AVClass for swsContext. It can be used in combination with + * AV_OPT_SEARCH_FAKE_OBJ for examining options. + * + * @see av_opt_find(). + */ +const AVClass *sws_get_class(void); #endif /* SWSCALE_SWSCALE_H */ diff --git a/ffmpeg 0.8/lib/avcodec.lib b/ffmpeg 0.8/lib/avcodec.lib index 2e8d61fe6..450347a25 100644 Binary files a/ffmpeg 0.8/lib/avcodec.lib and b/ffmpeg 0.8/lib/avcodec.lib differ diff --git a/ffmpeg 0.8/lib/avdevice.lib b/ffmpeg 0.8/lib/avdevice.lib index 955ffc1fc..9e44d0711 100644 Binary files a/ffmpeg 0.8/lib/avdevice.lib and b/ffmpeg 0.8/lib/avdevice.lib differ diff --git a/ffmpeg 0.8/lib/avfilter.lib b/ffmpeg 0.8/lib/avfilter.lib index 175792c67..26b6a88a2 100644 Binary files a/ffmpeg 0.8/lib/avfilter.lib and b/ffmpeg 0.8/lib/avfilter.lib differ diff --git a/ffmpeg 0.8/lib/avformat.lib b/ffmpeg 0.8/lib/avformat.lib index 1f9d1569d..38bde59a7 100644 Binary files a/ffmpeg 0.8/lib/avformat.lib and b/ffmpeg 0.8/lib/avformat.lib differ diff --git a/ffmpeg 0.8/lib/avutil.lib b/ffmpeg 0.8/lib/avutil.lib index 29063b607..78287ee1e 100644 Binary files a/ffmpeg 0.8/lib/avutil.lib and b/ffmpeg 0.8/lib/avutil.lib differ diff --git a/ffmpeg 0.8/lib/postproc.lib b/ffmpeg 0.8/lib/postproc.lib index 325fbaeea..a19174f7a 100644 Binary files a/ffmpeg 0.8/lib/postproc.lib and b/ffmpeg 0.8/lib/postproc.lib differ diff --git a/ffmpeg 0.8/lib/swresample.lib b/ffmpeg 0.8/lib/swresample.lib new file mode 100644 index 000000000..dc33f4f52 Binary files /dev/null and b/ffmpeg 0.8/lib/swresample.lib differ diff --git a/ffmpeg 0.8/lib/swscale.lib b/ffmpeg 0.8/lib/swscale.lib index c4561b019..b39cb94d3 100644 Binary files a/ffmpeg 0.8/lib/swscale.lib and b/ffmpeg 0.8/lib/swscale.lib differ