]> git.sesse.net Git - ffmpeg/blob - libavutil/log.h
slightly faster deblock
[ffmpeg] / libavutil / log.h
1 #ifndef LOG_H
2 #define LOG_H
3
4 #include <stdarg.h>
5
6 /**
7  * Used by av_log
8  */
9 typedef struct AVCLASS AVClass;
10 struct AVCLASS {
11     const char* class_name;
12     const char* (*item_name)(void*); /* actually passing a pointer to an AVCodecContext
13                                         or AVFormatContext, which begin with an AVClass.
14                                         Needed because av_log is in libavcodec and has no visibility
15                                         of AVIn/OutputFormat */
16     struct AVOption *option;
17 };
18
19 /* av_log API */
20
21 #define AV_LOG_QUIET -1
22 #define AV_LOG_ERROR 0
23 #define AV_LOG_INFO 1
24 #define AV_LOG_DEBUG 2
25 extern int av_log_level;
26
27 #ifdef __GNUC__
28 extern void av_log(void*, int level, const char *fmt, ...) __attribute__ ((__format__ (__printf__, 3, 4)));
29 #else
30 extern void av_log(void*, int level, const char *fmt, ...);
31 #endif
32
33 #if LIBAVUTIL_VERSION_INT < (50<<16)
34 extern void av_vlog(void*, int level, const char *fmt, va_list);
35 extern int av_log_get_level(void);
36 extern void av_log_set_level(int);
37 extern void av_log_set_callback(void (*)(void*, int, const char*, va_list));
38 #else
39 extern void (*av_vlog)(void*, int, const char*, va_list);
40 #endif
41
42 #endif /* LOG_H */