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
00078 const struct AVOption* (*opt_find)(void *obj, const char *name, const char *unit,
00079 int opt_flags, int search_flags);
00080 } AVClass;
00081
00082
00083
00084 #define AV_LOG_QUIET -8
00085
00089 #define AV_LOG_PANIC 0
00090
00096 #define AV_LOG_FATAL 8
00097
00102 #define AV_LOG_ERROR 16
00103
00108 #define AV_LOG_WARNING 24
00109
00110 #define AV_LOG_INFO 32
00111 #define AV_LOG_VERBOSE 40
00112
00116 #define AV_LOG_DEBUG 48
00117
00132 #ifdef __GNUC__
00133 void av_log(void *avcl, int level, const char *fmt, ...) __attribute__ ((__format__ (__printf__, 3, 4)));
00134 #else
00135 void av_log(void *avcl, int level, const char *fmt, ...);
00136 #endif
00137
00138 void av_vlog(void *avcl, int level, const char *fmt, va_list);
00139 int av_log_get_level(void);
00140 void av_log_set_level(int);
00141 void av_log_set_callback(void (*)(void*, int, const char*, va_list));
00142 void av_log_default_callback(void* ptr, int level, const char* fmt, va_list vl);
00143 const char* av_default_item_name(void* ctx);
00144
00150 #ifdef DEBUG
00151 # define av_dlog(pctx, ...) av_log(pctx, AV_LOG_DEBUG, __VA_ARGS__)
00152 #else
00153 # define av_dlog(pctx, ...) do { if (0) av_log(pctx, AV_LOG_DEBUG, __VA_ARGS__); } while (0)
00154 #endif
00155
00164 #define AV_LOG_SKIP_REPEATED 1
00165 void av_log_set_flags(int arg);
00166
00167 #endif