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
ee104580
Commit
ee104580
authored
Apr 07, 2016
by
Tobias Rapp
Committed by
Paul B Mahol
Apr 13, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avfilter/vf_drawtext: add optional default value to metadata function
Signed-off-by:
Tobias Rapp
<
t.rapp@noa-archive.com
>
parent
3674a53d
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
3 deletions
+10
-3
filters.texi
doc/filters.texi
+6
-1
version.h
libavfilter/version.h
+1
-1
vf_drawtext.c
libavfilter/vf_drawtext.c
+3
-1
No files found.
doc/filters.texi
View file @
ee104580
...
...
@@ -6682,7 +6682,12 @@ The time at which the filter is running, expressed in the local time zone.
It can accept an argument: a strftime() format string.
@item metadata
Frame metadata. It must take one argument specifying metadata key.
Frame metadata. Takes one or two arguments.
The first argument is mandatory and specifies the metadata key.
The second argument is optional and specifies a default value, used when the
metadata key is not found or empty.
@item n, frame_num
The frame number, starting from 0.
...
...
libavfilter/version.h
View file @
ee104580
...
...
@@ -31,7 +31,7 @@
#define LIBAVFILTER_VERSION_MAJOR 6
#define LIBAVFILTER_VERSION_MINOR 41
#define LIBAVFILTER_VERSION_MICRO 10
0
#define LIBAVFILTER_VERSION_MICRO 10
1
#define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \
LIBAVFILTER_VERSION_MINOR, \
...
...
libavfilter/vf_drawtext.c
View file @
ee104580
...
...
@@ -860,6 +860,8 @@ static int func_metadata(AVFilterContext *ctx, AVBPrint *bp,
if
(
e
&&
e
->
value
)
av_bprintf
(
bp
,
"%s"
,
e
->
value
);
else
if
(
argc
>=
2
)
av_bprintf
(
bp
,
"%s"
,
argv
[
1
]);
return
0
;
}
...
...
@@ -975,7 +977,7 @@ static const struct drawtext_function {
{
"localtime"
,
0
,
1
,
'L'
,
func_strftime
},
{
"frame_num"
,
0
,
0
,
0
,
func_frame_num
},
{
"n"
,
0
,
0
,
0
,
func_frame_num
},
{
"metadata"
,
1
,
1
,
0
,
func_metadata
},
{
"metadata"
,
1
,
2
,
0
,
func_metadata
},
};
static
int
eval_function
(
AVFilterContext
*
ctx
,
AVBPrint
*
bp
,
char
*
fct
,
...
...
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