diff options
author | Diego Biurrun <diego@biurrun.de> | 2013-01-22 02:41:54 +0100 |
---|---|---|
committer | Diego Biurrun <diego@biurrun.de> | 2013-03-13 20:42:06 +0100 |
commit | f099d3d1d5466bd63f4ab36270d169ff9ea613b8 (patch) | |
tree | 2ab260e6b16efde06b2909b28cf1013aa46b8f1f /libavcodec | |
parent | 4abf6fa095f8082499d5a24cdfb18eb4c1fec60e (diff) | |
download | ffmpeg-f099d3d1d5466bd63f4ab36270d169ff9ea613b8.tar.gz |
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.
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/avcodec.h | 6 | ||||
-rw-r--r-- | libavcodec/utils.c | 3 | ||||
-rw-r--r-- | libavcodec/version.h | 3 |
3 files changed, 12 insertions, 0 deletions
diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h index e48b114a45..f7d6553fa5 100644 --- a/libavcodec/avcodec.h +++ b/libavcodec/avcodec.h @@ -4026,6 +4026,7 @@ void av_fast_padded_malloc(void *ptr, unsigned int *size, size_t min_size); */ unsigned int av_xiphlacing(unsigned char *s, unsigned int v); +#if FF_API_MISSING_SAMPLE /** * Log a generic warning message about a missing feature. This function is * intended to be used internally by Libav (libavcodec, libavformat, etc.) @@ -4037,7 +4038,9 @@ unsigned int av_xiphlacing(unsigned char *s, unsigned int v); * If want_sample is non-zero, additional verbage will be added to the log * message which tells the user how to report samples to the development * mailing list. + * @deprecated Use avpriv_report_missing_feature() instead. */ +attribute_deprecated void av_log_missing_feature(void *avc, const char *feature, int want_sample); /** @@ -4047,8 +4050,11 @@ void av_log_missing_feature(void *avc, const char *feature, int want_sample); * @param[in] avc a pointer to an arbitrary struct of which the first field is * a pointer to an AVClass struct * @param[in] msg string containing an optional message, or NULL if no message + * @deprecated Use avpriv_request_sample() instead. */ +attribute_deprecated void av_log_ask_for_sample(void *avc, const char *msg, ...) av_printf_format(2, 3); +#endif /* FF_API_MISSING_SAMPLE */ /** * Register the hardware accelerator hwaccel. diff --git a/libavcodec/utils.c b/libavcodec/utils.c index b4c294e0de..818dc5773e 100644 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@ -42,6 +42,7 @@ #include "thread.h" #include "internal.h" #include "bytestream.h" +#include "version.h" #include <stdlib.h> #include <stdarg.h> #include <limits.h> @@ -2032,6 +2033,7 @@ int ff_match_2uint16(const uint16_t(*tab)[2], int size, int a, int b) return i; } +#if FF_API_MISSING_SAMPLE void av_log_missing_feature(void *avc, const char *feature, int want_sample) { av_log(avc, AV_LOG_WARNING, "%s is not implemented. Update your Libav " @@ -2056,6 +2058,7 @@ void av_log_ask_for_sample(void *avc, const char *msg, ...) va_end(argument_list); } +#endif /* FF_API_MISSING_SAMPLE */ static AVHWAccel *first_hwaccel = NULL; diff --git a/libavcodec/version.h b/libavcodec/version.h index 561c880474..8b4fbce1e5 100644 --- a/libavcodec/version.h +++ b/libavcodec/version.h @@ -58,5 +58,8 @@ #ifndef FF_API_GET_BUFFER #define FF_API_GET_BUFFER (LIBAVCODEC_VERSION_MAJOR < 56) #endif +#ifndef FF_API_MISSING_SAMPLE +#define FF_API_MISSING_SAMPLE (LIBAVCODEC_VERSION_MAJOR < 56) +#endif #endif /* AVCODEC_VERSION_H */ |