Main Page
Related Pages
Modules
Data Structures
Files
Examples
File List
Globals
libavutil
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 Libav.
5
*
6
* Libav 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
* Libav 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 Libav; 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
33
typedef
struct
AVClass
{
38
const
char
*
class_name
;
39
44
const
char
* (*item_name)(
void
* ctx);
45
51
const
struct
AVOption
*
option
;
52
59
int
version
;
60
65
int
log_level_offset_offset
;
66
74
int
parent_log_context_offset
;
75
79
void
* (*child_next)(
void
*obj,
void
*prev);
80
89
const
struct
AVClass
* (*child_class_next)(
const
struct
AVClass
*prev);
90
}
AVClass
;
91
92
/* av_log API */
93
94
#define AV_LOG_QUIET -8
95
99
#define AV_LOG_PANIC 0
100
106
#define AV_LOG_FATAL 8
107
112
#define AV_LOG_ERROR 16
113
118
#define AV_LOG_WARNING 24
119
120
#define AV_LOG_INFO 32
121
#define AV_LOG_VERBOSE 40
122
126
#define AV_LOG_DEBUG 48
127
142
void
av_log
(
void
*avcl,
int
level
,
const
char
*fmt, ...) av_printf_format(3, 4);
143
144
void
av_vlog
(
void
*avcl,
int
level, const
char
*fmt, va_list);
145
int
av_log_get_level
(
void
);
146
void
av_log_set_level
(
int
);
147
void
av_log_set_callback
(
void
(*)(
void
*,
int
, const
char
*, va_list));
148
void
av_log_default_callback
(
void
* ptr,
int
level, const
char
* fmt, va_list vl);
149
const
char
*
av_default_item_name
(
void
* ctx);
150
156
#ifdef DEBUG
157
# define av_dlog(pctx, ...) av_log(pctx, AV_LOG_DEBUG, __VA_ARGS__)
158
#else
159
# define av_dlog(pctx, ...)
160
#endif
161
170
#define AV_LOG_SKIP_REPEATED 1
171
void
av_log_set_flags
(
int
arg);
172
173
#endif
/* AVUTIL_LOG_H */