Browse code

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

Clément Bœsch authored on 2013/04/11 05:15:10
Showing 3 changed files
... ...
@@ -6344,11 +6344,7 @@ Set read/write permissions for the output frames.
6344 6344
 These filters are mainly aimed at developers to test direct path in the
6345 6345
 following filter in the filtergraph.
6346 6346
 
6347
-The filters accept parameters as a list of @var{key}=@var{value} pairs,
6348
-separated by ":". If the key of the first options is omitted, the argument is
6349
-assumed to be the @var{mode}.
6350
-
6351
-A description of the accepted parameters follows.
6347
+The filters accept the following options:
6352 6348
 
6353 6349
 @table @option
6354 6350
 @item mode
... ...
@@ -681,6 +681,8 @@ int avfilter_init_filter(AVFilterContext *filter, const char *args, void *opaque
681 681
         !strcmp(filter->filter->name, "pad"        ) ||
682 682
         !strcmp(filter->filter->name,   "format") ||
683 683
         !strcmp(filter->filter->name, "noformat") ||
684
+        !strcmp(filter->filter->name, "perms")  ||
685
+        !strcmp(filter->filter->name, "aperms") ||
684 686
         !strcmp(filter->filter->name, "resample") ||
685 687
         !strcmp(filter->filter->name, "showspectrum") ||
686 688
         !strcmp(filter->filter->name, "silencedetect") ||
... ...
@@ -111,8 +111,6 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *frame)
111 111
     return ret;
112 112
 }
113 113
 
114
-static const char *const shorthand[] = { "mode", NULL };
115
-
116 114
 #if CONFIG_APERMS_FILTER
117 115
 
118 116
 #define aperms_options options
... ...
@@ -143,7 +141,6 @@ AVFilter avfilter_af_aperms = {
143 143
     .inputs      = aperms_inputs,
144 144
     .outputs     = aperms_outputs,
145 145
     .priv_class  = &aperms_class,
146
-    .shorthand   = shorthand,
147 146
 };
148 147
 #endif /* CONFIG_APERMS_FILTER */
149 148
 
... ...
@@ -177,6 +174,5 @@ AVFilter avfilter_vf_perms = {
177 177
     .inputs      = perms_inputs,
178 178
     .outputs     = perms_outputs,
179 179
     .priv_class  = &perms_class,
180
-    .shorthand   = shorthand,
181 180
 };
182 181
 #endif /* CONFIG_PERMS_FILTER */