Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
FFmpeg
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
libremedia
Tethys
FFmpeg
Commits
d82ecfce
Commit
d82ecfce
authored
10 years ago
by
Michael Niedermayer
Browse files
Options
Downloads
Patches
Plain Diff
cmdutils: implement FFREPORT=level=...
Fixes Ticket3057 Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
3fc37a3d
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
cmdutils.c
+12
-2
12 additions, 2 deletions
cmdutils.c
doc/fftools-common-opts.texi
+2
-0
2 additions, 0 deletions
doc/fftools-common-opts.texi
with
14 additions
and
2 deletions
cmdutils.c
+
12
−
2
View file @
d82ecfce
...
...
@@ -66,6 +66,7 @@ AVDictionary *swr_opts;
AVDictionary
*
format_opts
,
*
codec_opts
,
*
resample_opts
;
static
FILE
*
report_file
;
static
int
report_file_level
=
AV_LOG_DEBUG
;
int
hide_banner
=
0
;
void
init_opts
(
void
)
...
...
@@ -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_format_line
(
ptr
,
level
,
fmt
,
vl2
,
line
,
sizeof
(
line
),
&
print_prefix
);
va_end
(
vl2
);
fputs
(
line
,
report_file
);
fflush
(
report_file
);
if
(
report_file_level
>=
level
)
{
fputs
(
line
,
report_file
);
fflush
(
report_file
);
}
}
static
void
(
*
program_exit
)(
int
ret
);
...
...
@@ -926,6 +929,13 @@ static int init_report(const char *env)
av_free
(
filename_template
);
filename_template
=
val
;
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
{
av_log
(
NULL
,
AV_LOG_ERROR
,
"Unknown key '%s' in FFREPORT
\n
"
,
key
);
}
...
...
This diff is collapsed.
Click to expand it.
doc/fftools-common-opts.texi
+
2
−
0
View file @
d82ecfce
...
...
@@ -189,6 +189,8 @@ following option is recognized:
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
to a plain @code{%}
@item level
set the log level
@end table
Errors in parsing the environment variable are not fatal, and will not
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment