History

Merge commit '7b3eb745b98b04dd8a4970b9fd6c98998e858fc1'

* commit '7b3eb745b98b04dd8a4970b9fd6c98998e858fc1': vsrc_testsrc: switch to an AVOptions-based system. Conflicts: doc/filters.texi libavfilter/vsrc_testsrc.c

Michael Niedermayer committed 13 years ago

Commit ef29a952 parents db2de94 7b3eb743 files · +19 −22Browse files

Unified · Split

3 files
  1. doc/filters.texi +1 −2
  2. libavfilter/avfilter.c +2 −0
  3. libavfilter/vsrc_testsrc.c +16 −20
doc/filters.texi+1−2
@@ -6201,8 +6201,7 @@ The @code{testsrc} source generates a test video pattern, showing a · 6200 unmodified lines
62016201 color pattern, a scrolling gradient and a timestamp. This is mainly
62026202 intended for testing purposes.
62036203
6204−These sources accept an optional sequence of @var{key}=@var{value} pairs,
6205−separated by ":". The description of the accepted options follows.
6204+The sources accept the following options:
62066205
62076206 @table @option
62086207
libavfilter/avfilter.c+2−0
@@ -725,6 +725,7 @@ int avfilter_init_filter(AVFilterContext *filter, const char *args, void *opaque · 724 unmodified lines
725725 !strcmp(filter->filter->name, "pp" ) ||
726726 !strcmp(filter->filter->name, "aperms") ||
727727 !strcmp(filter->filter->name, "resample") ||
728+ !strcmp(filter->filter->name, "rgbtestsrc") ||
728729 !strcmp(filter->filter->name, "setpts" ) ||
729730 !strcmp(filter->filter->name, "settb" ) ||
730731 !strcmp(filter->filter->name, "showspectrum") ||
@@ -733,6 +734,7 @@ int avfilter_init_filter(AVFilterContext *filter, const char *args, void *opaque · 2 unmodified lines
733734 !strcmp(filter->filter->name, "split" ) ||
734735 !strcmp(filter->filter->name, "stereo3d" ) ||
735736 !strcmp(filter->filter->name, "subtitles") ||
737+ !strcmp(filter->filter->name, "testsrc" ) ||
736738 !strcmp(filter->filter->name, "thumbnail") ||
737739 !strcmp(filter->filter->name, "transpose") ||
738740 !strcmp(filter->filter->name, "treble" ) ||
libavfilter/vsrc_testsrc.c+16−20
@@ -508,10 +508,8 @@ static av_cold int test_init(AVFilterContext *ctx, const char *args) · 507 unmodified lines
508508 {
509509 TestSourceContext *test = ctx->priv;
510510
511− test->class = &testsrc_class;
512511 test->fill_picture_fn = test_fill_picture;
513− av_opt_set_defaults(test);
514− return init(ctx, args);
512+ return init(ctx, NULL);
515513 }
516514
517515 static int test_query_formats(AVFilterContext *ctx)
@@ -534,17 +532,17 @@ static const AVFilterPad avfilter_vsrc_testsrc_outputs[] = { · 16 unmodified lines
534532 };
535533
536534 AVFilter avfilter_vsrc_testsrc = {
537− .name = "testsrc",
538− .description = NULL_IF_CONFIG_SMALL("Generate test pattern."),
539− .priv_size = sizeof(TestSourceContext),
540− .init = test_init,
541− .uninit = uninit,
535+ .name = "testsrc",
536+ .description = NULL_IF_CONFIG_SMALL("Generate test pattern."),
537+ .priv_size = sizeof(TestSourceContext),
538+ .priv_class = &testsrc_class,
539+ .init = test_init,
540+ .uninit = uninit,
542541
543− .query_formats = test_query_formats,
542+ .query_formats = test_query_formats,
544543
545544 .inputs = NULL,
546545 .outputs = avfilter_vsrc_testsrc_outputs,
547− .priv_class = &testsrc_class,
548546 };
549547
550548 #endif /* CONFIG_TESTSRC_FILTER */
@@ -615,10 +613,8 @@ static av_cold int rgbtest_init(AVFilterContext *ctx, const char *args) · 64 unmodified lines
615613 TestSourceContext *test = ctx->priv;
616614
617615 test->draw_once = 1;
618− test->class = &rgbtestsrc_class;
619616 test->fill_picture_fn = rgbtest_fill_picture;
620− av_opt_set_defaults(test);
621− return init(ctx, args);
617+ return init(ctx, NULL);
622618 }
623619
624620 static int rgbtest_query_formats(AVFilterContext *ctx)
@@ -654,18 +650,18 @@ static const AVFilterPad avfilter_vsrc_rgbtestsrc_outputs[] = { · 29 unmodified lines
654650 };
655651
656652 AVFilter avfilter_vsrc_rgbtestsrc = {
657− .name = "rgbtestsrc",
658− .description = NULL_IF_CONFIG_SMALL("Generate RGB test pattern."),
659− .priv_size = sizeof(TestSourceContext),
660− .init = rgbtest_init,
661− .uninit = uninit,
653+ .name = "rgbtestsrc",
654+ .description = NULL_IF_CONFIG_SMALL("Generate RGB test pattern."),
655+ .priv_size = sizeof(TestSourceContext),
656+ .priv_class = &rgbtestsrc_class,
657+ .init = rgbtest_init,
658+ .uninit = uninit,
662659
663− .query_formats = rgbtest_query_formats,
660+ .query_formats = rgbtest_query_formats,
664661
665662 .inputs = NULL,
666663
667664 .outputs = avfilter_vsrc_rgbtestsrc_outputs,
668− .priv_class = &rgbtestsrc_class,
669665 };
670666
671667 #endif /* CONFIG_RGBTESTSRC_FILTER */

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