Merge commit '73d5d405d424c06f3f354337cfdb24794932094d'
authorMichael Niedermayer <michaelni@gmx.at>
Thu, 11 Apr 2013 00:49:13 +0000 (02:49 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Thu, 11 Apr 2013 00:50:21 +0000 (02:50 +0200)
* commit '73d5d405d424c06f3f354337cfdb24794932094d':
  split: switch to an AVOptions-based system.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
1  2 
libavfilter/avfilter.c
libavfilter/split.c

@@@ -655,102 -479,8 +655,104 @@@ int avfilter_init_filter(AVFilterContex
      AVDictionary *options = NULL;
      AVDictionaryEntry *e;
      int ret=0;
 +    int anton_options =
 +        !strcmp(filter->filter->name,  "allpass"   ) ||
 +        !strcmp(filter->filter->name,  "afade"     ) ||
 +        !strcmp(filter->filter->name,  "aformat") ||
 +        !strcmp(filter->filter->name,  "amix"      ) ||
 +        !strcmp(filter->filter->name,  "apad"      ) ||
 +        !strcmp(filter->filter->name,  "aphaser"   ) ||
++        !strcmp(filter->filter->name,  "asplit"    ) ||
 +        !strcmp(filter->filter->name,  "ass")     ||
 +        !strcmp(filter->filter->name,  "asyncts"   ) ||
 +        !strcmp(filter->filter->name,  "bandpass"  ) ||
 +        !strcmp(filter->filter->name,  "bandreject") ||
 +        !strcmp(filter->filter->name,  "bass"      ) ||
 +        !strcmp(filter->filter->name,  "biquad"    ) ||
 +        !strcmp(filter->filter->name,  "blackframe") ||
 +        !strcmp(filter->filter->name,  "blend"     ) ||
 +        !strcmp(filter->filter->name,  "boxblur"   ) ||
 +        !strcmp(filter->filter->name,  "cellauto") ||
 +        !strcmp(filter->filter->name,  "channelmap") ||
 +        !strcmp(filter->filter->name,  "channelsplit") ||
 +        !strcmp(filter->filter->name,  "colormatrix") ||
 +        !strcmp(filter->filter->name,  "crop"      ) ||
 +        !strcmp(filter->filter->name,  "cropdetect") ||
 +        !strcmp(filter->filter->name,  "curves"    ) ||
 +        !strcmp(filter->filter->name,  "decimate"  ) ||
 +        !strcmp(filter->filter->name,  "delogo"    ) ||
 +        !strcmp(filter->filter->name,  "drawbox"   ) ||
 +        !strcmp(filter->filter->name,  "drawtext"  ) ||
 +        !strcmp(filter->filter->name,  "ebur128"   ) ||
 +        !strcmp(filter->filter->name,  "edgedetect") ||
 +        !strcmp(filter->filter->name,  "equalizer" ) ||
 +        !strcmp(filter->filter->name,  "fade"      ) ||
 +        !strcmp(filter->filter->name,  "field"     ) ||
 +        !strcmp(filter->filter->name,  "fieldorder") ||
 +        !strcmp(filter->filter->name,  "fps"       ) ||
 +        !strcmp(filter->filter->name,  "framestep" ) ||
 +        !strcmp(filter->filter->name,  "frei0r"    ) ||
 +        !strcmp(filter->filter->name,  "frei0r_src") ||
 +        !strcmp(filter->filter->name,  "geq"       ) ||
 +        !strcmp(filter->filter->name, "gradfun"    ) ||
 +        !strcmp(filter->filter->name, "highpass"  ) ||
 +        !strcmp(filter->filter->name, "histeq"     ) ||
 +        !strcmp(filter->filter->name, "histogram"  ) ||
 +        !strcmp(filter->filter->name, "hqdn3d"     ) ||
 +        !strcmp(filter->filter->name, "idet"       ) ||
 +        !strcmp(filter->filter->name,  "il"        ) ||
 +        !strcmp(filter->filter->name,  "join"      ) ||
 +        !strcmp(filter->filter->name,  "kerndeint" ) ||
 +        !strcmp(filter->filter->name, "ocv"        ) ||
 +        !strcmp(filter->filter->name, "life"       ) ||
 +        !strcmp(filter->filter->name, "lut"        ) ||
 +        !strcmp(filter->filter->name, "lutyuv"     ) ||
 +        !strcmp(filter->filter->name, "lutrgb"     ) ||
 +        !strcmp(filter->filter->name, "lowpass"   ) ||
 +        !strcmp(filter->filter->name, "mandelbrot" ) ||
 +        !strcmp(filter->filter->name, "mptestsrc"  ) ||
 +        !strcmp(filter->filter->name, "negate"     ) ||
 +        !strcmp(filter->filter->name, "noise"      ) ||
 +        !strcmp(filter->filter->name, "overlay"    ) ||
 +        !strcmp(filter->filter->name, "pad"        ) ||
 +        !strcmp(filter->filter->name,   "format") ||
 +        !strcmp(filter->filter->name, "noformat") ||
 +        !strcmp(filter->filter->name, "perms")  ||
 +        !strcmp(filter->filter->name, "pp"   )  ||
 +        !strcmp(filter->filter->name, "aperms") ||
 +        !strcmp(filter->filter->name, "resample") ||
 +        !strcmp(filter->filter->name, "setpts"       ) ||
 +        !strcmp(filter->filter->name, "settb"        ) ||
 +        !strcmp(filter->filter->name, "showspectrum") ||
 +        !strcmp(filter->filter->name, "silencedetect") ||
 +        !strcmp(filter->filter->name, "smartblur") ||
++        !strcmp(filter->filter->name, "split"    ) ||
 +        !strcmp(filter->filter->name, "stereo3d" ) ||
 +        !strcmp(filter->filter->name, "subtitles") ||
 +        !strcmp(filter->filter->name, "thumbnail") ||
 +        !strcmp(filter->filter->name, "transpose") ||
 +        !strcmp(filter->filter->name, "treble"    ) ||
 +        !strcmp(filter->filter->name, "unsharp"  ) ||
 +//         !strcmp(filter->filter->name, "scale"      ) ||
 +        !strcmp(filter->filter->name, "select") ||
 +        !strcmp(filter->filter->name, "volume"   ) ||
 +        !strcmp(filter->filter->name, "yadif"    ) ||
 +        0
 +        ;
 +
 +    if (filter->filter->shorthand) {
 +        av_assert0(filter->priv);
 +        av_assert0(filter->filter->priv_class);
 +        *(const AVClass **)filter->priv = filter->filter->priv_class;
 +        av_opt_set_defaults(filter->priv);
 +        ret = av_opt_set_from_string(filter->priv, args,
 +                                     filter->filter->shorthand, "=", ":");
 +        if (ret < 0)
 +            return ret;
 +        args = NULL;
 +    }
  
 -    if (args && *args && filter->filter->priv_class) {
 +    if (anton_options && args && *args && filter->filter->priv_class) {
  #if FF_API_OLD_FILTER_OPTS
          if (!strcmp(filter->filter->name, "scale") &&
              strchr(args, ':') < strchr(args, '=')) {
@@@ -103,8 -119,11 +123,11 @@@ static const AVFilterPad avfilter_vf_sp
  
  AVFilter avfilter_vf_split = {
      .name      = "split",
 -    .description = NULL_IF_CONFIG_SMALL("Pass on the input to two outputs."),
 +    .description = NULL_IF_CONFIG_SMALL("Pass on the input video to N outputs."),
  
+     .priv_size  = sizeof(SplitContext),
+     .priv_class = &split_class,
      .init   = split_init,
      .uninit = split_uninit,