From 139f3ac42dcf24eb8c59af4aaab4e9afdccbc996 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Thu, 3 Feb 2011 12:18:16 +0100 Subject: Bump major versions of all libraries. They've accumulated enough new APIs and corresponding deprecated cruft. This breaks API and ABI. --- libavutil/avutil.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'libavutil') diff --git a/libavutil/avutil.h b/libavutil/avutil.h index 4c86be1b86..6f2517c092 100644 --- a/libavutil/avutil.h +++ b/libavutil/avutil.h @@ -39,9 +39,9 @@ #define AV_VERSION_DOT(a, b, c) a ##.## b ##.## c #define AV_VERSION(a, b, c) AV_VERSION_DOT(a, b, c) -#define LIBAVUTIL_VERSION_MAJOR 50 -#define LIBAVUTIL_VERSION_MINOR 40 -#define LIBAVUTIL_VERSION_MICRO 1 +#define LIBAVUTIL_VERSION_MAJOR 51 +#define LIBAVUTIL_VERSION_MINOR 0 +#define LIBAVUTIL_VERSION_MICRO 0 #define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \ LIBAVUTIL_VERSION_MINOR, \ -- cgit v1.2.3 From 516fb5e40cf9d591914096be26ba56fc59294669 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Tue, 12 Apr 2011 20:57:07 +0200 Subject: lavu: remove FF_API_OLD_EVAL_NAMES cruft --- libavutil/avutil.h | 3 --- libavutil/eval.c | 32 -------------------------------- libavutil/eval.h | 33 --------------------------------- 3 files changed, 68 deletions(-) (limited to 'libavutil') diff --git a/libavutil/avutil.h b/libavutil/avutil.h index 6f2517c092..edae38eb69 100644 --- a/libavutil/avutil.h +++ b/libavutil/avutil.h @@ -57,9 +57,6 @@ * Those FF_API_* defines are not part of public API. * They may change, break or disappear at any time. */ -#ifndef FF_API_OLD_EVAL_NAMES -#define FF_API_OLD_EVAL_NAMES (LIBAVUTIL_VERSION_MAJOR < 51) -#endif /** * Return the LIBAVUTIL_VERSION_INT constant. diff --git a/libavutil/eval.c b/libavutil/eval.c index 7488a310a7..a6a59a39ef 100644 --- a/libavutil/eval.c +++ b/libavutil/eval.c @@ -530,38 +530,6 @@ int av_expr_parse_and_eval(double *d, const char *s, return isnan(*d) ? AVERROR(EINVAL) : 0; } -#if FF_API_OLD_EVAL_NAMES -int av_parse_expr(AVExpr **expr, const char *s, - const char * const *const_names, - const char * const *func1_names, double (* const *funcs1)(void *, double), - const char * const *func2_names, double (* const *funcs2)(void *, double, double), - int log_offset, void *log_ctx) -{ - return av_expr_parse(expr, s, const_names, func1_names, funcs1, func2_names, funcs2, - log_offset, log_ctx); -} - -double av_eval_expr(AVExpr *e, const double *const_values, void *opaque) -{ - return av_expr_eval(e, const_values, opaque); -} - -int av_parse_and_eval_expr(double *res, const char *s, - const char * const *const_names, const double *const_values, - const char * const *func1_names, double (* const *funcs1)(void *, double), - const char * const *func2_names, double (* const *funcs2)(void *, double, double), - void *opaque, int log_offset, void *log_ctx) -{ - return av_expr_parse_and_eval(res, s, const_names, const_values, func1_names, funcs1, func2_names, funcs2, - opaque, log_offset, log_ctx); -} - -void av_free_expr(AVExpr *e) -{ - av_expr_free(e); -} -#endif /* FF_API_OLD_EVAL_NAMES */ - #ifdef TEST #undef printf static double const_values[] = { diff --git a/libavutil/eval.h b/libavutil/eval.h index a20a006ac8..c485c69fb1 100644 --- a/libavutil/eval.h +++ b/libavutil/eval.h @@ -91,39 +91,6 @@ double av_expr_eval(AVExpr *e, const double *const_values, void *opaque); */ void av_expr_free(AVExpr *e); -#if FF_API_OLD_EVAL_NAMES -/** - * @deprecated Deprecated in favor of av_expr_parse_and_eval(). - */ -attribute_deprecated -int av_parse_and_eval_expr(double *res, const char *s, - const char * const *const_names, const double *const_values, - const char * const *func1_names, double (* const *funcs1)(void *, double), - const char * const *func2_names, double (* const *funcs2)(void *, double, double), - void *opaque, int log_offset, void *log_ctx); - -/** - * @deprecated Deprecated in favor of av_expr_parse(). - */ -attribute_deprecated -int av_parse_expr(AVExpr **expr, const char *s, - const char * const *const_names, - const char * const *func1_names, double (* const *funcs1)(void *, double), - const char * const *func2_names, double (* const *funcs2)(void *, double, double), - int log_offset, void *log_ctx); -/** - * @deprecated Deprecated in favor of av_expr_eval(). - */ -attribute_deprecated -double av_eval_expr(AVExpr *e, const double *const_values, void *opaque); - -/** - * @deprecated Deprecated in favor of av_expr_free(). - */ -attribute_deprecated -void av_free_expr(AVExpr *e); -#endif /* FF_API_OLD_EVAL_NAMES */ - /** * Parse the string in numstr and return its value as a double. If * the string is empty, contains only whitespaces, or does not contain -- cgit v1.2.3 From 9e5c62c97fc0a6ee5764ec69cc6c237b5f70026b Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Tue, 12 Apr 2011 21:11:15 +0200 Subject: lavu: remove FF_API_OLD_IMAGE_NAMES cruft --- libavutil/avutil.h | 8 -------- libavutil/imgutils.c | 29 ----------------------------- libavutil/imgutils.h | 19 ------------------- 3 files changed, 56 deletions(-) (limited to 'libavutil') diff --git a/libavutil/avutil.h b/libavutil/avutil.h index edae38eb69..abbdd0642a 100644 --- a/libavutil/avutil.h +++ b/libavutil/avutil.h @@ -94,14 +94,6 @@ enum AVMediaType { #define AV_TIME_BASE 1000000 #define AV_TIME_BASE_Q (AVRational){1, AV_TIME_BASE} -/** - * Those FF_API_* defines are not part of public API. - * They may change, break or disappear at any time. - */ -#ifndef FF_API_OLD_IMAGE_NAMES -#define FF_API_OLD_IMAGE_NAMES (LIBAVUTIL_VERSION_MAJOR < 51) -#endif - #include "common.h" #include "error.h" #include "mathematics.h" diff --git a/libavutil/imgutils.c b/libavutil/imgutils.c index 129fb9555d..544007f120 100644 --- a/libavutil/imgutils.c +++ b/libavutil/imgutils.c @@ -266,32 +266,3 @@ void av_image_copy(uint8_t *dst_data[4], int dst_linesizes[4], } } } - -#if FF_API_OLD_IMAGE_NAMES -void av_fill_image_max_pixsteps(int max_pixsteps[4], int max_pixstep_comps[4], - const AVPixFmtDescriptor *pixdesc) -{ - av_image_fill_max_pixsteps(max_pixsteps, max_pixstep_comps, pixdesc); -} - -int av_get_image_linesize(enum PixelFormat pix_fmt, int width, int plane) -{ - return av_image_get_linesize(pix_fmt, width, plane); -} - -int av_fill_image_linesizes(int linesizes[4], enum PixelFormat pix_fmt, int width) -{ - return av_image_fill_linesizes(linesizes, pix_fmt, width); -} - -int av_fill_image_pointers(uint8_t *data[4], enum PixelFormat pix_fmt, int height, - uint8_t *ptr, const int linesizes[4]) -{ - return av_image_fill_pointers(data, pix_fmt, height, ptr, linesizes); -} - -int av_check_image_size(unsigned int w, unsigned int h, int log_offset, void *log_ctx) -{ - return av_image_check_size(w, h, log_offset, log_ctx); -} -#endif diff --git a/libavutil/imgutils.h b/libavutil/imgutils.h index 6ebb1b0a6c..7abeb657fb 100644 --- a/libavutil/imgutils.h +++ b/libavutil/imgutils.h @@ -127,23 +127,4 @@ int av_image_check_size(unsigned int w, unsigned int h, int log_offset, void *lo int ff_set_systematic_pal2(uint32_t pal[256], enum PixelFormat pix_fmt); -#if FF_API_OLD_IMAGE_NAMES -attribute_deprecated -void av_fill_image_max_pixsteps(int max_pixsteps[4], int max_pixstep_comps[4], - const AVPixFmtDescriptor *pixdesc); - -attribute_deprecated -int av_get_image_linesize(enum PixelFormat pix_fmt, int width, int plane); - -attribute_deprecated -int av_fill_image_linesizes(int linesizes[4], enum PixelFormat pix_fmt, int width); - -attribute_deprecated -int av_fill_image_pointers(uint8_t *data[4], enum PixelFormat pix_fmt, int height, - uint8_t *ptr, const int linesizes[4]); - -attribute_deprecated -int av_check_image_size(unsigned int w, unsigned int h, int log_offset, void *log_ctx); -#endif - #endif /* AVUTIL_IMGUTILS_H */ -- cgit v1.2.3 From 490a022d86ef1c506a79744c5a95368af356fc69 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Tue, 12 Apr 2011 21:17:26 +0200 Subject: lavu: remove misc disabled cruft --- libavutil/error.h | 13 ------------- libavutil/file.c | 3 +-- libavutil/log.c | 5 +---- libavutil/mem.c | 6 +++--- libavutil/mem.h | 14 +++----------- 5 files changed, 8 insertions(+), 33 deletions(-) (limited to 'libavutil') diff --git a/libavutil/error.h b/libavutil/error.h index 8c83ecde77..33332b18c4 100644 --- a/libavutil/error.h +++ b/libavutil/error.h @@ -37,25 +37,12 @@ #define AVUNERROR(e) (e) #endif -#if LIBAVUTIL_VERSION_MAJOR < 51 -#define AVERROR_INVALIDDATA AVERROR(EINVAL) ///< Invalid data found when processing input -#define AVERROR_IO AVERROR(EIO) ///< I/O error -#define AVERROR_NOENT AVERROR(ENOENT) ///< No such file or directory -#define AVERROR_NOFMT AVERROR(EILSEQ) ///< Unknown format -#define AVERROR_NOMEM AVERROR(ENOMEM) ///< Not enough memory -#define AVERROR_NOTSUPP AVERROR(ENOSYS) ///< Operation not supported -#define AVERROR_NUMEXPECTED AVERROR(EDOM) ///< Number syntax expected in filename -#define AVERROR_UNKNOWN AVERROR(EINVAL) ///< Unknown error -#endif - #define AVERROR_EOF AVERROR(EPIPE) ///< End of file #define AVERROR_PATCHWELCOME (-MKTAG('P','A','W','E')) ///< Not yet implemented in Libav, patches welcome -#if LIBAVUTIL_VERSION_MAJOR > 50 #define AVERROR_INVALIDDATA (-MKTAG('I','N','D','A')) ///< Invalid data found when processing input #define AVERROR_NUMEXPECTED (-MKTAG('N','U','E','X')) ///< Number syntax expected in filename -#endif #define AVERROR_DEMUXER_NOT_FOUND (-MKTAG(0xF8,'D','E','M')) ///< Demuxer not found #define AVERROR_MUXER_NOT_FOUND (-MKTAG(0xF8,'M','U','X')) ///< Muxer not found diff --git a/libavutil/file.c b/libavutil/file.c index 757e73bafb..3dcce7c2f8 100644 --- a/libavutil/file.c +++ b/libavutil/file.c @@ -47,7 +47,6 @@ int av_file_map(const char *filename, uint8_t **bufptr, size_t *size, av_unused void *ptr; off_t off_size; char errbuf[128]; - size_t max_size = HAVE_MMAP ? SIZE_MAX : FF_INTERNAL_MEM_TYPE_MAX_VALUE; *bufptr = NULL; if (fd < 0) { @@ -66,7 +65,7 @@ int av_file_map(const char *filename, uint8_t **bufptr, size_t *size, } off_size = st.st_size; - if (off_size > max_size) { + if (off_size > SIZE_MAX) { av_log(&file_log_ctx, AV_LOG_ERROR, "File size for file '%s' is too big\n", filename); close(fd); diff --git a/libavutil/log.c b/libavutil/log.c index 3b8244889f..72d2b914bd 100644 --- a/libavutil/log.c +++ b/libavutil/log.c @@ -29,10 +29,7 @@ #include "avutil.h" #include "log.h" -#if LIBAVUTIL_VERSION_MAJOR > 50 -static -#endif -int av_log_level = AV_LOG_INFO; +static int av_log_level = AV_LOG_INFO; static int flags; #if defined(_WIN32) && !defined(__MINGW32CE__) diff --git a/libavutil/mem.c b/libavutil/mem.c index 7a54bd0f7e..2aef9b0a1b 100644 --- a/libavutil/mem.c +++ b/libavutil/mem.c @@ -61,7 +61,7 @@ void free(void *ptr); memory allocator. You do not need to suppress this file because the linker will do it automatically. */ -void *av_malloc(FF_INTERNAL_MEM_TYPE size) +void *av_malloc(size_t size) { void *ptr = NULL; #if CONFIG_MEMALIGN_HACK @@ -116,7 +116,7 @@ void *av_malloc(FF_INTERNAL_MEM_TYPE size) return ptr; } -void *av_realloc(void *ptr, FF_INTERNAL_MEM_TYPE size) +void *av_realloc(void *ptr, size_t size) { #if CONFIG_MEMALIGN_HACK int diff; @@ -153,7 +153,7 @@ void av_freep(void *arg) *ptr = NULL; } -void *av_mallocz(FF_INTERNAL_MEM_TYPE size) +void *av_mallocz(size_t size) { void *ptr = av_malloc(size); if (ptr) diff --git a/libavutil/mem.h b/libavutil/mem.h index f52777b071..5dea492021 100644 --- a/libavutil/mem.h +++ b/libavutil/mem.h @@ -62,14 +62,6 @@ #define av_alloc_size(n) #endif -#if LIBAVUTIL_VERSION_MAJOR < 51 -# define FF_INTERNAL_MEM_TYPE unsigned int -# define FF_INTERNAL_MEM_TYPE_MAX_VALUE UINT_MAX -#else -# define FF_INTERNAL_MEM_TYPE size_t -# define FF_INTERNAL_MEM_TYPE_MAX_VALUE SIZE_MAX -#endif - /** * Allocate a block of size bytes with alignment suitable for all * memory accesses (including vectors if available on the CPU). @@ -78,7 +70,7 @@ * be allocated. * @see av_mallocz() */ -void *av_malloc(FF_INTERNAL_MEM_TYPE size) av_malloc_attrib av_alloc_size(1); +void *av_malloc(size_t size) av_malloc_attrib av_alloc_size(1); /** * Allocate or reallocate a block of memory. @@ -92,7 +84,7 @@ void *av_malloc(FF_INTERNAL_MEM_TYPE size) av_malloc_attrib av_alloc_size(1); * cannot be reallocated or the function is used to free the memory block. * @see av_fast_realloc() */ -void *av_realloc(void *ptr, FF_INTERNAL_MEM_TYPE size) av_alloc_size(2); +void *av_realloc(void *ptr, size_t size) av_alloc_size(2); /** * Free a memory block which has been allocated with av_malloc(z)() or @@ -112,7 +104,7 @@ void av_free(void *ptr); * @return Pointer to the allocated block, NULL if it cannot be allocated. * @see av_malloc() */ -void *av_mallocz(FF_INTERNAL_MEM_TYPE size) av_malloc_attrib av_alloc_size(1); +void *av_mallocz(size_t size) av_malloc_attrib av_alloc_size(1); /** * Duplicate the string s. -- cgit v1.2.3