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 #include "attributes.h"
00027
00033 typedef struct AVClass {
00038 const char* class_name;
00039
00044 const char* (*item_name)(void* ctx);
00045
00051 const struct AVOption *option;
00052
00059 int version;
00060
00065 int log_level_offset_offset;
00066
00073 int parent_log_context_offset;
00074
00078 void* (*child_next)(void *obj, void *prev);
00079
00088 const struct AVClass* (*child_class_next)(const struct AVClass *prev);
00089 } AVClass;
00090
00091
00092
00093 #define AV_LOG_QUIET -8
00094
00098 #define AV_LOG_PANIC 0
00099
00105 #define AV_LOG_FATAL 8
00106
00111 #define AV_LOG_ERROR 16
00112
00117 #define AV_LOG_WARNING 24
00118
00119 #define AV_LOG_INFO 32
00120 #define AV_LOG_VERBOSE 40
00121
00125 #define AV_LOG_DEBUG 48
00126
00141 void av_log(void *avcl, int level, const char *fmt, ...) av_printf_format(3, 4);
00142
00143 void av_vlog(void *avcl, int level, const char *fmt, va_list);
00144 int av_log_get_level(void);
00145 void av_log_set_level(int);
00146 void av_log_set_callback(void (*)(void*, int, const char*, va_list));
00147 void av_log_default_callback(void* ptr, int level, const char* fmt, va_list vl);
00148 const char* av_default_item_name(void* ctx);
00149
00157 void av_log_format_line(void *ptr, int level, const char *fmt, va_list vl,
00158 char *line, int line_size, int *print_prefix);
00159
00165 #ifdef DEBUG
00166 # define av_dlog(pctx, ...) av_log(pctx, AV_LOG_DEBUG, __VA_ARGS__)
00167 #else
00168 # define av_dlog(pctx, ...) do { if (0) av_log(pctx, AV_LOG_DEBUG, __VA_ARGS__); } while (0)
00169 #endif
00170
00179 #define AV_LOG_SKIP_REPEATED 1
00180 void av_log_set_flags(int arg);
00181
00182 #endif