00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef AVUTIL_LOG_H
00022 #define AVUTIL_LOG_H
00023
00024 #include <stdarg.h>
00025 #include "avutil.h"
00026
00032 typedef struct {
00037 const char* class_name;
00038
00043 const char* (*item_name)(void* ctx);
00044
00050 const struct AVOption *option;
00051
00058 int version;
00059
00064 int log_level_offset_offset;
00065
00072 int parent_log_context_offset;
00073 } AVClass;
00074
00075
00076
00077 #define AV_LOG_QUIET -8
00078
00082 #define AV_LOG_PANIC 0
00083
00089 #define AV_LOG_FATAL 8
00090
00095 #define AV_LOG_ERROR 16
00096
00101 #define AV_LOG_WARNING 24
00102
00103 #define AV_LOG_INFO 32
00104 #define AV_LOG_VERBOSE 40
00105
00109 #define AV_LOG_DEBUG 48
00110
00125 #ifdef __GNUC__
00126 void av_log(void *avcl, int level, const char *fmt, ...) __attribute__ ((__format__ (__printf__, 3, 4)));
00127 #else
00128 void av_log(void *avcl, int level, const char *fmt, ...);
00129 #endif
00130
00131 void av_vlog(void *avcl, int level, const char *fmt, va_list);
00132 int av_log_get_level(void);
00133 void av_log_set_level(int);
00134 void av_log_set_callback(void (*)(void*, int, const char*, va_list));
00135 void av_log_default_callback(void* ptr, int level, const char* fmt, va_list vl);
00136 const char* av_default_item_name(void* ctx);
00137
00143 #ifdef DEBUG
00144 # define av_dlog(pctx, ...) av_log(pctx, AV_LOG_DEBUG, __VA_ARGS__)
00145 #else
00146 # define av_dlog(pctx, ...)
00147 #endif
00148
00157 #define AV_LOG_SKIP_REPEATED 1
00158 void av_log_set_flags(int arg);
00159
00160 #endif