~ubuntu-branches/ubuntu/jaunty/xvidcap/jaunty-proposed

« back to all changes in this revision

Viewing changes to ffmpeg/libavutil/log.h

  • Committer: Bazaar Package Importer
  • Author(s): Lionel Le Folgoc, Andrew Starr-Bochicchio, Lionel Le Folgoc
  • Date: 2008-12-26 00:10:06 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20081226001006-2040ls9680bd1blt
Tags: 1.1.7-0.2ubuntu1
[ Andrew Starr-Bochicchio ]
* Merge from debian-multimedia (LP: #298547), Ubuntu Changes:
 - For ffmpeg-related build-deps, fix versionized dependencies
   as the ubuntu versioning is different than debian-multimedia's.

[ Lionel Le Folgoc ]
* LP: #311412 is fixed since the 1.1.7~rc1-0.1 revision.
* debian/patches/03_ffmpeg.diff: updated to fix FTBFS due to libswscale API
  change (cherry-pick from Gentoo #234383).

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19
19
 */
20
20
 
21
 
#ifndef LOG_H
22
 
#define LOG_H
 
21
#ifndef FFMPEG_LOG_H
 
22
#define FFMPEG_LOG_H
23
23
 
24
24
#include <stdarg.h>
25
25
 
26
26
/**
27
 
 * Used by av_log
 
27
 * Describes the class of an AVClass context structure, that is an
 
28
 * arbitrary struct of which the first field is a pointer to an
 
29
 * AVClass struct (e.g. AVCodecContext, AVFormatContext etc.).
28
30
 */
29
31
typedef struct AVCLASS AVClass;
30
32
struct AVCLASS {
 
33
    /**
 
34
     * the name of the class, usually it is the same name of the
 
35
     * context structure type to which the AVClass is associated
 
36
     */
31
37
    const char* class_name;
32
 
    const char* (*item_name)(void*); /* actually passing a pointer to an AVCodecContext
33
 
                                        or AVFormatContext, which begin with an AVClass.
34
 
                                        Needed because av_log is in libavcodec and has no visibility
35
 
                                        of AVIn/OutputFormat */
 
38
 
 
39
    /**
 
40
     * a pointer to a function which returns the name of a context
 
41
     * instance \p ctx associated with the class
 
42
     */
 
43
    const char* (*item_name)(void* ctx);
 
44
 
 
45
    /**
 
46
     * a pointer to the first option specified in the class if any or NULL
 
47
     *
 
48
     * @see av_set_default_options()
 
49
     */
36
50
    const struct AVOption *option;
37
51
};
38
52
 
81
95
 */
82
96
#define AV_LOG_DEBUG    48
83
97
#endif
 
98
 
 
99
#if LIBAVUTIL_VERSION_INT < (50<<16)
84
100
extern int av_log_level;
 
101
#endif
85
102
 
 
103
/**
 
104
 * Send the specified message to the log if the level is less than or equal to
 
105
 * the current av_log_level. By default, all logging messages are sent to
 
106
 * stderr. This behavior can be altered by setting a different av_vlog callback
 
107
 * function.
 
108
 *
 
109
 * @param avcl A pointer to an arbitrary struct of which the first field is a
 
110
 * pointer to an AVClass struct.
 
111
 * @param level The importance level of the message, lower values signifying
 
112
 * higher importance.
 
113
 * @param fmt The format string (printf-compatible) that specifies how
 
114
 * subsequent arguments are converted to output.
 
115
 * @see av_vlog
 
116
 */
86
117
#ifdef __GNUC__
87
 
extern void av_log(void*, int level, const char *fmt, ...) __attribute__ ((__format__ (__printf__, 3, 4)));
88
 
#else
89
 
extern void av_log(void*, int level, const char *fmt, ...);
90
 
#endif
91
 
 
92
 
#if LIBAVUTIL_VERSION_INT < (50<<16)
93
 
extern void av_vlog(void*, int level, const char *fmt, va_list);
94
 
extern int av_log_get_level(void);
95
 
extern void av_log_set_level(int);
96
 
extern void av_log_set_callback(void (*)(void*, int, const char*, va_list));
97
 
extern void av_log_default_callback(void* ptr, int level, const char* fmt, va_list vl);
98
 
#else
99
 
extern void (*av_vlog)(void*, int, const char*, va_list);
100
 
#endif
101
 
 
102
 
#endif /* LOG_H */
 
118
void av_log(void*, int level, const char *fmt, ...) __attribute__ ((__format__ (__printf__, 3, 4)));
 
119
#else
 
120
void av_log(void*, int level, const char *fmt, ...);
 
121
#endif
 
122
 
 
123
void av_vlog(void*, int level, const char *fmt, va_list);
 
124
int av_log_get_level(void);
 
125
void av_log_set_level(int);
 
126
void av_log_set_callback(void (*)(void*, int, const char*, va_list));
 
127
void av_log_default_callback(void* ptr, int level, const char* fmt, va_list vl);
 
128
 
 
129
#endif /* FFMPEG_LOG_H */