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
1865In order to display the output lines, you need to set the loglevel at1865In order to display the output lines, you need to set the loglevel at
1866least to the AV_LOG_INFO value.1866least to the AV_LOG_INFO value.
1867 1867
1868This filter accepts a list of options in the form of1868The filter accepts the following options:
1869@var{key}=@var{value} pairs separated by ":". A description of the
1870accepted options follows.
1871 1869
1872@table @option1870@table @option
1873@item black_min_duration, d1871@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
682 "astreamsync",682 "astreamsync",
683 "atempo",683 "atempo",
684 "bbox",684 "bbox",
685 "blackdetect",
686 "buffer",685 "buffer",
687 "flite",686 "flite",
688 "hue",687 "hue",
libavfilter/vf_blackdetect.c+0−15
@@ -82,20 +82,6 @@ static int query_formats(AVFilterContext *ctx) · 81 unmodified lines
82 return 0;82 return 0;
83}83}
84 84
85static 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
99static int config_input(AVFilterLink *inlink)85static int config_input(AVFilterLink *inlink)
100{86{
101 AVFilterContext *ctx = inlink->dst;87 AVFilterContext *ctx = inlink->dst;
@@ -211,7 +197,6 @@ AVFilter avfilter_vf_blackdetect = { · 109 unmodified lines
211 .name = "blackdetect",197 .name = "blackdetect",
212 .description = NULL_IF_CONFIG_SMALL("Detect video intervals that are (almost) black."),198 .description = NULL_IF_CONFIG_SMALL("Detect video intervals that are (almost) black."),
213 .priv_size = sizeof(BlackDetectContext),199 .priv_size = sizeof(BlackDetectContext),
214 .init = init,
215 .query_formats = query_formats,200 .query_formats = query_formats,
216 .inputs = blackdetect_inputs,201 .inputs = blackdetect_inputs,
217 .outputs = blackdetect_outputs,202 .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