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
22a06a53
Commit
22a06a53
authored
Jan 07, 2020
by
Gyan Doshi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avfilter/f_metadata: allow direct flushing when printing to file
Useful for monitoring sparse data in realtime
parent
c4c96d59
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
0 deletions
+9
-0
filters.texi
doc/filters.texi
+3
-0
f_metadata.c
libavfilter/f_metadata.c
+6
-0
No files found.
doc/filters.texi
View file @
22a06a53
...
...
@@ -22731,6 +22731,9 @@ plain filename any writable url can be specified. Filename ``-'' is a shorthand
for standard output. If @code{file} option is not set, output is written to the log
with AV_LOG_INFO loglevel.
@item direct
Reduces buffering in print mode when output is written to a URL set using @var{file}.
@end table
@subsection Examples
...
...
libavfilter/f_metadata.c
View file @
22a06a53
...
...
@@ -88,6 +88,8 @@ typedef struct MetadataContext {
int
(
*
compare
)(
struct
MetadataContext
*
s
,
const
char
*
value1
,
const
char
*
value2
);
void
(
*
print
)(
AVFilterContext
*
ctx
,
const
char
*
msg
,
...)
av_printf_format
(
2
,
3
);
int
direct
;
// reduces buffering when printing to user-supplied URL
}
MetadataContext
;
#define OFFSET(x) offsetof(MetadataContext, x)
...
...
@@ -111,6 +113,7 @@ static const AVOption filt_name##_options[] = { \
{ "ends_with", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = METADATAF_ENDS_WITH }, 0, 0, FLAGS, "function" }, \
{ "expr", "set expression for expr function", OFFSET(expr_str), AV_OPT_TYPE_STRING, {.str = NULL }, 0, 0, FLAGS }, \
{ "file", "set file where to print metadata information", OFFSET(file_str), AV_OPT_TYPE_STRING, {.str=NULL}, 0, 0, FLAGS }, \
{ "direct", "reduce buffering when printing to user-set file or pipe", OFFSET(direct), AV_OPT_TYPE_BOOL, {.i64 = 0}, 0, 1, FLAGS }, \
{ NULL } \
}
...
...
@@ -274,6 +277,9 @@ static av_cold int init(AVFilterContext *ctx)
s
->
file_str
,
buf
);
return
ret
;
}
if
(
s
->
direct
)
s
->
avio_context
->
direct
=
AVIO_FLAG_DIRECT
;
}
return
0
;
...
...
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