mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-11-21 10:55:51 +02:00
avfilter/metadata: add intuitive labels for metadata values
This commit is contained in:
parent
bc40cd6214
commit
f53414a038
@ -25296,10 +25296,10 @@ The expression is evaluated through the eval API and can contain the following
|
||||
constants:
|
||||
|
||||
@table @option
|
||||
@item VALUE1
|
||||
@item VALUE1, FRAMEVAL
|
||||
Float representation of @code{value} from metadata key.
|
||||
|
||||
@item VALUE2
|
||||
@item VALUE2, USERVAL
|
||||
Float representation of @code{value} as supplied by user in @code{value} option.
|
||||
@end table
|
||||
|
||||
|
@ -61,12 +61,16 @@ enum MetadataFunction {
|
||||
static const char *const var_names[] = {
|
||||
"VALUE1",
|
||||
"VALUE2",
|
||||
"FRAMEVAL",
|
||||
"USERVAL",
|
||||
NULL
|
||||
};
|
||||
|
||||
enum var_name {
|
||||
VAR_VALUE1,
|
||||
VAR_VALUE2,
|
||||
VAR_FRAMEVAL,
|
||||
VAR_USERVAL,
|
||||
VAR_VARS_NB
|
||||
};
|
||||
|
||||
@ -172,8 +176,8 @@ static int parse_expr(MetadataContext *s, const char *value1, const char *value2
|
||||
if (sscanf(value1, "%lf", &f1) + sscanf(value2, "%lf", &f2) != 2)
|
||||
return 0;
|
||||
|
||||
s->var_values[VAR_VALUE1] = f1;
|
||||
s->var_values[VAR_VALUE2] = f2;
|
||||
s->var_values[VAR_VALUE1] = s->var_values[VAR_FRAMEVAL] = f1;
|
||||
s->var_values[VAR_VALUE2] = s->var_values[VAR_USERVAL] = f2;
|
||||
|
||||
return av_expr_eval(s->expr, s->var_values, NULL);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user