Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
d82ecfce
Commit
d82ecfce
authored
May 12, 2014
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cmdutils: implement FFREPORT=level=...
Fixes Ticket3057 Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
3fc37a3d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
2 deletions
+14
-2
cmdutils.c
cmdutils.c
+12
-2
fftools-common-opts.texi
doc/fftools-common-opts.texi
+2
-0
No files found.
cmdutils.c
View file @
d82ecfce
...
@@ -66,6 +66,7 @@ AVDictionary *swr_opts;
...
@@ -66,6 +66,7 @@ AVDictionary *swr_opts;
AVDictionary
*
format_opts
,
*
codec_opts
,
*
resample_opts
;
AVDictionary
*
format_opts
,
*
codec_opts
,
*
resample_opts
;
static
FILE
*
report_file
;
static
FILE
*
report_file
;
static
int
report_file_level
=
AV_LOG_DEBUG
;
int
hide_banner
=
0
;
int
hide_banner
=
0
;
void
init_opts
(
void
)
void
init_opts
(
void
)
...
@@ -104,8 +105,10 @@ static void log_callback_report(void *ptr, int level, const char *fmt, va_list v
...
@@ -104,8 +105,10 @@ static void log_callback_report(void *ptr, int level, const char *fmt, va_list v
av_log_default_callback
(
ptr
,
level
,
fmt
,
vl
);
av_log_default_callback
(
ptr
,
level
,
fmt
,
vl
);
av_log_format_line
(
ptr
,
level
,
fmt
,
vl2
,
line
,
sizeof
(
line
),
&
print_prefix
);
av_log_format_line
(
ptr
,
level
,
fmt
,
vl2
,
line
,
sizeof
(
line
),
&
print_prefix
);
va_end
(
vl2
);
va_end
(
vl2
);
fputs
(
line
,
report_file
);
if
(
report_file_level
>=
level
)
{
fflush
(
report_file
);
fputs
(
line
,
report_file
);
fflush
(
report_file
);
}
}
}
static
void
(
*
program_exit
)(
int
ret
);
static
void
(
*
program_exit
)(
int
ret
);
...
@@ -926,6 +929,13 @@ static int init_report(const char *env)
...
@@ -926,6 +929,13 @@ static int init_report(const char *env)
av_free
(
filename_template
);
av_free
(
filename_template
);
filename_template
=
val
;
filename_template
=
val
;
val
=
NULL
;
val
=
NULL
;
}
else
if
(
!
strcmp
(
key
,
"level"
))
{
char
*
tail
;
report_file_level
=
strtol
(
val
,
&
tail
,
10
);
if
(
*
tail
)
{
av_log
(
NULL
,
AV_LOG_FATAL
,
"Invalid report file level
\n
"
);
exit_program
(
1
);
}
}
else
{
}
else
{
av_log
(
NULL
,
AV_LOG_ERROR
,
"Unknown key '%s' in FFREPORT
\n
"
,
key
);
av_log
(
NULL
,
AV_LOG_ERROR
,
"Unknown key '%s' in FFREPORT
\n
"
,
key
);
}
}
...
...
doc/fftools-common-opts.texi
View file @
d82ecfce
...
@@ -189,6 +189,8 @@ following option is recognized:
...
@@ -189,6 +189,8 @@ following option is recognized:
set the file name to use for the report; @code{%p} is expanded to the name
set the file name to use for the report; @code{%p} is expanded to the name
of the program, @code{%t} is expanded to a timestamp, @code{%%} is expanded
of the program, @code{%t} is expanded to a timestamp, @code{%%} is expanded
to a plain @code{%}
to a plain @code{%}
@item level
set the log level
@end table
@end table
Errors in parsing the environment variable are not fatal, and will not
Errors in parsing the environment variable are not fatal, and will not
...
...
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