Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
ffmpeg
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ffmpeg
Commits
a309073b
Commit
a309073b
authored
Dec 12, 2007
by
Måns Rullgård
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use av_log_get/set_level()
Originally committed as revision 11209 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
0bc308de
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
7 additions
and
14 deletions
+7
-14
ffmpeg.c
ffmpeg.c
+2
-2
ffplay.c
ffplay.c
+1
-1
utils.c
libavcodec/utils.c
+1
-1
log.c
libavutil/log.c
+0
-6
log.h
libavutil/log.h
+3
-4
No files found.
ffmpeg.c
View file @
a309073b
...
...
@@ -2169,7 +2169,7 @@ static int opt_default(const char *opt, const char *arg){
#endif
if
(
avctx_opts
[
0
]
->
debug
)
av_log_
level
=
AV_LOG_DEBUG
;
av_log_
set_level
(
AV_LOG_DEBUG
)
;
return
0
;
}
...
...
@@ -2186,7 +2186,7 @@ static void opt_me_threshold(const char *arg)
static
void
opt_verbose
(
const
char
*
arg
)
{
verbose
=
atoi
(
arg
);
av_log_
level
=
atoi
(
arg
);
av_log_
set_level
(
atoi
(
arg
)
);
}
static
void
opt_frame_rate
(
const
char
*
arg
)
...
...
ffplay.c
View file @
a309073b
...
...
@@ -2422,7 +2422,7 @@ static void opt_seek(const char *arg)
static
void
opt_debug
(
const
char
*
arg
)
{
av_log_
level
=
99
;
av_log_
set_level
(
99
)
;
debug
=
atoi
(
arg
);
}
...
...
libavcodec/utils.c
View file @
a309073b
...
...
@@ -1139,7 +1139,7 @@ void avcodec_string(char *buf, int buf_size, AVCodecContext *enc, int encode)
" [PAR %d:%d DAR %d:%d]"
,
enc
->
sample_aspect_ratio
.
num
,
enc
->
sample_aspect_ratio
.
den
,
display_aspect_ratio
.
num
,
display_aspect_ratio
.
den
);
if
(
av_log_
level
>=
AV_LOG_DEBUG
){
if
(
av_log_
get_level
()
>=
AV_LOG_DEBUG
){
int
g
=
ff_gcd
(
enc
->
time_base
.
num
,
enc
->
time_base
.
den
);
snprintf
(
buf
+
strlen
(
buf
),
buf_size
-
strlen
(
buf
),
", %d/%d"
,
...
...
libavutil/log.c
View file @
a309073b
...
...
@@ -45,11 +45,7 @@ void av_log_default_callback(void* ptr, int level, const char* fmt, va_list vl)
vfprintf
(
stderr
,
fmt
,
vl
);
}
#if LIBAVUTIL_VERSION_INT < (50<<16)
static
void
(
*
av_log_callback
)(
void
*
,
int
,
const
char
*
,
va_list
)
=
av_log_default_callback
;
#else
void
(
*
av_vlog
)(
void
*
,
int
,
const
char
*
,
va_list
)
=
av_log_default_callback
;
#endif
void
av_log
(
void
*
avcl
,
int
level
,
const
char
*
fmt
,
...)
{
...
...
@@ -59,7 +55,6 @@ void av_log(void* avcl, int level, const char *fmt, ...)
va_end
(
vl
);
}
#if LIBAVUTIL_VERSION_INT < (50<<16)
void
av_vlog
(
void
*
avcl
,
int
level
,
const
char
*
fmt
,
va_list
vl
)
{
av_log_callback
(
avcl
,
level
,
fmt
,
vl
);
...
...
@@ -79,4 +74,3 @@ void av_log_set_callback(void (*callback)(void*, int, const char*, va_list))
{
av_log_callback
=
callback
;
}
#endif
libavutil/log.h
View file @
a309073b
...
...
@@ -81,7 +81,10 @@ struct AVCLASS {
*/
#define AV_LOG_DEBUG 48
#endif
#if LIBAVUTIL_VERSION_INT < (50<<16)
extern
int
av_log_level
;
#endif
/**
* Send the specified message to the log if the level is less than or equal to
...
...
@@ -103,14 +106,10 @@ extern void av_log(void*, int level, const char *fmt, ...) __attribute__ ((__for
extern
void
av_log
(
void
*
,
int
level
,
const
char
*
fmt
,
...);
#endif
#if LIBAVUTIL_VERSION_INT < (50<<16)
extern
void
av_vlog
(
void
*
,
int
level
,
const
char
*
fmt
,
va_list
);
extern
int
av_log_get_level
(
void
);
extern
void
av_log_set_level
(
int
);
extern
void
av_log_set_callback
(
void
(
*
)(
void
*
,
int
,
const
char
*
,
va_list
));
extern
void
av_log_default_callback
(
void
*
ptr
,
int
level
,
const
char
*
fmt
,
va_list
vl
);
#else
extern
void
(
*
av_vlog
)(
void
*
,
int
,
const
char
*
,
va_list
);
#endif
#endif
/* FFMPEG_LOG_H */
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment