comparison log.h @ 81:5cfa773a3bdd libavutil

Move av_log() & friends to libavutil
author lucabe
date Tue, 18 Jul 2006 11:00:55 +0000
parents
children b39b6310973c
comparison
equal deleted inserted replaced
80:624fc3ad183a 81:5cfa773a3bdd
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
26 #ifdef __GNUC__
27 extern void av_log(void*, int level, const char *fmt, ...) __attribute__ ((__format__ (__printf__, 3, 4)));
28 #else
29 extern void av_log(void*, int level, const char *fmt, ...);
30 #endif
31
32 extern void av_vlog(void*, int level, const char *fmt, va_list);
33 extern int av_log_get_level(void);
34 extern void av_log_set_level(int);
35 extern void av_log_set_callback(void (*)(void*, int, const char*, va_list));
36
37 #endif /* LOG_H */