Commit ab4afcb8 authored by Clément Bœsch's avatar Clément Bœsch

lavfi/blackdetect: switch to an AVOptions-based system.

parent 7eb1ea2a
...@@ -1865,9 +1865,7 @@ duration of the detected black interval expressed in seconds. ...@@ -1865,9 +1865,7 @@ duration of the detected black interval expressed in seconds.
In order to display the output lines, you need to set the loglevel at In order to display the output lines, you need to set the loglevel at
least to the AV_LOG_INFO value. least to the AV_LOG_INFO value.
This filter accepts a list of options in the form of The filter accepts the following options:
@var{key}=@var{value} pairs separated by ":". A description of the
accepted options follows.
@table @option @table @option
@item black_min_duration, d @item black_min_duration, d
......
...@@ -682,7 +682,6 @@ static const char *const filters_left_to_update[] = { ...@@ -682,7 +682,6 @@ static const char *const filters_left_to_update[] = {
"astreamsync", "astreamsync",
"atempo", "atempo",
"bbox", "bbox",
"blackdetect",
"buffer", "buffer",
"flite", "flite",
"hue", "hue",
......
...@@ -82,20 +82,6 @@ static int query_formats(AVFilterContext *ctx) ...@@ -82,20 +82,6 @@ static int query_formats(AVFilterContext *ctx)
return 0; return 0;
} }
static av_cold int init(AVFilterContext *ctx, const char *args)
{
int ret;
BlackDetectContext *blackdetect = ctx->priv;
blackdetect->class = &blackdetect_class;
av_opt_set_defaults(blackdetect);
if ((ret = av_set_options_string(blackdetect, args, "=", ":")) < 0)
return ret;
return 0;
}
static int config_input(AVFilterLink *inlink) static int config_input(AVFilterLink *inlink)
{ {
AVFilterContext *ctx = inlink->dst; AVFilterContext *ctx = inlink->dst;
...@@ -211,7 +197,6 @@ AVFilter avfilter_vf_blackdetect = { ...@@ -211,7 +197,6 @@ AVFilter avfilter_vf_blackdetect = {
.name = "blackdetect", .name = "blackdetect",
.description = NULL_IF_CONFIG_SMALL("Detect video intervals that are (almost) black."), .description = NULL_IF_CONFIG_SMALL("Detect video intervals that are (almost) black."),
.priv_size = sizeof(BlackDetectContext), .priv_size = sizeof(BlackDetectContext),
.init = init,
.query_formats = query_formats, .query_formats = query_formats,
.inputs = blackdetect_inputs, .inputs = blackdetect_inputs,
.outputs = blackdetect_outputs, .outputs = blackdetect_outputs,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment