Miam-Player  0.8.0
A nice music player
log.h
Go to the documentation of this file.
1 /*
2  * copyright (c) 2006 Michael Niedermayer <michaelni@gmx.at>
3  *
4  * This file is part of FFmpeg.
5  *
6  * FFmpeg is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or (at your option) any later version.
10  *
11  * FFmpeg is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with FFmpeg; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19  */
20 
21 #ifndef AVUTIL_LOG_H
22 #define AVUTIL_LOG_H
23 
24 #include <stdarg.h>
25 #include "avutil.h"
26 #include "attributes.h"
27 #include "version.h"
28 
29 typedef enum {
49 
50 #define AV_IS_INPUT_DEVICE(category) \
51  (((category) == AV_CLASS_CATEGORY_DEVICE_VIDEO_INPUT) || \
52  ((category) == AV_CLASS_CATEGORY_DEVICE_AUDIO_INPUT) || \
53  ((category) == AV_CLASS_CATEGORY_DEVICE_INPUT))
54 
55 #define AV_IS_OUTPUT_DEVICE(category) \
56  (((category) == AV_CLASS_CATEGORY_DEVICE_VIDEO_OUTPUT) || \
57  ((category) == AV_CLASS_CATEGORY_DEVICE_AUDIO_OUTPUT) || \
58  ((category) == AV_CLASS_CATEGORY_DEVICE_OUTPUT))
59 
60 struct AVOptionRanges;
61 
67 typedef struct AVClass {
72  const char* class_name;
73 
78  const char* (*item_name)(void* ctx);
79 
85  const struct AVOption *option;
86 
93  int version;
94 
100 
109 
113  void* (*child_next)(void *obj, void *prev);
114 
123  const struct AVClass* (*child_class_next)(const struct AVClass *prev);
124 
131 
137 
142  int (*query_ranges)(struct AVOptionRanges **, void *obj, const char *key, int flags);
143 } AVClass;
144 
158 #define AV_LOG_QUIET -8
159 
163 #define AV_LOG_PANIC 0
164 
170 #define AV_LOG_FATAL 8
171 
176 #define AV_LOG_ERROR 16
177 
182 #define AV_LOG_WARNING 24
183 
187 #define AV_LOG_INFO 32
188 
192 #define AV_LOG_VERBOSE 40
193 
197 #define AV_LOG_DEBUG 48
198 
202 #define AV_LOG_TRACE 56
203 
204 #define AV_LOG_MAX_OFFSET (AV_LOG_TRACE - AV_LOG_QUIET)
205 
218 #define AV_LOG_C(x) ((x) << 8)
219 
234 void av_log(void *avcl, int level, const char *fmt, ...) av_printf_format(3, 4);
235 
236 
252 void av_vlog(void *avcl, int level, const char *fmt, va_list vl);
253 
261 int av_log_get_level(void);
262 
270 void av_log_set_level(int level);
271 
282 void av_log_set_callback(void (*callback)(void*, int, const char*, va_list));
283 
297 void av_log_default_callback(void *avcl, int level, const char *fmt,
298  va_list vl);
299 
307 const char* av_default_item_name(void* ctx);
309 
317 void av_log_format_line(void *ptr, int level, const char *fmt, va_list vl,
318  char *line, int line_size, int *print_prefix);
319 
334 int av_log_format_line2(void *ptr, int level, const char *fmt, va_list vl,
335  char *line, int line_size, int *print_prefix);
336 
337 #if FF_API_DLOG
338 
344 #ifdef DEBUG
345 # define av_dlog(pctx, ...) av_log(pctx, AV_LOG_DEBUG, __VA_ARGS__)
346 #else
347 # define av_dlog(pctx, ...) do { if (0) av_log(pctx, AV_LOG_DEBUG, __VA_ARGS__); } while (0)
348 #endif
349 #endif /* FF_API_DLOG */
350 
359 #define AV_LOG_SKIP_REPEATED 1
360 
367 #define AV_LOG_PRINT_LEVEL 2
368 
369 void av_log_set_flags(int arg);
370 int av_log_get_flags(void);
371 
376 #endif /* AVUTIL_LOG_H */
Definition: log.h:32
void av_log_set_level(int level)
const char * av_default_item_name(void *ctx)
void av_log(void *avcl, int level, const char *fmt,...) av_printf_format(3
Definition: log.h:30
int parent_log_context_offset
Definition: log.h:108
Definition: opt.h:329
Definition: log.h:40
Definition: log.h:35
struct AVClass AVClass
Definition: log.h:34
Definition: opt.h:245
const char * class_name
Definition: log.h:72
void av_log_format_line(void *ptr, int level, const char *fmt, va_list vl, char *line, int line_size, int *print_prefix)
Definition: log.h:37
Definition: log.h:46
int av_log_get_level(void)
void av_log_default_callback(void *avcl, int level, const char *fmt, va_list vl)
#define av_printf_format(fmtpos, attrpos)
Definition: attributes.h:159
int av_log_format_line2(void *ptr, int level, const char *fmt, va_list vl, char *line, int line_size, int *print_prefix)
Definition: log.h:39
void av_log_set_callback(void(*callback)(void *, int, const char *, va_list))
not part of ABI/API
Definition: log.h:47
int log_level_offset_offset
Definition: log.h:99
Definition: log.h:67
int av_log_get_flags(void)
Definition: log.h:33
void void av_vlog(void *avcl, int level, const char *fmt, va_list vl)
const struct AVOption * option
Definition: log.h:85
Definition: log.h:36
Definition: log.h:31
AVClassCategory(* get_category)(void *ctx)
Definition: log.h:136
AVClassCategory av_default_get_category(void *ptr)
int version
Definition: log.h:93
AVClassCategory
Definition: log.h:29
void av_log_set_flags(int arg)
AVClassCategory category
Definition: log.h:130
int(* query_ranges)(struct AVOptionRanges **, void *obj, const char *key, int flags)
Definition: log.h:142