History

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

Clément Bœsch committed 13 years ago

Commit ab4afcb1 parent 7eb1ea23 files · +1 −19Browse files

Unified · Split

3 files
  1. doc/filters.texi +1 −3
  2. libavfilter/avfilter.c +0 −1
  3. libavfilter/vf_blackdetect.c +0 −15
doc/filters.texi+1−3
@@ -1865,9 +1865,7 @@ duration of the detected black interval expressed in seconds. · 1864 unmodified lines
18651865 In order to display the output lines, you need to set the loglevel at
18661866 least to the AV_LOG_INFO value.
18671867
1868−This filter accepts a list of options in the form of
1869−@var{key}=@var{value} pairs separated by ":". A description of the
1870−accepted options follows.
1868+The filter accepts the following options:
18711869
18721870 @table @option
18731871 @item black_min_duration, d
libavfilter/avfilter.c+0−1
@@ -682,7 +682,6 @@ static const char *const filters_left_to_update[] = { · 681 unmodified lines
682682 "astreamsync",
683683 "atempo",
684684 "bbox",
685− "blackdetect",
686685 "buffer",
687686 "flite",
688687 "hue",
libavfilter/vf_blackdetect.c+0−15
@@ -82,20 +82,6 @@ static int query_formats(AVFilterContext *ctx) · 81 unmodified lines
8282 return 0;
8383 }
8484
85−static av_cold int init(AVFilterContext *ctx, const char *args)
86−{
87− int ret;
88− BlackDetectContext *blackdetect = ctx->priv;
89−
90− blackdetect->class = &blackdetect_class;
91− av_opt_set_defaults(blackdetect);
92−
93− if ((ret = av_set_options_string(blackdetect, args, "=", ":")) < 0)
94− return ret;
95−
96− return 0;
97−}
98−
9985 static int config_input(AVFilterLink *inlink)
10086 {
10187 AVFilterContext *ctx = inlink->dst;
@@ -211,7 +197,6 @@ AVFilter avfilter_vf_blackdetect = { · 109 unmodified lines
211197 .name = "blackdetect",
212198 .description = NULL_IF_CONFIG_SMALL("Detect video intervals that are (almost) black."),
213199 .priv_size = sizeof(BlackDetectContext),
214− .init = init,
215200 .query_formats = query_formats,
216201 .inputs = blackdetect_inputs,
217202 .outputs = blackdetect_outputs,

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t