lavfi: use designated initializers for AVClass

While here:
    - add missing .version and .category,
    - make .class_name consistent across filters,
    - align declarations.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
pull/59/head
Paul B Mahol 13 years ago
parent d70a1a507d
commit 54101214d8
  1. 2
      libavfilter/af_aformat.c
  2. 4
      libavfilter/af_amerge.c
  3. 3
      libavfilter/af_amix.c
  4. 8
      libavfilter/af_asetnsamples.c
  5. 3
      libavfilter/af_asyncts.c
  6. 3
      libavfilter/af_channelsplit.c
  7. 4
      libavfilter/af_silencedetect.c
  8. 8
      libavfilter/asrc_aevalsrc.c
  9. 8
      libavfilter/asrc_anullsrc.c
  10. 1
      libavfilter/avfiltergraph.c
  11. 8
      libavfilter/src_movie.c
  12. 8
      libavfilter/vf_ass.c
  13. 4
      libavfilter/vf_blackdetect.c
  14. 4
      libavfilter/vf_delogo.c
  15. 8
      libavfilter/vf_drawtext.c
  16. 8
      libavfilter/vf_fade.c
  17. 3
      libavfilter/vf_fps.c
  18. 8
      libavfilter/vf_lut.c
  19. 8
      libavfilter/vf_overlay.c
  20. 8
      libavfilter/vsrc_cellauto.c
  21. 8
      libavfilter/vsrc_life.c
  22. 8
      libavfilter/vsrc_mandelbrot.c
  23. 8
      libavfilter/vsrc_mptestsrc.c
  24. 12
      libavfilter/vsrc_testsrc.c

@ -54,7 +54,7 @@ static const AVOption options[] = {
}; };
static const AVClass aformat_class = { static const AVClass aformat_class = {
.class_name = "aformat filter", .class_name = "aformat",
.item_name = av_default_item_name, .item_name = av_default_item_name,
.option = options, .option = options,
.version = LIBAVUTIL_VERSION_INT, .version = LIBAVUTIL_VERSION_INT,

@ -53,9 +53,11 @@ static const AVOption amerge_options[] = {
}; };
static const AVClass amerge_class = { static const AVClass amerge_class = {
.class_name = "AMergeContext", .class_name = "amerge",
.item_name = av_default_item_name, .item_name = av_default_item_name,
.option = amerge_options, .option = amerge_options,
.version = LIBAVUTIL_VERSION_INT,
.category = AV_CLASS_CATEGORY_FILTER,
}; };
static av_cold void uninit(AVFilterContext *ctx) static av_cold void uninit(AVFilterContext *ctx)

@ -185,10 +185,11 @@ static const AVOption options[] = {
}; };
static const AVClass amix_class = { static const AVClass amix_class = {
.class_name = "amix filter", .class_name = "amix",
.item_name = av_default_item_name, .item_name = av_default_item_name,
.option = options, .option = options,
.version = LIBAVUTIL_VERSION_INT, .version = LIBAVUTIL_VERSION_INT,
.category = AV_CLASS_CATEGORY_FILTER,
}; };

@ -51,9 +51,11 @@ static const AVOption asns_options[] = {
}; };
static const AVClass asns_class = { static const AVClass asns_class = {
"asetnsamples", .class_name = "asetnsamples",
av_default_item_name, .item_name = av_default_item_name,
asns_options .option = asns_options,
.version = LIBAVUTIL_VERSION_INT,
.category = AV_CLASS_CATEGORY_FILTER,
}; };
static av_cold int init(AVFilterContext *ctx, const char *args, void *opaque) static av_cold int init(AVFilterContext *ctx, const char *args, void *opaque)

@ -50,10 +50,11 @@ static const AVOption options[] = {
}; };
static const AVClass async_class = { static const AVClass async_class = {
.class_name = "asyncts filter", .class_name = "asyncts",
.item_name = av_default_item_name, .item_name = av_default_item_name,
.option = options, .option = options,
.version = LIBAVUTIL_VERSION_INT, .version = LIBAVUTIL_VERSION_INT,
.category = AV_CLASS_CATEGORY_FILTER,
}; };
static int init(AVFilterContext *ctx, const char *args, void *opaque) static int init(AVFilterContext *ctx, const char *args, void *opaque)

@ -46,10 +46,11 @@ static const AVOption options[] = {
}; };
static const AVClass channelsplit_class = { static const AVClass channelsplit_class = {
.class_name = "channelsplit filter", .class_name = "channelsplit",
.item_name = av_default_item_name, .item_name = av_default_item_name,
.option = options, .option = options,
.version = LIBAVUTIL_VERSION_INT, .version = LIBAVUTIL_VERSION_INT,
.category = AV_CLASS_CATEGORY_FILTER,
}; };
static int init(AVFilterContext *ctx, const char *arg, void *opaque) static int init(AVFilterContext *ctx, const char *arg, void *opaque)

@ -49,9 +49,11 @@ static const AVOption silencedetect_options[] = {
}; };
static const AVClass silencedetect_class = { static const AVClass silencedetect_class = {
.class_name = "SilenceDetectContext", .class_name = "silencedetect",
.item_name = av_default_item_name, .item_name = av_default_item_name,
.option = silencedetect_options, .option = silencedetect_options,
.version = LIBAVUTIL_VERSION_INT,
.category = AV_CLASS_CATEGORY_FILTER,
}; };
static av_cold int init(AVFilterContext *ctx, const char *args, void *opaque) static av_cold int init(AVFilterContext *ctx, const char *args, void *opaque)

@ -79,9 +79,11 @@ static const AVOption eval_options[]= {
}; };
static const AVClass eval_class = { static const AVClass eval_class = {
"AEvalSrcContext", .class_name = "aevalsrc",
av_default_item_name, .item_name = av_default_item_name,
eval_options .option = eval_options,
.version = LIBAVUTIL_VERSION_INT,
.category = AV_CLASS_CATEGORY_FILTER,
}; };
static int init(AVFilterContext *ctx, const char *args, void *opaque) static int init(AVFilterContext *ctx, const char *args, void *opaque)

@ -55,9 +55,11 @@ static const AVOption anullsrc_options[]= {
}; };
static const AVClass anullsrc_class = { static const AVClass anullsrc_class = {
"ANullSrcContext", .class_name = "anullsrc",
av_default_item_name, .item_name = av_default_item_name,
anullsrc_options .option = anullsrc_options,
.version = LIBAVUTIL_VERSION_INT,
.category = AV_CLASS_CATEGORY_FILTER,
}; };
static int init(AVFilterContext *ctx, const char *args, void *opaque) static int init(AVFilterContext *ctx, const char *args, void *opaque)

@ -38,6 +38,7 @@ static const AVClass filtergraph_class = {
.class_name = "AVFilterGraph", .class_name = "AVFilterGraph",
.item_name = av_default_item_name, .item_name = av_default_item_name,
.version = LIBAVUTIL_VERSION_INT, .version = LIBAVUTIL_VERSION_INT,
.category = AV_CLASS_CATEGORY_FILTER,
}; };
AVFilterGraph *avfilter_graph_alloc(void) AVFilterGraph *avfilter_graph_alloc(void)

@ -81,9 +81,11 @@ static const AVOption movie_options[]= {
}; };
static const AVClass movie_class = { static const AVClass movie_class = {
"MovieContext", .class_name = "movie",
av_default_item_name, .item_name = av_default_item_name,
movie_options .option = movie_options,
.version = LIBAVUTIL_VERSION_INT,
.category = AV_CLASS_CATEGORY_FILTER,
}; };
static av_cold int movie_common_init(AVFilterContext *ctx, const char *args, void *opaque, static av_cold int movie_common_init(AVFilterContext *ctx, const char *args, void *opaque,

@ -55,9 +55,11 @@ static const AVOption ass_options[] = {
}; };
static const AVClass ass_class = { static const AVClass ass_class = {
"AssContext", .class_name = "ass",
av_default_item_name, .item_name = av_default_item_name,
ass_options .option = ass_options,
.version = LIBAVUTIL_VERSION_INT,
.category = AV_CLASS_CATEGORY_FILTER,
}; };
/* libass supports a log level ranging from 0 to 7 */ /* libass supports a log level ranging from 0 to 7 */

@ -58,9 +58,11 @@ static const AVOption blackdetect_options[] = {
}; };
static const AVClass blackdetect_class = { static const AVClass blackdetect_class = {
.class_name = "BlackDetectContext", .class_name = "blackdetect",
.item_name = av_default_item_name, .item_name = av_default_item_name,
.option = blackdetect_options, .option = blackdetect_options,
.version = LIBAVUTIL_VERSION_INT,
.category = AV_CLASS_CATEGORY_FILTER,
}; };
#define YUVJ_FORMATS \ #define YUVJ_FORMATS \

@ -152,9 +152,11 @@ static const AVOption delogo_options[]= {
}; };
static const AVClass delogo_class = { static const AVClass delogo_class = {
.class_name = "DelogoContext", .class_name = "delogo",
.item_name = av_default_item_name, .item_name = av_default_item_name,
.option = delogo_options, .option = delogo_options,
.version = LIBAVUTIL_VERSION_INT,
.category = AV_CLASS_CATEGORY_FILTER,
}; };
static int query_formats(AVFilterContext *ctx) static int query_formats(AVFilterContext *ctx)

@ -208,9 +208,11 @@ static const AVOption drawtext_options[]= {
}; };
static const AVClass drawtext_class = { static const AVClass drawtext_class = {
"DrawTextContext", .class_name = "drawtext",
av_default_item_name, .item_name = av_default_item_name,
drawtext_options .option = drawtext_options,
.version = LIBAVUTIL_VERSION_INT,
.category = AV_CLASS_CATEGORY_FILTER,
}; };
#undef __FTERRORS_H__ #undef __FTERRORS_H__

@ -72,9 +72,11 @@ static const AVOption fade_options[] = {
}; };
static const AVClass fade_class = { static const AVClass fade_class = {
"FadeContext", .class_name = "fade",
av_default_item_name, .item_name = av_default_item_name,
fade_options .option = fade_options,
.version = LIBAVUTIL_VERSION_INT,
.category = AV_CLASS_CATEGORY_FILTER,
}; };
static av_cold int init(AVFilterContext *ctx, const char *args, void *opaque) static av_cold int init(AVFilterContext *ctx, const char *args, void *opaque)

@ -61,10 +61,11 @@ static const AVOption options[] = {
}; };
static const AVClass class = { static const AVClass class = {
.class_name = "FPS filter", .class_name = "fps",
.item_name = av_default_item_name, .item_name = av_default_item_name,
.option = options, .option = options,
.version = LIBAVUTIL_VERSION_INT, .version = LIBAVUTIL_VERSION_INT,
.category = AV_CLASS_CATEGORY_FILTER,
}; };
static av_cold int init(AVFilterContext *ctx, const char *args, void *opaque) static av_cold int init(AVFilterContext *ctx, const char *args, void *opaque)

@ -92,9 +92,11 @@ static const AVOption lut_options[] = {
}; };
static const AVClass lut_class = { static const AVClass lut_class = {
"LutContext", .class_name = "lut",
av_default_item_name, .item_name = av_default_item_name,
lut_options .option = lut_options,
.version = LIBAVUTIL_VERSION_INT,
.category = AV_CLASS_CATEGORY_FILTER,
}; };
static int init(AVFilterContext *ctx, const char *args, void *opaque) static int init(AVFilterContext *ctx, const char *args, void *opaque)

@ -104,9 +104,11 @@ static const AVOption overlay_options[] = {
}; };
static const AVClass overlay_class = { static const AVClass overlay_class = {
"OverlayContext", .class_name = "overlay",
av_default_item_name, .item_name = av_default_item_name,
overlay_options .option = overlay_options,
.version = LIBAVUTIL_VERSION_INT,
.category = AV_CLASS_CATEGORY_FILTER,
}; };
static av_cold int init(AVFilterContext *ctx, const char *args, void *opaque) static av_cold int init(AVFilterContext *ctx, const char *args, void *opaque)

@ -79,9 +79,11 @@ static const AVOption cellauto_options[] = {
}; };
static const AVClass cellauto_class = { static const AVClass cellauto_class = {
"CellAutoContext", .class_name = "cellauto",
av_default_item_name, .item_name = av_default_item_name,
cellauto_options .option = cellauto_options,
.version = LIBAVUTIL_VERSION_INT,
.category = AV_CLASS_CATEGORY_FILTER,
}; };
#ifdef DEBUG #ifdef DEBUG

@ -98,9 +98,11 @@ static const AVOption life_options[] = {
}; };
static const AVClass life_class = { static const AVClass life_class = {
"LifeContext", .class_name = "life",
av_default_item_name, .item_name = av_default_item_name,
life_options .option = life_options,
.version = LIBAVUTIL_VERSION_INT,
.category = AV_CLASS_CATEGORY_FILTER,
}; };
static int parse_rule(uint16_t *born_rule, uint16_t *stay_rule, static int parse_rule(uint16_t *born_rule, uint16_t *stay_rule,

@ -106,9 +106,11 @@ static const AVOption mandelbrot_options[] = {
}; };
static const AVClass mandelbrot_class = { static const AVClass mandelbrot_class = {
"MBContext", .class_name = "mandelbrot",
av_default_item_name, .item_name = av_default_item_name,
mandelbrot_options .option = mandelbrot_options,
.version = LIBAVUTIL_VERSION_INT,
.category = AV_CLASS_CATEGORY_FILTER,
}; };
static av_cold int init(AVFilterContext *ctx, const char *args, void *opaque) static av_cold int init(AVFilterContext *ctx, const char *args, void *opaque)

@ -85,9 +85,11 @@ static const AVOption mptestsrc_options[]= {
}; };
static const AVClass mptestsrc_class = { static const AVClass mptestsrc_class = {
"MPTestContext", .class_name = "mptestsrc",
av_default_item_name, .item_name = av_default_item_name,
mptestsrc_options .option = mptestsrc_options,
.version = LIBAVUTIL_VERSION_INT,
.category = AV_CLASS_CATEGORY_FILTER,
}; };
static double c[64]; static double c[64];

@ -159,9 +159,11 @@ static int request_frame(AVFilterLink *outlink)
#if CONFIG_NULLSRC_FILTER #if CONFIG_NULLSRC_FILTER
static const AVClass nullsrc_class = { static const AVClass nullsrc_class = {
.class_name = "NullSourceContext", .class_name = "nullsrc",
.item_name = av_default_item_name, .item_name = av_default_item_name,
.option = testsrc_options, .option = testsrc_options,
.version = LIBAVUTIL_VERSION_INT,
.category = AV_CLASS_CATEGORY_FILTER,
}; };
static void nullsrc_fill_picture(AVFilterContext *ctx, AVFilterBufferRef *picref) { } static void nullsrc_fill_picture(AVFilterContext *ctx, AVFilterBufferRef *picref) { }
@ -194,9 +196,11 @@ AVFilter avfilter_vsrc_nullsrc = {
#if CONFIG_TESTSRC_FILTER #if CONFIG_TESTSRC_FILTER
static const AVClass testsrc_class = { static const AVClass testsrc_class = {
.class_name = "TestSourceContext", .class_name = "testsrc",
.item_name = av_default_item_name, .item_name = av_default_item_name,
.option = testsrc_options, .option = testsrc_options,
.version = LIBAVUTIL_VERSION_INT,
.category = AV_CLASS_CATEGORY_FILTER,
}; };
/** /**
@ -416,9 +420,11 @@ AVFilter avfilter_vsrc_testsrc = {
#if CONFIG_RGBTESTSRC_FILTER #if CONFIG_RGBTESTSRC_FILTER
static const AVClass rgbtestsrc_class = { static const AVClass rgbtestsrc_class = {
.class_name = "RGBTestSourceContext", .class_name = "rgbtestsrc",
.item_name = av_default_item_name, .item_name = av_default_item_name,
.option = testsrc_options, .option = testsrc_options,
.version = LIBAVUTIL_VERSION_INT,
.category = AV_CLASS_CATEGORY_FILTER,
}; };
#define R 0 #define R 0

Loading…
Cancel
Save