• Main Page
  • Related Pages
  • Modules
  • Data Structures
  • Files
  • Examples
  • File List
  • Globals

libavutil/log.h

Go to the documentation of this file.
00001 /*
00002  * copyright (c) 2006 Michael Niedermayer <michaelni@gmx.at>
00003  *
00004  * This file is part of Libav.
00005  *
00006  * Libav is free software; you can redistribute it and/or
00007  * modify it under the terms of the GNU Lesser General Public
00008  * License as published by the Free Software Foundation; either
00009  * version 2.1 of the License, or (at your option) any later version.
00010  *
00011  * Libav is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014  * Lesser General Public License for more details.
00015  *
00016  * You should have received a copy of the GNU Lesser General Public
00017  * License along with Libav; if not, write to the Free Software
00018  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
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 /* av_log API */
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 
00155 #ifdef DEBUG
00156 #    define av_dlog(pctx, ...) av_log(pctx, AV_LOG_DEBUG, __VA_ARGS__)
00157 #else
00158 #    define av_dlog(pctx, ...)
00159 #endif
00160 
00169 #define AV_LOG_SKIP_REPEATED 1
00170 void av_log_set_flags(int arg);
00171 
00172 #endif /* AVUTIL_LOG_H */
Generated on Thu Jul 11 2013 15:38:24 for Libav by doxygen 1.7.1