diff options
author | Måns Rullgård <mans@mansr.com> | 2007-12-12 21:48:50 +0000 |
---|---|---|
committer | Måns Rullgård <mans@mansr.com> | 2007-12-12 21:48:50 +0000 |
commit | a309073bf44e58868e4124900ddcecc2aefbdf3b (patch) | |
tree | ca934d627e3d6551416fce079bc56d6768e30491 /libavutil | |
parent | 0bc308de56947f2f8580b974ee8631b27a726cd6 (diff) | |
download | ffmpeg-a309073bf44e58868e4124900ddcecc2aefbdf3b.tar.gz |
use av_log_get/set_level()
Originally committed as revision 11209 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavutil')
-rw-r--r-- | libavutil/log.c | 6 | ||||
-rw-r--r-- | libavutil/log.h | 7 |
2 files changed, 3 insertions, 10 deletions
diff --git a/libavutil/log.c b/libavutil/log.c index 4fd503d0de..fed0ce80a0 100644 --- a/libavutil/log.c +++ b/libavutil/log.c @@ -45,11 +45,7 @@ void av_log_default_callback(void* ptr, int level, const char* fmt, va_list vl) vfprintf(stderr, fmt, vl); } -#if LIBAVUTIL_VERSION_INT < (50<<16) static void (*av_log_callback)(void*, int, const char*, va_list) = av_log_default_callback; -#else -void (*av_vlog)(void*, int, const char*, va_list) = av_log_default_callback; -#endif void av_log(void* avcl, int level, const char *fmt, ...) { @@ -59,7 +55,6 @@ void av_log(void* avcl, int level, const char *fmt, ...) va_end(vl); } -#if LIBAVUTIL_VERSION_INT < (50<<16) void av_vlog(void* avcl, int level, const char *fmt, va_list vl) { av_log_callback(avcl, level, fmt, vl); @@ -79,4 +74,3 @@ void av_log_set_callback(void (*callback)(void*, int, const char*, va_list)) { av_log_callback = callback; } -#endif diff --git a/libavutil/log.h b/libavutil/log.h index 243037239d..5d18197efb 100644 --- a/libavutil/log.h +++ b/libavutil/log.h @@ -81,7 +81,10 @@ struct AVCLASS { */ #define AV_LOG_DEBUG 48 #endif + +#if LIBAVUTIL_VERSION_INT < (50<<16) extern int av_log_level; +#endif /** * Send the specified message to the log if the level is less than or equal to @@ -103,14 +106,10 @@ extern void av_log(void*, int level, const char *fmt, ...) __attribute__ ((__for extern void av_log(void*, int level, const char *fmt, ...); #endif -#if LIBAVUTIL_VERSION_INT < (50<<16) extern void av_vlog(void*, int level, const char *fmt, va_list); extern int av_log_get_level(void); extern void av_log_set_level(int); extern void av_log_set_callback(void (*)(void*, int, const char*, va_list)); extern void av_log_default_callback(void* ptr, int level, const char* fmt, va_list vl); -#else -extern void (*av_vlog)(void*, int, const char*, va_list); -#endif #endif /* FFMPEG_LOG_H */ |