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
00127 #define AV_LOG_MAX_OFFSET (AV_LOG_DEBUG - AV_LOG_QUIET)
00128
00143 void av_log(void *avcl, int level, const char *fmt, ...) av_printf_format(3, 4);
00144
00145 void av_vlog(void *avcl, int level, const char *fmt, va_list);
00146 int av_log_get_level(void);
00147 void av_log_set_level(int);
00148 void av_log_set_callback(void (*)(void*, int, const char*, va_list));
00149 void av_log_default_callback(void* ptr, int level, const char* fmt, va_list vl);
00150 const char* av_default_item_name(void* ctx);
00151
00159 void av_log_format_line(void *ptr, int level, const char *fmt, va_list vl,
00160 char *line, int line_size, int *print_prefix);
00161
00167 #ifdef DEBUG
00168 # define av_dlog(pctx, ...) av_log(pctx, AV_LOG_DEBUG, __VA_ARGS__)
00169 #else
00170 # define av_dlog(pctx, ...) do { if (0) av_log(pctx, AV_LOG_DEBUG, __VA_ARGS__); } while (0)
00171 #endif
00172
00181 #define AV_LOG_SKIP_REPEATED 1
00182 void av_log_set_flags(int arg);
00183
00184 #endif