annotate log.h @ 81:5cfa773a3bdd libavutil

Move av_log() & friends to libavutil
author lucabe
date Tue, 18 Jul 2006 11:00:55 +0000
parents
children b39b6310973c
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
81
5cfa773a3bdd Move av_log() & friends to libavutil
lucabe
parents:
diff changeset
1 #ifndef LOG_H
5cfa773a3bdd Move av_log() & friends to libavutil
lucabe
parents:
diff changeset
2 #define LOG_H
5cfa773a3bdd Move av_log() & friends to libavutil
lucabe
parents:
diff changeset
3
5cfa773a3bdd Move av_log() & friends to libavutil
lucabe
parents:
diff changeset
4 #include <stdarg.h>
5cfa773a3bdd Move av_log() & friends to libavutil
lucabe
parents:
diff changeset
5
5cfa773a3bdd Move av_log() & friends to libavutil
lucabe
parents:
diff changeset
6 /**
5cfa773a3bdd Move av_log() & friends to libavutil
lucabe
parents:
diff changeset
7 * Used by av_log
5cfa773a3bdd Move av_log() & friends to libavutil
lucabe
parents:
diff changeset
8 */
5cfa773a3bdd Move av_log() & friends to libavutil
lucabe
parents:
diff changeset
9 typedef struct AVCLASS AVClass;
5cfa773a3bdd Move av_log() & friends to libavutil
lucabe
parents:
diff changeset
10 struct AVCLASS {
5cfa773a3bdd Move av_log() & friends to libavutil
lucabe
parents:
diff changeset
11 const char* class_name;
5cfa773a3bdd Move av_log() & friends to libavutil
lucabe
parents:
diff changeset
12 const char* (*item_name)(void*); /* actually passing a pointer to an AVCodecContext
5cfa773a3bdd Move av_log() & friends to libavutil
lucabe
parents:
diff changeset
13 or AVFormatContext, which begin with an AVClass.
5cfa773a3bdd Move av_log() & friends to libavutil
lucabe
parents:
diff changeset
14 Needed because av_log is in libavcodec and has no visibility
5cfa773a3bdd Move av_log() & friends to libavutil
lucabe
parents:
diff changeset
15 of AVIn/OutputFormat */
5cfa773a3bdd Move av_log() & friends to libavutil
lucabe
parents:
diff changeset
16 struct AVOption *option;
5cfa773a3bdd Move av_log() & friends to libavutil
lucabe
parents:
diff changeset
17 };
5cfa773a3bdd Move av_log() & friends to libavutil
lucabe
parents:
diff changeset
18
5cfa773a3bdd Move av_log() & friends to libavutil
lucabe
parents:
diff changeset
19 /* av_log API */
5cfa773a3bdd Move av_log() & friends to libavutil
lucabe
parents:
diff changeset
20
5cfa773a3bdd Move av_log() & friends to libavutil
lucabe
parents:
diff changeset
21 #define AV_LOG_QUIET -1
5cfa773a3bdd Move av_log() & friends to libavutil
lucabe
parents:
diff changeset
22 #define AV_LOG_ERROR 0
5cfa773a3bdd Move av_log() & friends to libavutil
lucabe
parents:
diff changeset
23 #define AV_LOG_INFO 1
5cfa773a3bdd Move av_log() & friends to libavutil
lucabe
parents:
diff changeset
24 #define AV_LOG_DEBUG 2
5cfa773a3bdd Move av_log() & friends to libavutil
lucabe
parents:
diff changeset
25
5cfa773a3bdd Move av_log() & friends to libavutil
lucabe
parents:
diff changeset
26 #ifdef __GNUC__
5cfa773a3bdd Move av_log() & friends to libavutil
lucabe
parents:
diff changeset
27 extern void av_log(void*, int level, const char *fmt, ...) __attribute__ ((__format__ (__printf__, 3, 4)));
5cfa773a3bdd Move av_log() & friends to libavutil
lucabe
parents:
diff changeset
28 #else
5cfa773a3bdd Move av_log() & friends to libavutil
lucabe
parents:
diff changeset
29 extern void av_log(void*, int level, const char *fmt, ...);
5cfa773a3bdd Move av_log() & friends to libavutil
lucabe
parents:
diff changeset
30 #endif
5cfa773a3bdd Move av_log() & friends to libavutil
lucabe
parents:
diff changeset
31
5cfa773a3bdd Move av_log() & friends to libavutil
lucabe
parents:
diff changeset
32 extern void av_vlog(void*, int level, const char *fmt, va_list);
5cfa773a3bdd Move av_log() & friends to libavutil
lucabe
parents:
diff changeset
33 extern int av_log_get_level(void);
5cfa773a3bdd Move av_log() & friends to libavutil
lucabe
parents:
diff changeset
34 extern void av_log_set_level(int);
5cfa773a3bdd Move av_log() & friends to libavutil
lucabe
parents:
diff changeset
35 extern void av_log_set_callback(void (*)(void*, int, const char*, va_list));
5cfa773a3bdd Move av_log() & friends to libavutil
lucabe
parents:
diff changeset
36
5cfa773a3bdd Move av_log() & friends to libavutil
lucabe
parents:
diff changeset
37 #endif /* LOG_H */