You've already forked FFmpeg
							
							
				mirror of
				https://github.com/FFmpeg/FFmpeg.git
				synced 2025-10-30 23:18:11 +02:00 
			
		
		
		
	lavfi: convert input/ouput list compound literals to named objects
A number of compilers, for example those from TI and IBM, choke on these initialisers. The current style is also quite ugly. Signed-off-by: Mans Rullgard <mans@mansr.com>
This commit is contained in:
		| @@ -132,6 +132,22 @@ static int query_formats(AVFilterContext *ctx) | |||||||
|     return 0; |     return 0; | ||||||
| } | } | ||||||
|  |  | ||||||
|  | static const AVFilterPad avfilter_af_aformat_inputs[] = { | ||||||
|  |     { | ||||||
|  |         .name = "default", | ||||||
|  |         .type = AVMEDIA_TYPE_AUDIO, | ||||||
|  |     }, | ||||||
|  |     { NULL } | ||||||
|  | }; | ||||||
|  |  | ||||||
|  | static const AVFilterPad avfilter_af_aformat_outputs[] = { | ||||||
|  |     { | ||||||
|  |         .name = "default", | ||||||
|  |         .type = AVMEDIA_TYPE_AUDIO | ||||||
|  |     }, | ||||||
|  |     { NULL } | ||||||
|  | }; | ||||||
|  |  | ||||||
| AVFilter avfilter_af_aformat = { | AVFilter avfilter_af_aformat = { | ||||||
|     .name          = "aformat", |     .name          = "aformat", | ||||||
|     .description   = NULL_IF_CONFIG_SMALL("Convert the input audio to one of the specified formats."), |     .description   = NULL_IF_CONFIG_SMALL("Convert the input audio to one of the specified formats."), | ||||||
| @@ -139,10 +155,6 @@ AVFilter avfilter_af_aformat = { | |||||||
|     .query_formats = query_formats, |     .query_formats = query_formats, | ||||||
|     .priv_size     = sizeof(AFormatContext), |     .priv_size     = sizeof(AFormatContext), | ||||||
|  |  | ||||||
|     .inputs        = (const AVFilterPad[]) {{ .name            = "default", |     .inputs        = avfilter_af_aformat_inputs, | ||||||
|                                               .type            = AVMEDIA_TYPE_AUDIO, }, |     .outputs       = avfilter_af_aformat_outputs, | ||||||
|                                             { .name = NULL}}, |  | ||||||
|     .outputs       = (const AVFilterPad[]) {{ .name            = "default", |  | ||||||
|                                               .type            = AVMEDIA_TYPE_AUDIO}, |  | ||||||
|                                             { .name = NULL}}, |  | ||||||
| }; | }; | ||||||
|   | |||||||
| @@ -549,6 +549,16 @@ static int query_formats(AVFilterContext *ctx) | |||||||
|     return 0; |     return 0; | ||||||
| } | } | ||||||
|  |  | ||||||
|  | static const AVFilterPad avfilter_af_amix_outputs[] = { | ||||||
|  |     { | ||||||
|  |         .name          = "default", | ||||||
|  |         .type          = AVMEDIA_TYPE_AUDIO, | ||||||
|  |         .config_props  = config_output, | ||||||
|  |         .request_frame = request_frame | ||||||
|  |     }, | ||||||
|  |     { NULL } | ||||||
|  | }; | ||||||
|  |  | ||||||
| AVFilter avfilter_af_amix = { | AVFilter avfilter_af_amix = { | ||||||
|     .name          = "amix", |     .name          = "amix", | ||||||
|     .description   = NULL_IF_CONFIG_SMALL("Audio mixing."), |     .description   = NULL_IF_CONFIG_SMALL("Audio mixing."), | ||||||
| @@ -559,9 +569,5 @@ AVFilter avfilter_af_amix = { | |||||||
|     .query_formats  = query_formats, |     .query_formats  = query_formats, | ||||||
|  |  | ||||||
|     .inputs    = NULL, |     .inputs    = NULL, | ||||||
|     .outputs   = (const AVFilterPad[]) {{ .name          = "default", |     .outputs   = avfilter_af_amix_outputs, | ||||||
|                                           .type          = AVMEDIA_TYPE_AUDIO, |  | ||||||
|                                           .config_props  = config_output, |  | ||||||
|                                           .request_frame = request_frame }, |  | ||||||
|                                         { .name = NULL}}, |  | ||||||
| }; | }; | ||||||
|   | |||||||
| @@ -26,18 +26,30 @@ | |||||||
| #include "internal.h" | #include "internal.h" | ||||||
| #include "libavutil/internal.h" | #include "libavutil/internal.h" | ||||||
|  |  | ||||||
|  | static const AVFilterPad avfilter_af_anull_inputs[] = { | ||||||
|  |     { | ||||||
|  |         .name             = "default", | ||||||
|  |         .type             = AVMEDIA_TYPE_AUDIO, | ||||||
|  |         .get_audio_buffer = ff_null_get_audio_buffer, | ||||||
|  |     }, | ||||||
|  |     { NULL } | ||||||
|  | }; | ||||||
|  |  | ||||||
|  | static const AVFilterPad avfilter_af_anull_outputs[] = { | ||||||
|  |     { | ||||||
|  |         .name = "default", | ||||||
|  |         .type = AVMEDIA_TYPE_AUDIO, | ||||||
|  |     }, | ||||||
|  |     { NULL } | ||||||
|  | }; | ||||||
|  |  | ||||||
| AVFilter avfilter_af_anull = { | AVFilter avfilter_af_anull = { | ||||||
|     .name      = "anull", |     .name      = "anull", | ||||||
|     .description = NULL_IF_CONFIG_SMALL("Pass the source unchanged to the output."), |     .description = NULL_IF_CONFIG_SMALL("Pass the source unchanged to the output."), | ||||||
|  |  | ||||||
|     .priv_size = 0, |     .priv_size = 0, | ||||||
|  |  | ||||||
|     .inputs    = (const AVFilterPad[]) {{ .name             = "default", |     .inputs    = avfilter_af_anull_inputs, | ||||||
|                                           .type             = AVMEDIA_TYPE_AUDIO, |  | ||||||
|                                           .get_audio_buffer = ff_null_get_audio_buffer, }, |  | ||||||
|                                         { .name = NULL}}, |  | ||||||
|  |  | ||||||
|     .outputs   = (const AVFilterPad[]) {{ .name             = "default", |     .outputs   = avfilter_af_anull_outputs, | ||||||
|                                           .type             = AVMEDIA_TYPE_AUDIO, }, |  | ||||||
|                                         { .name = NULL}}, |  | ||||||
| }; | }; | ||||||
|   | |||||||
| @@ -239,6 +239,25 @@ fail: | |||||||
|     return ret; |     return ret; | ||||||
| } | } | ||||||
|  |  | ||||||
|  | static const AVFilterPad avfilter_af_asyncts_inputs[] = { | ||||||
|  |     { | ||||||
|  |         .name           = "default", | ||||||
|  |         .type           = AVMEDIA_TYPE_AUDIO, | ||||||
|  |         .filter_samples = filter_samples | ||||||
|  |     }, | ||||||
|  |     { NULL } | ||||||
|  | }; | ||||||
|  |  | ||||||
|  | static const AVFilterPad avfilter_af_asyncts_outputs[] = { | ||||||
|  |     { | ||||||
|  |         .name          = "default", | ||||||
|  |         .type          = AVMEDIA_TYPE_AUDIO, | ||||||
|  |         .config_props  = config_props, | ||||||
|  |         .request_frame = request_frame | ||||||
|  |     }, | ||||||
|  |     { NULL } | ||||||
|  | }; | ||||||
|  |  | ||||||
| AVFilter avfilter_af_asyncts = { | AVFilter avfilter_af_asyncts = { | ||||||
|     .name        = "asyncts", |     .name        = "asyncts", | ||||||
|     .description = NULL_IF_CONFIG_SMALL("Sync audio data to timestamps"), |     .description = NULL_IF_CONFIG_SMALL("Sync audio data to timestamps"), | ||||||
| @@ -248,13 +267,6 @@ AVFilter avfilter_af_asyncts = { | |||||||
|  |  | ||||||
|     .priv_size   = sizeof(ASyncContext), |     .priv_size   = sizeof(ASyncContext), | ||||||
|  |  | ||||||
|     .inputs      = (const AVFilterPad[]) {{ .name           = "default", |     .inputs      = avfilter_af_asyncts_inputs, | ||||||
|                                             .type           = AVMEDIA_TYPE_AUDIO, |     .outputs     = avfilter_af_asyncts_outputs, | ||||||
|                                             .filter_samples = filter_samples }, |  | ||||||
|                                           { NULL }}, |  | ||||||
|     .outputs     = (const AVFilterPad[]) {{ .name           = "default", |  | ||||||
|                                             .type           = AVMEDIA_TYPE_AUDIO, |  | ||||||
|                                             .config_props   = config_props, |  | ||||||
|                                             .request_frame  = request_frame }, |  | ||||||
|                                           { NULL }}, |  | ||||||
| }; | }; | ||||||
|   | |||||||
| @@ -386,6 +386,24 @@ static int channelmap_config_input(AVFilterLink *inlink) | |||||||
|     return err; |     return err; | ||||||
| } | } | ||||||
|  |  | ||||||
|  | static const AVFilterPad avfilter_af_channelmap_inputs[] = { | ||||||
|  |     { | ||||||
|  |         .name           = "default", | ||||||
|  |         .type           = AVMEDIA_TYPE_AUDIO, | ||||||
|  |         .filter_samples = channelmap_filter_samples, | ||||||
|  |         .config_props   = channelmap_config_input | ||||||
|  |     }, | ||||||
|  |     { NULL } | ||||||
|  | }; | ||||||
|  |  | ||||||
|  | static const AVFilterPad avfilter_af_channelmap_outputs[] = { | ||||||
|  |     { | ||||||
|  |         .name = "default", | ||||||
|  |         .type = AVMEDIA_TYPE_AUDIO | ||||||
|  |     }, | ||||||
|  |     { NULL } | ||||||
|  | }; | ||||||
|  |  | ||||||
| AVFilter avfilter_af_channelmap = { | AVFilter avfilter_af_channelmap = { | ||||||
|     .name          = "channelmap", |     .name          = "channelmap", | ||||||
|     .description   = NULL_IF_CONFIG_SMALL("Remap audio channels."), |     .description   = NULL_IF_CONFIG_SMALL("Remap audio channels."), | ||||||
| @@ -393,12 +411,6 @@ AVFilter avfilter_af_channelmap = { | |||||||
|     .query_formats = channelmap_query_formats, |     .query_formats = channelmap_query_formats, | ||||||
|     .priv_size     = sizeof(ChannelMapContext), |     .priv_size     = sizeof(ChannelMapContext), | ||||||
|  |  | ||||||
|     .inputs        = (const AVFilterPad[]) {{ .name            = "default", |     .inputs        = avfilter_af_channelmap_inputs, | ||||||
|                                               .type            = AVMEDIA_TYPE_AUDIO, |     .outputs       = avfilter_af_channelmap_outputs, | ||||||
|                                               .filter_samples  = channelmap_filter_samples, |  | ||||||
|                                               .config_props    = channelmap_config_input }, |  | ||||||
|                                             { .name = NULL }}, |  | ||||||
|     .outputs       = (const AVFilterPad[]) {{ .name            = "default", |  | ||||||
|                                               .type            = AVMEDIA_TYPE_AUDIO }, |  | ||||||
|                                             { .name = NULL }}, |  | ||||||
| }; | }; | ||||||
|   | |||||||
| @@ -136,6 +136,15 @@ static int filter_samples(AVFilterLink *inlink, AVFilterBufferRef *buf) | |||||||
|     return ret; |     return ret; | ||||||
| } | } | ||||||
|  |  | ||||||
|  | static const AVFilterPad avfilter_af_channelsplit_inputs[] = { | ||||||
|  |     { | ||||||
|  |         .name           = "default", | ||||||
|  |         .type           = AVMEDIA_TYPE_AUDIO, | ||||||
|  |         .filter_samples = filter_samples, | ||||||
|  |     }, | ||||||
|  |     { NULL } | ||||||
|  | }; | ||||||
|  |  | ||||||
| AVFilter avfilter_af_channelsplit = { | AVFilter avfilter_af_channelsplit = { | ||||||
|     .name           = "channelsplit", |     .name           = "channelsplit", | ||||||
|     .description    = NULL_IF_CONFIG_SMALL("Split audio into per-channel streams"), |     .description    = NULL_IF_CONFIG_SMALL("Split audio into per-channel streams"), | ||||||
| @@ -144,9 +153,6 @@ AVFilter avfilter_af_channelsplit = { | |||||||
|     .init           = init, |     .init           = init, | ||||||
|     .query_formats  = query_formats, |     .query_formats  = query_formats, | ||||||
|  |  | ||||||
|     .inputs  = (const AVFilterPad[]){{ .name           = "default", |     .inputs  = avfilter_af_channelsplit_inputs, | ||||||
|                                        .type           = AVMEDIA_TYPE_AUDIO, |  | ||||||
|                                        .filter_samples = filter_samples, }, |  | ||||||
|                                      { NULL }}, |  | ||||||
|     .outputs = NULL, |     .outputs = NULL, | ||||||
| }; | }; | ||||||
|   | |||||||
| @@ -485,6 +485,16 @@ fail: | |||||||
|     return AVERROR(ENOMEM); |     return AVERROR(ENOMEM); | ||||||
| } | } | ||||||
|  |  | ||||||
|  | static const AVFilterPad avfilter_af_join_outputs[] = { | ||||||
|  |     { | ||||||
|  |         .name          = "default", | ||||||
|  |         .type          = AVMEDIA_TYPE_AUDIO, | ||||||
|  |         .config_props  = join_config_output, | ||||||
|  |         .request_frame = join_request_frame, | ||||||
|  |     }, | ||||||
|  |     { NULL } | ||||||
|  | }; | ||||||
|  |  | ||||||
| AVFilter avfilter_af_join = { | AVFilter avfilter_af_join = { | ||||||
|     .name           = "join", |     .name           = "join", | ||||||
|     .description    = NULL_IF_CONFIG_SMALL("Join multiple audio streams into " |     .description    = NULL_IF_CONFIG_SMALL("Join multiple audio streams into " | ||||||
| @@ -496,9 +506,5 @@ AVFilter avfilter_af_join = { | |||||||
|     .query_formats  = join_query_formats, |     .query_formats  = join_query_formats, | ||||||
|  |  | ||||||
|     .inputs  = NULL, |     .inputs  = NULL, | ||||||
|     .outputs = (const AVFilterPad[]){{ .name          = "default", |     .outputs = avfilter_af_join_outputs, | ||||||
|                                        .type          = AVMEDIA_TYPE_AUDIO, |  | ||||||
|                                        .config_props  = join_config_output, |  | ||||||
|                                        .request_frame = join_request_frame, }, |  | ||||||
|                                      { NULL }}, |  | ||||||
| }; | }; | ||||||
|   | |||||||
| @@ -239,6 +239,26 @@ fail: | |||||||
|     return ret; |     return ret; | ||||||
| } | } | ||||||
|  |  | ||||||
|  | static const AVFilterPad avfilter_af_resample_inputs[] = { | ||||||
|  |     { | ||||||
|  |         .name           = "default", | ||||||
|  |         .type           = AVMEDIA_TYPE_AUDIO, | ||||||
|  |         .filter_samples = filter_samples, | ||||||
|  |         .min_perms      = AV_PERM_READ | ||||||
|  |     }, | ||||||
|  |     { NULL } | ||||||
|  | }; | ||||||
|  |  | ||||||
|  | static const AVFilterPad avfilter_af_resample_outputs[] = { | ||||||
|  |     { | ||||||
|  |         .name          = "default", | ||||||
|  |         .type          = AVMEDIA_TYPE_AUDIO, | ||||||
|  |         .config_props  = config_output, | ||||||
|  |         .request_frame = request_frame | ||||||
|  |     }, | ||||||
|  |     { NULL } | ||||||
|  | }; | ||||||
|  |  | ||||||
| AVFilter avfilter_af_resample = { | AVFilter avfilter_af_resample = { | ||||||
|     .name          = "resample", |     .name          = "resample", | ||||||
|     .description   = NULL_IF_CONFIG_SMALL("Audio resampling and conversion."), |     .description   = NULL_IF_CONFIG_SMALL("Audio resampling and conversion."), | ||||||
| @@ -247,14 +267,6 @@ AVFilter avfilter_af_resample = { | |||||||
|     .uninit         = uninit, |     .uninit         = uninit, | ||||||
|     .query_formats  = query_formats, |     .query_formats  = query_formats, | ||||||
|  |  | ||||||
|     .inputs    = (const AVFilterPad[]) {{ .name            = "default", |     .inputs    = avfilter_af_resample_inputs, | ||||||
|                                           .type            = AVMEDIA_TYPE_AUDIO, |     .outputs   = avfilter_af_resample_outputs, | ||||||
|                                           .filter_samples  = filter_samples, |  | ||||||
|                                           .min_perms       = AV_PERM_READ }, |  | ||||||
|                                         { .name = NULL}}, |  | ||||||
|     .outputs   = (const AVFilterPad[]) {{ .name          = "default", |  | ||||||
|                                           .type          = AVMEDIA_TYPE_AUDIO, |  | ||||||
|                                           .config_props  = config_output, |  | ||||||
|                                           .request_frame = request_frame }, |  | ||||||
|                                         { .name = NULL}}, |  | ||||||
| }; | }; | ||||||
|   | |||||||
| @@ -25,19 +25,21 @@ static int null_filter_samples(AVFilterLink *link, AVFilterBufferRef *samplesref | |||||||
|     return 0; |     return 0; | ||||||
| } | } | ||||||
|  |  | ||||||
|  | static const AVFilterPad avfilter_asink_anullsink_inputs[] = { | ||||||
|  |     { | ||||||
|  |         .name           = "default", | ||||||
|  |         .type           = AVMEDIA_TYPE_AUDIO, | ||||||
|  |         .filter_samples = null_filter_samples, | ||||||
|  |     }, | ||||||
|  |     { NULL }, | ||||||
|  | }; | ||||||
|  |  | ||||||
| AVFilter avfilter_asink_anullsink = { | AVFilter avfilter_asink_anullsink = { | ||||||
|     .name        = "anullsink", |     .name        = "anullsink", | ||||||
|     .description = NULL_IF_CONFIG_SMALL("Do absolutely nothing with the input audio."), |     .description = NULL_IF_CONFIG_SMALL("Do absolutely nothing with the input audio."), | ||||||
|  |  | ||||||
|     .priv_size = 0, |     .priv_size = 0, | ||||||
|  |  | ||||||
|     .inputs    = (const AVFilterPad[]) { |     .inputs    = avfilter_asink_anullsink_inputs, | ||||||
|         { |  | ||||||
|             .name            = "default", |  | ||||||
|             .type            = AVMEDIA_TYPE_AUDIO, |  | ||||||
|             .filter_samples  = null_filter_samples, |  | ||||||
|         }, |  | ||||||
|         { .name = NULL}, |  | ||||||
|     }, |  | ||||||
|     .outputs   = NULL, |     .outputs   = NULL, | ||||||
| }; | }; | ||||||
|   | |||||||
| @@ -84,6 +84,16 @@ static int request_frame(AVFilterLink *link) | |||||||
|     return -1; |     return -1; | ||||||
| } | } | ||||||
|  |  | ||||||
|  | static const AVFilterPad avfilter_asrc_anullsrc_outputs[] = { | ||||||
|  |     { | ||||||
|  |         .name          = "default", | ||||||
|  |         .type          = AVMEDIA_TYPE_AUDIO, | ||||||
|  |         .config_props  = config_props, | ||||||
|  |         .request_frame = request_frame, | ||||||
|  |     }, | ||||||
|  |     { NULL } | ||||||
|  | }; | ||||||
|  |  | ||||||
| AVFilter avfilter_asrc_anullsrc = { | AVFilter avfilter_asrc_anullsrc = { | ||||||
|     .name        = "anullsrc", |     .name        = "anullsrc", | ||||||
|     .description = NULL_IF_CONFIG_SMALL("Null audio source, never return audio frames."), |     .description = NULL_IF_CONFIG_SMALL("Null audio source, never return audio frames."), | ||||||
| @@ -93,9 +103,5 @@ AVFilter avfilter_asrc_anullsrc = { | |||||||
|  |  | ||||||
|     .inputs      = NULL, |     .inputs      = NULL, | ||||||
|  |  | ||||||
|     .outputs     = (const AVFilterPad[]) {{ .name = "default", |     .outputs     = avfilter_asrc_anullsrc_outputs, | ||||||
|                                             .type = AVMEDIA_TYPE_AUDIO, |  | ||||||
|                                             .config_props = config_props, |  | ||||||
|                                             .request_frame = request_frame, }, |  | ||||||
|                                           { .name = NULL}}, |  | ||||||
| }; | }; | ||||||
|   | |||||||
| @@ -140,32 +140,44 @@ int av_buffersink_read_samples(AVFilterContext *ctx, AVFilterBufferRef **pbuf, | |||||||
|     return ret; |     return ret; | ||||||
| } | } | ||||||
|  |  | ||||||
|  | static const AVFilterPad avfilter_vsink_buffer_inputs[] = { | ||||||
|  |     { | ||||||
|  |         .name        = "default", | ||||||
|  |         .type        = AVMEDIA_TYPE_VIDEO, | ||||||
|  |         .start_frame = start_frame, | ||||||
|  |         .min_perms   = AV_PERM_READ, | ||||||
|  |         .needs_fifo  = 1 | ||||||
|  |     }, | ||||||
|  |     { NULL } | ||||||
|  | }; | ||||||
|  |  | ||||||
| AVFilter avfilter_vsink_buffer = { | AVFilter avfilter_vsink_buffer = { | ||||||
|     .name      = "buffersink", |     .name      = "buffersink", | ||||||
|     .description = NULL_IF_CONFIG_SMALL("Buffer video frames, and make them available to the end of the filter graph."), |     .description = NULL_IF_CONFIG_SMALL("Buffer video frames, and make them available to the end of the filter graph."), | ||||||
|     .priv_size = sizeof(BufferSinkContext), |     .priv_size = sizeof(BufferSinkContext), | ||||||
|     .uninit    = uninit, |     .uninit    = uninit, | ||||||
|  |  | ||||||
|     .inputs    = (const AVFilterPad[]) {{ .name          = "default", |     .inputs    = avfilter_vsink_buffer_inputs, | ||||||
|                                           .type          = AVMEDIA_TYPE_VIDEO, |  | ||||||
|                                           .start_frame   = start_frame, |  | ||||||
|                                           .min_perms     = AV_PERM_READ, |  | ||||||
|                                           .needs_fifo    = 1 }, |  | ||||||
|                                         { .name = NULL }}, |  | ||||||
|     .outputs   = NULL, |     .outputs   = NULL, | ||||||
| }; | }; | ||||||
|  |  | ||||||
|  | static const AVFilterPad avfilter_asink_abuffer_inputs[] = { | ||||||
|  |     { | ||||||
|  |         .name           = "default", | ||||||
|  |         .type           = AVMEDIA_TYPE_AUDIO, | ||||||
|  |         .filter_samples = start_frame, | ||||||
|  |         .min_perms      = AV_PERM_READ, | ||||||
|  |         .needs_fifo     = 1 | ||||||
|  |     }, | ||||||
|  |     { NULL } | ||||||
|  | }; | ||||||
|  |  | ||||||
| AVFilter avfilter_asink_abuffer = { | AVFilter avfilter_asink_abuffer = { | ||||||
|     .name      = "abuffersink", |     .name      = "abuffersink", | ||||||
|     .description = NULL_IF_CONFIG_SMALL("Buffer audio frames, and make them available to the end of the filter graph."), |     .description = NULL_IF_CONFIG_SMALL("Buffer audio frames, and make them available to the end of the filter graph."), | ||||||
|     .priv_size = sizeof(BufferSinkContext), |     .priv_size = sizeof(BufferSinkContext), | ||||||
|     .uninit    = uninit, |     .uninit    = uninit, | ||||||
|  |  | ||||||
|     .inputs    = (const AVFilterPad[]) {{ .name           = "default", |     .inputs    = avfilter_asink_abuffer_inputs, | ||||||
|                                           .type           = AVMEDIA_TYPE_AUDIO, |  | ||||||
|                                           .filter_samples = start_frame, |  | ||||||
|                                           .min_perms      = AV_PERM_READ, |  | ||||||
|                                           .needs_fifo     = 1 }, |  | ||||||
|                                         { .name = NULL }}, |  | ||||||
|     .outputs   = NULL, |     .outputs   = NULL, | ||||||
| }; | }; | ||||||
|   | |||||||
| @@ -355,6 +355,17 @@ static int poll_frame(AVFilterLink *link) | |||||||
|     return size/sizeof(AVFilterBufferRef*); |     return size/sizeof(AVFilterBufferRef*); | ||||||
| } | } | ||||||
|  |  | ||||||
|  | static const AVFilterPad avfilter_vsrc_buffer_outputs[] = { | ||||||
|  |     { | ||||||
|  |         .name          = "default", | ||||||
|  |         .type          = AVMEDIA_TYPE_VIDEO, | ||||||
|  |         .request_frame = request_frame, | ||||||
|  |         .poll_frame    = poll_frame, | ||||||
|  |         .config_props  = config_props, | ||||||
|  |     }, | ||||||
|  |     { NULL } | ||||||
|  | }; | ||||||
|  |  | ||||||
| AVFilter avfilter_vsrc_buffer = { | AVFilter avfilter_vsrc_buffer = { | ||||||
|     .name      = "buffer", |     .name      = "buffer", | ||||||
|     .description = NULL_IF_CONFIG_SMALL("Buffer video frames, and make them accessible to the filterchain."), |     .description = NULL_IF_CONFIG_SMALL("Buffer video frames, and make them accessible to the filterchain."), | ||||||
| @@ -365,12 +376,18 @@ AVFilter avfilter_vsrc_buffer = { | |||||||
|     .uninit    = uninit, |     .uninit    = uninit, | ||||||
|  |  | ||||||
|     .inputs    = NULL, |     .inputs    = NULL, | ||||||
|     .outputs   = (const AVFilterPad[]) {{ .name            = "default", |     .outputs   = avfilter_vsrc_buffer_outputs, | ||||||
|                                           .type            = AVMEDIA_TYPE_VIDEO, | }; | ||||||
|                                           .request_frame   = request_frame, |  | ||||||
|                                           .poll_frame      = poll_frame, | static const AVFilterPad avfilter_asrc_abuffer_outputs[] = { | ||||||
|                                           .config_props    = config_props, }, |     { | ||||||
|                                         { .name = NULL}}, |         .name          = "default", | ||||||
|  |         .type          = AVMEDIA_TYPE_AUDIO, | ||||||
|  |         .request_frame = request_frame, | ||||||
|  |         .poll_frame    = poll_frame, | ||||||
|  |         .config_props  = config_props, | ||||||
|  |     }, | ||||||
|  |     { NULL } | ||||||
| }; | }; | ||||||
|  |  | ||||||
| AVFilter avfilter_asrc_abuffer = { | AVFilter avfilter_asrc_abuffer = { | ||||||
| @@ -383,10 +400,5 @@ AVFilter avfilter_asrc_abuffer = { | |||||||
|     .uninit    = uninit, |     .uninit    = uninit, | ||||||
|  |  | ||||||
|     .inputs    = NULL, |     .inputs    = NULL, | ||||||
|     .outputs   = (const AVFilterPad[]) {{ .name            = "default", |     .outputs   = avfilter_asrc_abuffer_outputs, | ||||||
|                                           .type            = AVMEDIA_TYPE_AUDIO, |  | ||||||
|                                           .request_frame   = request_frame, |  | ||||||
|                                           .poll_frame      = poll_frame, |  | ||||||
|                                           .config_props    = config_props, }, |  | ||||||
|                                         { .name = NULL}}, |  | ||||||
| }; | }; | ||||||
|   | |||||||
| @@ -267,6 +267,28 @@ static int request_frame(AVFilterLink *outlink) | |||||||
|     return ret; |     return ret; | ||||||
| } | } | ||||||
|  |  | ||||||
|  | static const AVFilterPad avfilter_vf_fifo_inputs[] = { | ||||||
|  |     { | ||||||
|  |         .name             = "default", | ||||||
|  |         .type             = AVMEDIA_TYPE_VIDEO, | ||||||
|  |         .get_video_buffer = ff_null_get_video_buffer, | ||||||
|  |         .start_frame      = add_to_queue, | ||||||
|  |         .draw_slice       = draw_slice, | ||||||
|  |         .end_frame        = end_frame, | ||||||
|  |         .rej_perms        = AV_PERM_REUSE2, | ||||||
|  |     }, | ||||||
|  |     { NULL } | ||||||
|  | }; | ||||||
|  |  | ||||||
|  | static const AVFilterPad avfilter_vf_fifo_outputs[] = { | ||||||
|  |     { | ||||||
|  |         .name          = "default", | ||||||
|  |         .type          = AVMEDIA_TYPE_VIDEO, | ||||||
|  |         .request_frame = request_frame, | ||||||
|  |     }, | ||||||
|  |     { NULL } | ||||||
|  | }; | ||||||
|  |  | ||||||
| AVFilter avfilter_vf_fifo = { | AVFilter avfilter_vf_fifo = { | ||||||
|     .name      = "fifo", |     .name      = "fifo", | ||||||
|     .description = NULL_IF_CONFIG_SMALL("Buffer input images and send them when they are requested."), |     .description = NULL_IF_CONFIG_SMALL("Buffer input images and send them when they are requested."), | ||||||
| @@ -276,18 +298,28 @@ AVFilter avfilter_vf_fifo = { | |||||||
|  |  | ||||||
|     .priv_size = sizeof(FifoContext), |     .priv_size = sizeof(FifoContext), | ||||||
|  |  | ||||||
|     .inputs    = (const AVFilterPad[]) {{ .name            = "default", |     .inputs    = avfilter_vf_fifo_inputs, | ||||||
|                                           .type            = AVMEDIA_TYPE_VIDEO, |     .outputs   = avfilter_vf_fifo_outputs, | ||||||
|                                           .get_video_buffer= ff_null_get_video_buffer, | }; | ||||||
|                                           .start_frame     = add_to_queue, |  | ||||||
|                                           .draw_slice      = draw_slice, | static const AVFilterPad avfilter_af_afifo_inputs[] = { | ||||||
|                                           .end_frame       = end_frame, |     { | ||||||
|                                           .rej_perms       = AV_PERM_REUSE2, }, |         .name             = "default", | ||||||
|                                         { .name = NULL}}, |         .type             = AVMEDIA_TYPE_AUDIO, | ||||||
|     .outputs   = (const AVFilterPad[]) {{ .name            = "default", |         .get_audio_buffer = ff_null_get_audio_buffer, | ||||||
|                                           .type            = AVMEDIA_TYPE_VIDEO, |         .filter_samples   = add_to_queue, | ||||||
|                                           .request_frame   = request_frame, }, |         .rej_perms        = AV_PERM_REUSE2, | ||||||
|                                         { .name = NULL}}, |     }, | ||||||
|  |     { NULL } | ||||||
|  | }; | ||||||
|  |  | ||||||
|  | static const AVFilterPad avfilter_af_afifo_outputs[] = { | ||||||
|  |     { | ||||||
|  |         .name          = "default", | ||||||
|  |         .type          = AVMEDIA_TYPE_AUDIO, | ||||||
|  |         .request_frame = request_frame, | ||||||
|  |     }, | ||||||
|  |     { NULL } | ||||||
| }; | }; | ||||||
|  |  | ||||||
| AVFilter avfilter_af_afifo = { | AVFilter avfilter_af_afifo = { | ||||||
| @@ -299,14 +331,6 @@ AVFilter avfilter_af_afifo = { | |||||||
|  |  | ||||||
|     .priv_size = sizeof(FifoContext), |     .priv_size = sizeof(FifoContext), | ||||||
|  |  | ||||||
|     .inputs    = (const AVFilterPad[]) {{ .name             = "default", |     .inputs    = avfilter_af_afifo_inputs, | ||||||
|                                           .type             = AVMEDIA_TYPE_AUDIO, |     .outputs   = avfilter_af_afifo_outputs, | ||||||
|                                           .get_audio_buffer = ff_null_get_audio_buffer, |  | ||||||
|                                           .filter_samples   = add_to_queue, |  | ||||||
|                                           .rej_perms        = AV_PERM_REUSE2, }, |  | ||||||
|                                         { .name = NULL}}, |  | ||||||
|     .outputs   = (const AVFilterPad[]) {{ .name             = "default", |  | ||||||
|                                           .type             = AVMEDIA_TYPE_AUDIO, |  | ||||||
|                                           .request_frame    = request_frame, }, |  | ||||||
|                                         { .name = NULL}}, |  | ||||||
| }; | }; | ||||||
|   | |||||||
| @@ -110,6 +110,18 @@ static int end_frame(AVFilterLink *inlink) | |||||||
|     return ret; |     return ret; | ||||||
| } | } | ||||||
|  |  | ||||||
|  | static const AVFilterPad avfilter_vf_split_inputs[] = { | ||||||
|  |     { | ||||||
|  |         .name             = "default", | ||||||
|  |         .type             = AVMEDIA_TYPE_VIDEO, | ||||||
|  |         .get_video_buffer = ff_null_get_video_buffer, | ||||||
|  |         .start_frame      = start_frame, | ||||||
|  |         .draw_slice       = draw_slice, | ||||||
|  |         .end_frame        = end_frame, | ||||||
|  |     }, | ||||||
|  |     { NULL } | ||||||
|  | }; | ||||||
|  |  | ||||||
| AVFilter avfilter_vf_split = { | AVFilter avfilter_vf_split = { | ||||||
|     .name      = "split", |     .name      = "split", | ||||||
|     .description = NULL_IF_CONFIG_SMALL("Pass on the input to two outputs."), |     .description = NULL_IF_CONFIG_SMALL("Pass on the input to two outputs."), | ||||||
| @@ -117,13 +129,7 @@ AVFilter avfilter_vf_split = { | |||||||
|     .init   = split_init, |     .init   = split_init, | ||||||
|     .uninit = split_uninit, |     .uninit = split_uninit, | ||||||
|  |  | ||||||
|     .inputs    = (const AVFilterPad[]) {{ .name            = "default", |     .inputs    = avfilter_vf_split_inputs, | ||||||
|                                           .type            = AVMEDIA_TYPE_VIDEO, |  | ||||||
|                                           .get_video_buffer= ff_null_get_video_buffer, |  | ||||||
|                                           .start_frame     = start_frame, |  | ||||||
|                                           .draw_slice      = draw_slice, |  | ||||||
|                                           .end_frame       = end_frame, }, |  | ||||||
|                                         { .name = NULL}}, |  | ||||||
|     .outputs   = NULL, |     .outputs   = NULL, | ||||||
| }; | }; | ||||||
|  |  | ||||||
| @@ -148,6 +154,16 @@ static int filter_samples(AVFilterLink *inlink, AVFilterBufferRef *samplesref) | |||||||
|     return ret; |     return ret; | ||||||
| } | } | ||||||
|  |  | ||||||
|  | static const AVFilterPad avfilter_af_asplit_inputs[] = { | ||||||
|  |     { | ||||||
|  |         .name             = "default", | ||||||
|  |         .type             = AVMEDIA_TYPE_AUDIO, | ||||||
|  |         .get_audio_buffer = ff_null_get_audio_buffer, | ||||||
|  |         .filter_samples   = filter_samples | ||||||
|  |     }, | ||||||
|  |     { NULL } | ||||||
|  | }; | ||||||
|  |  | ||||||
| AVFilter avfilter_af_asplit = { | AVFilter avfilter_af_asplit = { | ||||||
|     .name        = "asplit", |     .name        = "asplit", | ||||||
|     .description = NULL_IF_CONFIG_SMALL("Pass on the audio input to N audio outputs."), |     .description = NULL_IF_CONFIG_SMALL("Pass on the audio input to N audio outputs."), | ||||||
| @@ -155,10 +171,6 @@ AVFilter avfilter_af_asplit = { | |||||||
|     .init   = split_init, |     .init   = split_init, | ||||||
|     .uninit = split_uninit, |     .uninit = split_uninit, | ||||||
|  |  | ||||||
|     .inputs  = (const AVFilterPad[]) {{ .name             = "default", |     .inputs  = avfilter_af_asplit_inputs, | ||||||
|                                         .type             = AVMEDIA_TYPE_AUDIO, |  | ||||||
|                                         .get_audio_buffer = ff_null_get_audio_buffer, |  | ||||||
|                                         .filter_samples   = filter_samples }, |  | ||||||
|                                       { .name = NULL }}, |  | ||||||
|     .outputs = NULL, |     .outputs = NULL, | ||||||
| }; | }; | ||||||
|   | |||||||
| @@ -93,6 +93,26 @@ static int setdar_config_props(AVFilterLink *inlink) | |||||||
|     return 0; |     return 0; | ||||||
| } | } | ||||||
|  |  | ||||||
|  | static const AVFilterPad avfilter_vf_setdar_inputs[] = { | ||||||
|  |     { | ||||||
|  |         .name             = "default", | ||||||
|  |         .type             = AVMEDIA_TYPE_VIDEO, | ||||||
|  |         .config_props     = setdar_config_props, | ||||||
|  |         .get_video_buffer = ff_null_get_video_buffer, | ||||||
|  |         .start_frame      = start_frame, | ||||||
|  |         .end_frame        = ff_null_end_frame | ||||||
|  |     }, | ||||||
|  |     { NULL } | ||||||
|  | }; | ||||||
|  |  | ||||||
|  | static const AVFilterPad avfilter_vf_setdar_outputs[] = { | ||||||
|  |     { | ||||||
|  |         .name = "default", | ||||||
|  |         .type = AVMEDIA_TYPE_VIDEO, | ||||||
|  |     }, | ||||||
|  |     { NULL } | ||||||
|  | }; | ||||||
|  |  | ||||||
| AVFilter avfilter_vf_setdar = { | AVFilter avfilter_vf_setdar = { | ||||||
|     .name      = "setdar", |     .name      = "setdar", | ||||||
|     .description = NULL_IF_CONFIG_SMALL("Set the frame display aspect ratio."), |     .description = NULL_IF_CONFIG_SMALL("Set the frame display aspect ratio."), | ||||||
| @@ -101,17 +121,9 @@ AVFilter avfilter_vf_setdar = { | |||||||
|  |  | ||||||
|     .priv_size = sizeof(AspectContext), |     .priv_size = sizeof(AspectContext), | ||||||
|  |  | ||||||
|     .inputs    = (const AVFilterPad[]) {{ .name             = "default", |     .inputs    = avfilter_vf_setdar_inputs, | ||||||
|                                           .type             = AVMEDIA_TYPE_VIDEO, |  | ||||||
|                                           .config_props     = setdar_config_props, |  | ||||||
|                                           .get_video_buffer = ff_null_get_video_buffer, |  | ||||||
|                                           .start_frame      = start_frame, |  | ||||||
|                                           .end_frame        = ff_null_end_frame }, |  | ||||||
|                                         { .name = NULL}}, |  | ||||||
|  |  | ||||||
|     .outputs   = (const AVFilterPad[]) {{ .name             = "default", |     .outputs   = avfilter_vf_setdar_outputs, | ||||||
|                                           .type             = AVMEDIA_TYPE_VIDEO, }, |  | ||||||
|                                         { .name = NULL}}, |  | ||||||
| }; | }; | ||||||
| #endif /* CONFIG_SETDAR_FILTER */ | #endif /* CONFIG_SETDAR_FILTER */ | ||||||
|  |  | ||||||
| @@ -126,6 +138,26 @@ static int setsar_config_props(AVFilterLink *inlink) | |||||||
|     return 0; |     return 0; | ||||||
| } | } | ||||||
|  |  | ||||||
|  | static const AVFilterPad avfilter_vf_setsar_inputs[] = { | ||||||
|  |     { | ||||||
|  |         .name             = "default", | ||||||
|  |         .type             = AVMEDIA_TYPE_VIDEO, | ||||||
|  |         .config_props     = setsar_config_props, | ||||||
|  |         .get_video_buffer = ff_null_get_video_buffer, | ||||||
|  |         .start_frame      = start_frame, | ||||||
|  |         .end_frame        = ff_null_end_frame | ||||||
|  |     }, | ||||||
|  |     { NULL } | ||||||
|  | }; | ||||||
|  |  | ||||||
|  | static const AVFilterPad avfilter_vf_setsar_outputs[] = { | ||||||
|  |     { | ||||||
|  |         .name = "default", | ||||||
|  |         .type = AVMEDIA_TYPE_VIDEO, | ||||||
|  |     }, | ||||||
|  |     { NULL } | ||||||
|  | }; | ||||||
|  |  | ||||||
| AVFilter avfilter_vf_setsar = { | AVFilter avfilter_vf_setsar = { | ||||||
|     .name      = "setsar", |     .name      = "setsar", | ||||||
|     .description = NULL_IF_CONFIG_SMALL("Set the pixel sample aspect ratio."), |     .description = NULL_IF_CONFIG_SMALL("Set the pixel sample aspect ratio."), | ||||||
| @@ -134,16 +166,8 @@ AVFilter avfilter_vf_setsar = { | |||||||
|  |  | ||||||
|     .priv_size = sizeof(AspectContext), |     .priv_size = sizeof(AspectContext), | ||||||
|  |  | ||||||
|     .inputs    = (const AVFilterPad[]) {{ .name             = "default", |     .inputs    = avfilter_vf_setsar_inputs, | ||||||
|                                           .type             = AVMEDIA_TYPE_VIDEO, |  | ||||||
|                                           .config_props     = setsar_config_props, |  | ||||||
|                                           .get_video_buffer = ff_null_get_video_buffer, |  | ||||||
|                                           .start_frame      = start_frame, |  | ||||||
|                                           .end_frame        = ff_null_end_frame }, |  | ||||||
|                                         { .name = NULL}}, |  | ||||||
|  |  | ||||||
|     .outputs   = (const AVFilterPad[]) {{ .name             = "default", |     .outputs   = avfilter_vf_setsar_outputs, | ||||||
|                                           .type             = AVMEDIA_TYPE_VIDEO, }, |  | ||||||
|                                         { .name = NULL}}, |  | ||||||
| }; | }; | ||||||
| #endif /* CONFIG_SETSAR_FILTER */ | #endif /* CONFIG_SETSAR_FILTER */ | ||||||
|   | |||||||
| @@ -113,6 +113,26 @@ static int end_frame(AVFilterLink *inlink) | |||||||
|     return ff_end_frame(inlink->dst->outputs[0]); |     return ff_end_frame(inlink->dst->outputs[0]); | ||||||
| } | } | ||||||
|  |  | ||||||
|  | static const AVFilterPad avfilter_vf_blackframe_inputs[] = { | ||||||
|  |     { | ||||||
|  |         .name             = "default", | ||||||
|  |         .type             = AVMEDIA_TYPE_VIDEO, | ||||||
|  |         .draw_slice       = draw_slice, | ||||||
|  |         .get_video_buffer = ff_null_get_video_buffer, | ||||||
|  |         .start_frame      = ff_null_start_frame, | ||||||
|  |         .end_frame        = end_frame, | ||||||
|  |     }, | ||||||
|  |     { NULL } | ||||||
|  | }; | ||||||
|  |  | ||||||
|  | static const AVFilterPad avfilter_vf_blackframe_outputs[] = { | ||||||
|  |     { | ||||||
|  |         .name = "default", | ||||||
|  |         .type = AVMEDIA_TYPE_VIDEO | ||||||
|  |     }, | ||||||
|  |     { NULL } | ||||||
|  | }; | ||||||
|  |  | ||||||
| AVFilter avfilter_vf_blackframe = { | AVFilter avfilter_vf_blackframe = { | ||||||
|     .name        = "blackframe", |     .name        = "blackframe", | ||||||
|     .description = NULL_IF_CONFIG_SMALL("Detect frames that are (almost) black."), |     .description = NULL_IF_CONFIG_SMALL("Detect frames that are (almost) black."), | ||||||
| @@ -122,15 +142,7 @@ AVFilter avfilter_vf_blackframe = { | |||||||
|  |  | ||||||
|     .query_formats = query_formats, |     .query_formats = query_formats, | ||||||
|  |  | ||||||
|     .inputs    = (const AVFilterPad[]) {{ .name = "default", |     .inputs    = avfilter_vf_blackframe_inputs, | ||||||
|                                           .type             = AVMEDIA_TYPE_VIDEO, |  | ||||||
|                                           .draw_slice       = draw_slice, |  | ||||||
|                                           .get_video_buffer = ff_null_get_video_buffer, |  | ||||||
|                                           .start_frame      = ff_null_start_frame, |  | ||||||
|                                           .end_frame        = end_frame, }, |  | ||||||
|                                         { .name = NULL}}, |  | ||||||
|  |  | ||||||
|     .outputs   = (const AVFilterPad[]) {{ .name             = "default", |     .outputs   = avfilter_vf_blackframe_outputs, | ||||||
|                                           .type             = AVMEDIA_TYPE_VIDEO }, |  | ||||||
|                                         { .name = NULL}}, |  | ||||||
| }; | }; | ||||||
|   | |||||||
| @@ -334,6 +334,25 @@ static int draw_slice(AVFilterLink *inlink, int y0, int h0, int slice_dir) | |||||||
|     return ff_draw_slice(outlink, y0, h0, slice_dir); |     return ff_draw_slice(outlink, y0, h0, slice_dir); | ||||||
| } | } | ||||||
|  |  | ||||||
|  | static const AVFilterPad avfilter_vf_boxblur_inputs[] = { | ||||||
|  |     { | ||||||
|  |         .name         = "default", | ||||||
|  |         .type         = AVMEDIA_TYPE_VIDEO, | ||||||
|  |         .config_props = config_input, | ||||||
|  |         .draw_slice   = draw_slice, | ||||||
|  |         .min_perms    = AV_PERM_READ | ||||||
|  |     }, | ||||||
|  |     { NULL } | ||||||
|  | }; | ||||||
|  |  | ||||||
|  | static const AVFilterPad avfilter_vf_boxblur_outputs[] = { | ||||||
|  |     { | ||||||
|  |         .name = "default", | ||||||
|  |         .type = AVMEDIA_TYPE_VIDEO, | ||||||
|  |     }, | ||||||
|  |     { NULL } | ||||||
|  | }; | ||||||
|  |  | ||||||
| AVFilter avfilter_vf_boxblur = { | AVFilter avfilter_vf_boxblur = { | ||||||
|     .name          = "boxblur", |     .name          = "boxblur", | ||||||
|     .description   = NULL_IF_CONFIG_SMALL("Blur the input."), |     .description   = NULL_IF_CONFIG_SMALL("Blur the input."), | ||||||
| @@ -342,13 +361,6 @@ AVFilter avfilter_vf_boxblur = { | |||||||
|     .uninit        = uninit, |     .uninit        = uninit, | ||||||
|     .query_formats = query_formats, |     .query_formats = query_formats, | ||||||
|  |  | ||||||
|     .inputs    = (const AVFilterPad[]) {{ .name             = "default", |     .inputs    = avfilter_vf_boxblur_inputs, | ||||||
|                                           .type             = AVMEDIA_TYPE_VIDEO, |     .outputs   = avfilter_vf_boxblur_outputs, | ||||||
|                                           .config_props     = config_input, |  | ||||||
|                                           .draw_slice       = draw_slice, |  | ||||||
|                                           .min_perms        = AV_PERM_READ }, |  | ||||||
|                                         { .name = NULL}}, |  | ||||||
|     .outputs   = (const AVFilterPad[]) {{ .name             = "default", |  | ||||||
|                                           .type             = AVMEDIA_TYPE_VIDEO, }, |  | ||||||
|                                         { .name = NULL}}, |  | ||||||
| }; | }; | ||||||
|   | |||||||
| @@ -26,18 +26,30 @@ | |||||||
| #include "internal.h" | #include "internal.h" | ||||||
| #include "video.h" | #include "video.h" | ||||||
|  |  | ||||||
|  | static const AVFilterPad avfilter_vf_copy_inputs[] = { | ||||||
|  |     { | ||||||
|  |         .name             = "default", | ||||||
|  |         .type             = AVMEDIA_TYPE_VIDEO, | ||||||
|  |         .get_video_buffer = ff_null_get_video_buffer, | ||||||
|  |         .start_frame      = ff_null_start_frame, | ||||||
|  |         .end_frame        = ff_null_end_frame, | ||||||
|  |         .rej_perms        = ~0 | ||||||
|  |     }, | ||||||
|  |     { NULL } | ||||||
|  | }; | ||||||
|  |  | ||||||
|  | static const AVFilterPad avfilter_vf_copy_outputs[] = { | ||||||
|  |     { | ||||||
|  |         .name = "default", | ||||||
|  |         .type = AVMEDIA_TYPE_VIDEO, | ||||||
|  |     }, | ||||||
|  |     { NULL } | ||||||
|  | }; | ||||||
|  |  | ||||||
| AVFilter avfilter_vf_copy = { | AVFilter avfilter_vf_copy = { | ||||||
|     .name      = "copy", |     .name      = "copy", | ||||||
|     .description = NULL_IF_CONFIG_SMALL("Copy the input video unchanged to the output."), |     .description = NULL_IF_CONFIG_SMALL("Copy the input video unchanged to the output."), | ||||||
|  |  | ||||||
|     .inputs    = (const AVFilterPad[]) {{ .name             = "default", |     .inputs    = avfilter_vf_copy_inputs, | ||||||
|                                           .type             = AVMEDIA_TYPE_VIDEO, |     .outputs   = avfilter_vf_copy_outputs, | ||||||
|                                           .get_video_buffer = ff_null_get_video_buffer, |  | ||||||
|                                           .start_frame      = ff_null_start_frame, |  | ||||||
|                                           .end_frame        = ff_null_end_frame, |  | ||||||
|                                           .rej_perms        = ~0 }, |  | ||||||
|                                         { .name = NULL}}, |  | ||||||
|     .outputs   = (const AVFilterPad[]) {{ .name             = "default", |  | ||||||
|                                           .type             = AVMEDIA_TYPE_VIDEO, }, |  | ||||||
|                                         { .name = NULL}}, |  | ||||||
| }; | }; | ||||||
|   | |||||||
| @@ -326,6 +326,28 @@ static int end_frame(AVFilterLink *link) | |||||||
|     return ff_end_frame(link->dst->outputs[0]); |     return ff_end_frame(link->dst->outputs[0]); | ||||||
| } | } | ||||||
|  |  | ||||||
|  | static const AVFilterPad avfilter_vf_crop_inputs[] = { | ||||||
|  |     { | ||||||
|  |         .name             = "default", | ||||||
|  |         .type             = AVMEDIA_TYPE_VIDEO, | ||||||
|  |         .start_frame      = start_frame, | ||||||
|  |         .draw_slice       = draw_slice, | ||||||
|  |         .end_frame        = end_frame, | ||||||
|  |         .get_video_buffer = ff_null_get_video_buffer, | ||||||
|  |         .config_props     = config_input, | ||||||
|  |     }, | ||||||
|  |     { NULL } | ||||||
|  | }; | ||||||
|  |  | ||||||
|  | static const AVFilterPad avfilter_vf_crop_outputs[] = { | ||||||
|  |     { | ||||||
|  |         .name         = "default", | ||||||
|  |         .type         = AVMEDIA_TYPE_VIDEO, | ||||||
|  |         .config_props = config_output, | ||||||
|  |     }, | ||||||
|  |     { NULL } | ||||||
|  | }; | ||||||
|  |  | ||||||
| AVFilter avfilter_vf_crop = { | AVFilter avfilter_vf_crop = { | ||||||
|     .name      = "crop", |     .name      = "crop", | ||||||
|     .description = NULL_IF_CONFIG_SMALL("Crop the input video to width:height:x:y."), |     .description = NULL_IF_CONFIG_SMALL("Crop the input video to width:height:x:y."), | ||||||
| @@ -336,16 +358,6 @@ AVFilter avfilter_vf_crop = { | |||||||
|     .init          = init, |     .init          = init, | ||||||
|     .uninit        = uninit, |     .uninit        = uninit, | ||||||
|  |  | ||||||
|     .inputs    = (const AVFilterPad[]) {{ .name             = "default", |     .inputs    = avfilter_vf_crop_inputs, | ||||||
|                                           .type             = AVMEDIA_TYPE_VIDEO, |     .outputs   = avfilter_vf_crop_outputs, | ||||||
|                                           .start_frame      = start_frame, |  | ||||||
|                                           .draw_slice       = draw_slice, |  | ||||||
|                                           .end_frame        = end_frame, |  | ||||||
|                                           .get_video_buffer = ff_null_get_video_buffer, |  | ||||||
|                                           .config_props     = config_input, }, |  | ||||||
|                                         { .name = NULL}}, |  | ||||||
|     .outputs   = (const AVFilterPad[]) {{ .name             = "default", |  | ||||||
|                                           .type             = AVMEDIA_TYPE_VIDEO, |  | ||||||
|                                           .config_props     = config_output, }, |  | ||||||
|                                         { .name = NULL}}, |  | ||||||
| }; | }; | ||||||
|   | |||||||
| @@ -197,6 +197,26 @@ static int end_frame(AVFilterLink *inlink) | |||||||
|     return ff_end_frame(inlink->dst->outputs[0]); |     return ff_end_frame(inlink->dst->outputs[0]); | ||||||
| } | } | ||||||
|  |  | ||||||
|  | static const AVFilterPad avfilter_vf_cropdetect_inputs[] = { | ||||||
|  |     { | ||||||
|  |         .name             = "default", | ||||||
|  |         .type             = AVMEDIA_TYPE_VIDEO, | ||||||
|  |         .config_props     = config_input, | ||||||
|  |         .get_video_buffer = ff_null_get_video_buffer, | ||||||
|  |         .start_frame      = ff_null_start_frame, | ||||||
|  |         .end_frame        = end_frame, | ||||||
|  |     }, | ||||||
|  |     { NULL } | ||||||
|  | }; | ||||||
|  |  | ||||||
|  | static const AVFilterPad avfilter_vf_cropdetect_outputs[] = { | ||||||
|  |     { | ||||||
|  |         .name = "default", | ||||||
|  |         .type = AVMEDIA_TYPE_VIDEO | ||||||
|  |     }, | ||||||
|  |     { NULL } | ||||||
|  | }; | ||||||
|  |  | ||||||
| AVFilter avfilter_vf_cropdetect = { | AVFilter avfilter_vf_cropdetect = { | ||||||
|     .name        = "cropdetect", |     .name        = "cropdetect", | ||||||
|     .description = NULL_IF_CONFIG_SMALL("Auto-detect crop size."), |     .description = NULL_IF_CONFIG_SMALL("Auto-detect crop size."), | ||||||
| @@ -206,15 +226,7 @@ AVFilter avfilter_vf_cropdetect = { | |||||||
|  |  | ||||||
|     .query_formats = query_formats, |     .query_formats = query_formats, | ||||||
|  |  | ||||||
|     .inputs    = (const AVFilterPad[]) {{ .name = "default", |     .inputs    = avfilter_vf_cropdetect_inputs, | ||||||
|                                           .type             = AVMEDIA_TYPE_VIDEO, |  | ||||||
|                                           .config_props     = config_input, |  | ||||||
|                                           .get_video_buffer = ff_null_get_video_buffer, |  | ||||||
|                                           .start_frame      = ff_null_start_frame, |  | ||||||
|                                           .end_frame        = end_frame, }, |  | ||||||
|                                         { .name = NULL}}, |  | ||||||
|  |  | ||||||
|     .outputs   = (const AVFilterPad[]) {{ .name             = "default", |     .outputs   = avfilter_vf_cropdetect_outputs, | ||||||
|                                           .type             = AVMEDIA_TYPE_VIDEO }, |  | ||||||
|                                         { .name = NULL}}, |  | ||||||
| }; | }; | ||||||
|   | |||||||
| @@ -251,6 +251,28 @@ static int end_frame(AVFilterLink *inlink) | |||||||
|     return 0; |     return 0; | ||||||
| } | } | ||||||
|  |  | ||||||
|  | static const AVFilterPad avfilter_vf_delogo_inputs[] = { | ||||||
|  |     { | ||||||
|  |         .name             = "default", | ||||||
|  |         .type             = AVMEDIA_TYPE_VIDEO, | ||||||
|  |         .get_video_buffer = ff_null_get_video_buffer, | ||||||
|  |         .start_frame      = ff_inplace_start_frame, | ||||||
|  |         .draw_slice       = null_draw_slice, | ||||||
|  |         .end_frame        = end_frame, | ||||||
|  |         .min_perms        = AV_PERM_WRITE | AV_PERM_READ, | ||||||
|  |         .rej_perms        = AV_PERM_PRESERVE | ||||||
|  |     }, | ||||||
|  |     { NULL } | ||||||
|  | }; | ||||||
|  |  | ||||||
|  | static const AVFilterPad avfilter_vf_delogo_outputs[] = { | ||||||
|  |     { | ||||||
|  |         .name = "default", | ||||||
|  |         .type = AVMEDIA_TYPE_VIDEO, | ||||||
|  |     }, | ||||||
|  |     { NULL } | ||||||
|  | }; | ||||||
|  |  | ||||||
| AVFilter avfilter_vf_delogo = { | AVFilter avfilter_vf_delogo = { | ||||||
|     .name          = "delogo", |     .name          = "delogo", | ||||||
|     .description   = NULL_IF_CONFIG_SMALL("Remove logo from input video."), |     .description   = NULL_IF_CONFIG_SMALL("Remove logo from input video."), | ||||||
| @@ -258,16 +280,6 @@ AVFilter avfilter_vf_delogo = { | |||||||
|     .init          = init, |     .init          = init, | ||||||
|     .query_formats = query_formats, |     .query_formats = query_formats, | ||||||
|  |  | ||||||
|     .inputs    = (const AVFilterPad[]) {{ .name             = "default", |     .inputs    = avfilter_vf_delogo_inputs, | ||||||
|                                           .type             = AVMEDIA_TYPE_VIDEO, |     .outputs   = avfilter_vf_delogo_outputs, | ||||||
|                                           .get_video_buffer = ff_null_get_video_buffer, |  | ||||||
|                                           .start_frame      = ff_inplace_start_frame, |  | ||||||
|                                           .draw_slice       = null_draw_slice, |  | ||||||
|                                           .end_frame        = end_frame, |  | ||||||
|                                           .min_perms        = AV_PERM_WRITE | AV_PERM_READ, |  | ||||||
|                                           .rej_perms        = AV_PERM_PRESERVE }, |  | ||||||
|                                         { .name = NULL}}, |  | ||||||
|     .outputs   = (const AVFilterPad[]) {{ .name             = "default", |  | ||||||
|                                           .type             = AVMEDIA_TYPE_VIDEO, }, |  | ||||||
|                                         { .name = NULL}}, |  | ||||||
| }; | }; | ||||||
|   | |||||||
| @@ -124,6 +124,29 @@ static int draw_slice(AVFilterLink *inlink, int y0, int h, int slice_dir) | |||||||
|     return ff_draw_slice(inlink->dst->outputs[0], y0, h, 1); |     return ff_draw_slice(inlink->dst->outputs[0], y0, h, 1); | ||||||
| } | } | ||||||
|  |  | ||||||
|  | static const AVFilterPad avfilter_vf_drawbox_inputs[] = { | ||||||
|  |     { | ||||||
|  |         .name             = "default", | ||||||
|  |         .type             = AVMEDIA_TYPE_VIDEO, | ||||||
|  |         .config_props     = config_input, | ||||||
|  |         .get_video_buffer = ff_null_get_video_buffer, | ||||||
|  |         .start_frame      = ff_null_start_frame, | ||||||
|  |         .draw_slice       = draw_slice, | ||||||
|  |         .end_frame        = ff_null_end_frame, | ||||||
|  |         .min_perms        = AV_PERM_WRITE | AV_PERM_READ, | ||||||
|  |         .rej_perms        = AV_PERM_PRESERVE | ||||||
|  |     }, | ||||||
|  |     { NULL } | ||||||
|  | }; | ||||||
|  |  | ||||||
|  | static const AVFilterPad avfilter_vf_drawbox_outputs[] = { | ||||||
|  |     { | ||||||
|  |         .name = "default", | ||||||
|  |         .type = AVMEDIA_TYPE_VIDEO, | ||||||
|  |     }, | ||||||
|  |     { NULL } | ||||||
|  | }; | ||||||
|  |  | ||||||
| AVFilter avfilter_vf_drawbox = { | AVFilter avfilter_vf_drawbox = { | ||||||
|     .name      = "drawbox", |     .name      = "drawbox", | ||||||
|     .description = NULL_IF_CONFIG_SMALL("Draw a colored box on the input video."), |     .description = NULL_IF_CONFIG_SMALL("Draw a colored box on the input video."), | ||||||
| @@ -131,17 +154,6 @@ AVFilter avfilter_vf_drawbox = { | |||||||
|     .init      = init, |     .init      = init, | ||||||
|  |  | ||||||
|     .query_formats   = query_formats, |     .query_formats   = query_formats, | ||||||
|     .inputs    = (const AVFilterPad[]) {{ .name             = "default", |     .inputs    = avfilter_vf_drawbox_inputs, | ||||||
|                                           .type             = AVMEDIA_TYPE_VIDEO, |     .outputs   = avfilter_vf_drawbox_outputs, | ||||||
|                                           .config_props     = config_input, |  | ||||||
|                                           .get_video_buffer = ff_null_get_video_buffer, |  | ||||||
|                                           .start_frame      = ff_null_start_frame, |  | ||||||
|                                           .draw_slice       = draw_slice, |  | ||||||
|                                           .end_frame        = ff_null_end_frame, |  | ||||||
|                                           .min_perms        = AV_PERM_WRITE | AV_PERM_READ, |  | ||||||
|                                           .rej_perms        = AV_PERM_PRESERVE }, |  | ||||||
|                                         { .name = NULL}}, |  | ||||||
|     .outputs   = (const AVFilterPad[]) {{ .name             = "default", |  | ||||||
|                                           .type             = AVMEDIA_TYPE_VIDEO, }, |  | ||||||
|                                         { .name = NULL}}, |  | ||||||
| }; | }; | ||||||
|   | |||||||
| @@ -879,6 +879,30 @@ static int end_frame(AVFilterLink *inlink) | |||||||
|     return 0; |     return 0; | ||||||
| } | } | ||||||
|  |  | ||||||
|  | static const AVFilterPad avfilter_vf_drawtext_inputs[] = { | ||||||
|  |     { | ||||||
|  |         .name             = "default", | ||||||
|  |         .type             = AVMEDIA_TYPE_VIDEO, | ||||||
|  |         .get_video_buffer = ff_null_get_video_buffer, | ||||||
|  |         .start_frame      = start_frame, | ||||||
|  |         .draw_slice       = null_draw_slice, | ||||||
|  |         .end_frame        = end_frame, | ||||||
|  |         .config_props     = config_input, | ||||||
|  |         .min_perms        = AV_PERM_WRITE | | ||||||
|  |                             AV_PERM_READ, | ||||||
|  |         .rej_perms = AV_PERM_PRESERVE | ||||||
|  |     }, | ||||||
|  |     { NULL } | ||||||
|  | }; | ||||||
|  |  | ||||||
|  | static const AVFilterPad avfilter_vf_drawtext_outputs[] = { | ||||||
|  |     { | ||||||
|  |         .name = "default", | ||||||
|  |         .type = AVMEDIA_TYPE_VIDEO, | ||||||
|  |     }, | ||||||
|  |     { NULL } | ||||||
|  | }; | ||||||
|  |  | ||||||
| AVFilter avfilter_vf_drawtext = { | AVFilter avfilter_vf_drawtext = { | ||||||
|     .name          = "drawtext", |     .name          = "drawtext", | ||||||
|     .description   = NULL_IF_CONFIG_SMALL("Draw text on top of video frames using libfreetype library."), |     .description   = NULL_IF_CONFIG_SMALL("Draw text on top of video frames using libfreetype library."), | ||||||
| @@ -887,18 +911,6 @@ AVFilter avfilter_vf_drawtext = { | |||||||
|     .uninit        = uninit, |     .uninit        = uninit, | ||||||
|     .query_formats = query_formats, |     .query_formats = query_formats, | ||||||
|  |  | ||||||
|     .inputs    = (const AVFilterPad[]) {{ .name             = "default", |     .inputs    = avfilter_vf_drawtext_inputs, | ||||||
|                                           .type             = AVMEDIA_TYPE_VIDEO, |     .outputs   = avfilter_vf_drawtext_outputs, | ||||||
|                                           .get_video_buffer = ff_null_get_video_buffer, |  | ||||||
|                                           .start_frame      = start_frame, |  | ||||||
|                                           .draw_slice       = null_draw_slice, |  | ||||||
|                                           .end_frame        = end_frame, |  | ||||||
|                                           .config_props     = config_input, |  | ||||||
|                                           .min_perms        = AV_PERM_WRITE | |  | ||||||
|                                                               AV_PERM_READ, |  | ||||||
|                                           .rej_perms        = AV_PERM_PRESERVE }, |  | ||||||
|                                         { .name = NULL}}, |  | ||||||
|     .outputs   = (const AVFilterPad[]) {{ .name             = "default", |  | ||||||
|                                           .type             = AVMEDIA_TYPE_VIDEO, }, |  | ||||||
|                                         { .name = NULL}}, |  | ||||||
| }; | }; | ||||||
|   | |||||||
| @@ -154,6 +154,29 @@ static int end_frame(AVFilterLink *inlink) | |||||||
|     return ret; |     return ret; | ||||||
| } | } | ||||||
|  |  | ||||||
|  | static const AVFilterPad avfilter_vf_fade_inputs[] = { | ||||||
|  |     { | ||||||
|  |         .name             = "default", | ||||||
|  |         .type             = AVMEDIA_TYPE_VIDEO, | ||||||
|  |         .config_props     = config_props, | ||||||
|  |         .get_video_buffer = ff_null_get_video_buffer, | ||||||
|  |         .start_frame      = ff_null_start_frame, | ||||||
|  |         .draw_slice       = draw_slice, | ||||||
|  |         .end_frame        = end_frame, | ||||||
|  |         .min_perms        = AV_PERM_READ | AV_PERM_WRITE, | ||||||
|  |         .rej_perms        = AV_PERM_PRESERVE, | ||||||
|  |     }, | ||||||
|  |     { NULL } | ||||||
|  | }; | ||||||
|  |  | ||||||
|  | static const AVFilterPad avfilter_vf_fade_outputs[] = { | ||||||
|  |     { | ||||||
|  |         .name = "default", | ||||||
|  |         .type = AVMEDIA_TYPE_VIDEO, | ||||||
|  |     }, | ||||||
|  |     { NULL } | ||||||
|  | }; | ||||||
|  |  | ||||||
| AVFilter avfilter_vf_fade = { | AVFilter avfilter_vf_fade = { | ||||||
|     .name          = "fade", |     .name          = "fade", | ||||||
|     .description   = NULL_IF_CONFIG_SMALL("Fade in/out input video"), |     .description   = NULL_IF_CONFIG_SMALL("Fade in/out input video"), | ||||||
| @@ -161,17 +184,6 @@ AVFilter avfilter_vf_fade = { | |||||||
|     .priv_size     = sizeof(FadeContext), |     .priv_size     = sizeof(FadeContext), | ||||||
|     .query_formats = query_formats, |     .query_formats = query_formats, | ||||||
|  |  | ||||||
|     .inputs    = (const AVFilterPad[]) {{ .name            = "default", |     .inputs    = avfilter_vf_fade_inputs, | ||||||
|                                           .type            = AVMEDIA_TYPE_VIDEO, |     .outputs   = avfilter_vf_fade_outputs, | ||||||
|                                           .config_props    = config_props, |  | ||||||
|                                           .get_video_buffer = ff_null_get_video_buffer, |  | ||||||
|                                           .start_frame      = ff_null_start_frame, |  | ||||||
|                                           .draw_slice      = draw_slice, |  | ||||||
|                                           .end_frame       = end_frame, |  | ||||||
|                                           .min_perms       = AV_PERM_READ | AV_PERM_WRITE, |  | ||||||
|                                           .rej_perms       = AV_PERM_PRESERVE, }, |  | ||||||
|                                         { .name = NULL}}, |  | ||||||
|     .outputs   = (const AVFilterPad[]) {{ .name            = "default", |  | ||||||
|                                           .type            = AVMEDIA_TYPE_VIDEO, }, |  | ||||||
|                                         { .name = NULL}}, |  | ||||||
| }; | }; | ||||||
|   | |||||||
| @@ -234,23 +234,35 @@ static int end_frame(AVFilterLink *inlink) | |||||||
|     return ff_end_frame(outlink); |     return ff_end_frame(outlink); | ||||||
| } | } | ||||||
|  |  | ||||||
|  | static const AVFilterPad avfilter_vf_fieldorder_inputs[] = { | ||||||
|  |     { | ||||||
|  |         .name             = "default", | ||||||
|  |         .type             = AVMEDIA_TYPE_VIDEO, | ||||||
|  |         .config_props     = config_input, | ||||||
|  |         .start_frame      = start_frame, | ||||||
|  |         .get_video_buffer = get_video_buffer, | ||||||
|  |         .draw_slice       = draw_slice, | ||||||
|  |         .end_frame        = end_frame, | ||||||
|  |         .min_perms        = AV_PERM_READ, | ||||||
|  |         .rej_perms        = AV_PERM_REUSE2 | AV_PERM_PRESERVE, | ||||||
|  |     }, | ||||||
|  |     { NULL } | ||||||
|  | }; | ||||||
|  |  | ||||||
|  | static const AVFilterPad avfilter_vf_fieldorder_outputs[] = { | ||||||
|  |     { | ||||||
|  |         .name = "default", | ||||||
|  |         .type = AVMEDIA_TYPE_VIDEO, | ||||||
|  |     }, | ||||||
|  |     { NULL } | ||||||
|  | }; | ||||||
|  |  | ||||||
| AVFilter avfilter_vf_fieldorder = { | AVFilter avfilter_vf_fieldorder = { | ||||||
|     .name          = "fieldorder", |     .name          = "fieldorder", | ||||||
|     .description   = NULL_IF_CONFIG_SMALL("Set the field order."), |     .description   = NULL_IF_CONFIG_SMALL("Set the field order."), | ||||||
|     .init          = init, |     .init          = init, | ||||||
|     .priv_size     = sizeof(FieldOrderContext), |     .priv_size     = sizeof(FieldOrderContext), | ||||||
|     .query_formats = query_formats, |     .query_formats = query_formats, | ||||||
|     .inputs        = (const AVFilterPad[]) {{ .name             = "default", |     .inputs        = avfilter_vf_fieldorder_inputs, | ||||||
|                                               .type             = AVMEDIA_TYPE_VIDEO, |     .outputs       = avfilter_vf_fieldorder_outputs, | ||||||
|                                               .config_props     = config_input, |  | ||||||
|                                               .start_frame      = start_frame, |  | ||||||
|                                               .get_video_buffer = get_video_buffer, |  | ||||||
|                                               .draw_slice       = draw_slice, |  | ||||||
|                                               .end_frame        = end_frame, |  | ||||||
|                                               .min_perms        = AV_PERM_READ, |  | ||||||
|                                               .rej_perms        = AV_PERM_REUSE2|AV_PERM_PRESERVE,}, |  | ||||||
|                                             { .name = NULL}}, |  | ||||||
|     .outputs       = (const AVFilterPad[]) {{ .name             = "default", |  | ||||||
|                                               .type             = AVMEDIA_TYPE_VIDEO, }, |  | ||||||
|                                             { .name = NULL}}, |  | ||||||
| }; | }; | ||||||
|   | |||||||
| @@ -99,6 +99,26 @@ static int query_formats_format(AVFilterContext *ctx) | |||||||
|     return 0; |     return 0; | ||||||
| } | } | ||||||
|  |  | ||||||
|  | static const AVFilterPad avfilter_vf_format_inputs[] = { | ||||||
|  |     { | ||||||
|  |         .name             = "default", | ||||||
|  |         .type             = AVMEDIA_TYPE_VIDEO, | ||||||
|  |         .get_video_buffer = ff_null_get_video_buffer, | ||||||
|  |         .start_frame      = ff_null_start_frame, | ||||||
|  |         .draw_slice       = ff_null_draw_slice, | ||||||
|  |         .end_frame        = ff_null_end_frame, | ||||||
|  |     }, | ||||||
|  |     { NULL } | ||||||
|  | }; | ||||||
|  |  | ||||||
|  | static const AVFilterPad avfilter_vf_format_outputs[] = { | ||||||
|  |     { | ||||||
|  |         .name = "default", | ||||||
|  |         .type = AVMEDIA_TYPE_VIDEO | ||||||
|  |     }, | ||||||
|  |     { NULL } | ||||||
|  | }; | ||||||
|  |  | ||||||
| AVFilter avfilter_vf_format = { | AVFilter avfilter_vf_format = { | ||||||
|     .name      = "format", |     .name      = "format", | ||||||
|     .description = NULL_IF_CONFIG_SMALL("Convert the input video to one of the specified pixel formats."), |     .description = NULL_IF_CONFIG_SMALL("Convert the input video to one of the specified pixel formats."), | ||||||
| @@ -109,16 +129,8 @@ AVFilter avfilter_vf_format = { | |||||||
|  |  | ||||||
|     .priv_size = sizeof(FormatContext), |     .priv_size = sizeof(FormatContext), | ||||||
|  |  | ||||||
|     .inputs    = (const AVFilterPad[]) {{ .name            = "default", |     .inputs    = avfilter_vf_format_inputs, | ||||||
|                                           .type            = AVMEDIA_TYPE_VIDEO, |     .outputs   = avfilter_vf_format_outputs, | ||||||
|                                           .get_video_buffer= ff_null_get_video_buffer, |  | ||||||
|                                           .start_frame     = ff_null_start_frame, |  | ||||||
|                                           .draw_slice      = ff_null_draw_slice, |  | ||||||
|                                           .end_frame       = ff_null_end_frame, }, |  | ||||||
|                                         { .name = NULL}}, |  | ||||||
|     .outputs   = (const AVFilterPad[]) {{ .name            = "default", |  | ||||||
|                                           .type            = AVMEDIA_TYPE_VIDEO }, |  | ||||||
|                                         { .name = NULL}}, |  | ||||||
| }; | }; | ||||||
| #endif /* CONFIG_FORMAT_FILTER */ | #endif /* CONFIG_FORMAT_FILTER */ | ||||||
|  |  | ||||||
| @@ -129,6 +141,26 @@ static int query_formats_noformat(AVFilterContext *ctx) | |||||||
|     return 0; |     return 0; | ||||||
| } | } | ||||||
|  |  | ||||||
|  | static const AVFilterPad avfilter_vf_noformat_inputs[] = { | ||||||
|  |     { | ||||||
|  |         .name             = "default", | ||||||
|  |         .type             = AVMEDIA_TYPE_VIDEO, | ||||||
|  |         .get_video_buffer = ff_null_get_video_buffer, | ||||||
|  |         .start_frame      = ff_null_start_frame, | ||||||
|  |         .draw_slice       = ff_null_draw_slice, | ||||||
|  |         .end_frame        = ff_null_end_frame, | ||||||
|  |     }, | ||||||
|  |     { NULL } | ||||||
|  | }; | ||||||
|  |  | ||||||
|  | static const AVFilterPad avfilter_vf_noformat_outputs[] = { | ||||||
|  |     { | ||||||
|  |         .name = "default", | ||||||
|  |         .type = AVMEDIA_TYPE_VIDEO | ||||||
|  |     }, | ||||||
|  |     { NULL } | ||||||
|  | }; | ||||||
|  |  | ||||||
| AVFilter avfilter_vf_noformat = { | AVFilter avfilter_vf_noformat = { | ||||||
|     .name      = "noformat", |     .name      = "noformat", | ||||||
|     .description = NULL_IF_CONFIG_SMALL("Force libavfilter not to use any of the specified pixel formats for the input to the next filter."), |     .description = NULL_IF_CONFIG_SMALL("Force libavfilter not to use any of the specified pixel formats for the input to the next filter."), | ||||||
| @@ -139,15 +171,7 @@ AVFilter avfilter_vf_noformat = { | |||||||
|  |  | ||||||
|     .priv_size = sizeof(FormatContext), |     .priv_size = sizeof(FormatContext), | ||||||
|  |  | ||||||
|     .inputs    = (const AVFilterPad[]) {{ .name            = "default", |     .inputs    = avfilter_vf_noformat_inputs, | ||||||
|                                           .type            = AVMEDIA_TYPE_VIDEO, |     .outputs   = avfilter_vf_noformat_outputs, | ||||||
|                                           .get_video_buffer= ff_null_get_video_buffer, |  | ||||||
|                                           .start_frame     = ff_null_start_frame, |  | ||||||
|                                           .draw_slice      = ff_null_draw_slice, |  | ||||||
|                                           .end_frame       = ff_null_end_frame, }, |  | ||||||
|                                         { .name = NULL}}, |  | ||||||
|     .outputs   = (const AVFilterPad[]) {{ .name            = "default", |  | ||||||
|                                           .type            = AVMEDIA_TYPE_VIDEO }, |  | ||||||
|                                         { .name = NULL}}, |  | ||||||
| }; | }; | ||||||
| #endif /* CONFIG_NOFORMAT_FILTER */ | #endif /* CONFIG_NOFORMAT_FILTER */ | ||||||
|   | |||||||
| @@ -278,6 +278,27 @@ static int null_draw_slice(AVFilterLink *link, int y, int h, int slice_dir) | |||||||
|     return 0; |     return 0; | ||||||
| } | } | ||||||
|  |  | ||||||
|  | static const AVFilterPad avfilter_vf_fps_inputs[] = { | ||||||
|  |     { | ||||||
|  |         .name        = "default", | ||||||
|  |         .type        = AVMEDIA_TYPE_VIDEO, | ||||||
|  |         .start_frame = null_start_frame, | ||||||
|  |         .draw_slice  = null_draw_slice, | ||||||
|  |         .end_frame   = end_frame, | ||||||
|  |     }, | ||||||
|  |     { NULL } | ||||||
|  | }; | ||||||
|  |  | ||||||
|  | static const AVFilterPad avfilter_vf_fps_outputs[] = { | ||||||
|  |     { | ||||||
|  |         .name          = "default", | ||||||
|  |         .type          = AVMEDIA_TYPE_VIDEO, | ||||||
|  |         .request_frame = request_frame, | ||||||
|  |         .config_props  = config_props | ||||||
|  |     }, | ||||||
|  |     { NULL } | ||||||
|  | }; | ||||||
|  |  | ||||||
| AVFilter avfilter_vf_fps = { | AVFilter avfilter_vf_fps = { | ||||||
|     .name        = "fps", |     .name        = "fps", | ||||||
|     .description = NULL_IF_CONFIG_SMALL("Force constant framerate"), |     .description = NULL_IF_CONFIG_SMALL("Force constant framerate"), | ||||||
| @@ -287,15 +308,6 @@ AVFilter avfilter_vf_fps = { | |||||||
|  |  | ||||||
|     .priv_size = sizeof(FPSContext), |     .priv_size = sizeof(FPSContext), | ||||||
|  |  | ||||||
|     .inputs    = (const AVFilterPad[]) {{ .name            = "default", |     .inputs    = avfilter_vf_fps_inputs, | ||||||
|                                           .type            = AVMEDIA_TYPE_VIDEO, |     .outputs   = avfilter_vf_fps_outputs, | ||||||
|                                           .start_frame     = null_start_frame, |  | ||||||
|                                           .draw_slice      = null_draw_slice, |  | ||||||
|                                           .end_frame       = end_frame, }, |  | ||||||
|                                         { .name = NULL}}, |  | ||||||
|     .outputs   = (const AVFilterPad[]) {{ .name            = "default", |  | ||||||
|                                           .type            = AVMEDIA_TYPE_VIDEO, |  | ||||||
|                                           .request_frame   = request_frame, |  | ||||||
|                                           .config_props    = config_props}, |  | ||||||
|                                         { .name = NULL}}, |  | ||||||
| }; | }; | ||||||
|   | |||||||
| @@ -368,6 +368,26 @@ static int end_frame(AVFilterLink *inlink) | |||||||
|     return 0; |     return 0; | ||||||
| } | } | ||||||
|  |  | ||||||
|  | static const AVFilterPad avfilter_vf_frei0r_inputs[] = { | ||||||
|  |     { | ||||||
|  |         .name         = "default", | ||||||
|  |         .type         = AVMEDIA_TYPE_VIDEO, | ||||||
|  |         .draw_slice   = null_draw_slice, | ||||||
|  |         .config_props = config_input_props, | ||||||
|  |         .end_frame    = end_frame, | ||||||
|  |         .min_perms    = AV_PERM_READ | ||||||
|  |     }, | ||||||
|  |     { NULL } | ||||||
|  | }; | ||||||
|  |  | ||||||
|  | static const AVFilterPad avfilter_vf_frei0r_outputs[] = { | ||||||
|  |     { | ||||||
|  |         .name = "default", | ||||||
|  |         .type = AVMEDIA_TYPE_VIDEO, | ||||||
|  |     }, | ||||||
|  |     { NULL } | ||||||
|  | }; | ||||||
|  |  | ||||||
| AVFilter avfilter_vf_frei0r = { | AVFilter avfilter_vf_frei0r = { | ||||||
|     .name      = "frei0r", |     .name      = "frei0r", | ||||||
|     .description = NULL_IF_CONFIG_SMALL("Apply a frei0r effect."), |     .description = NULL_IF_CONFIG_SMALL("Apply a frei0r effect."), | ||||||
| @@ -378,17 +398,9 @@ AVFilter avfilter_vf_frei0r = { | |||||||
|  |  | ||||||
|     .priv_size = sizeof(Frei0rContext), |     .priv_size = sizeof(Frei0rContext), | ||||||
|  |  | ||||||
|     .inputs    = (const AVFilterPad[]) {{ .name             = "default", |     .inputs    = avfilter_vf_frei0r_inputs, | ||||||
|                                           .type             = AVMEDIA_TYPE_VIDEO, |  | ||||||
|                                           .draw_slice       = null_draw_slice, |  | ||||||
|                                           .config_props     = config_input_props, |  | ||||||
|                                           .end_frame        = end_frame, |  | ||||||
|                                           .min_perms        = AV_PERM_READ }, |  | ||||||
|                                         { .name = NULL}}, |  | ||||||
|  |  | ||||||
|     .outputs   = (const AVFilterPad[]) {{ .name             = "default", |     .outputs   = avfilter_vf_frei0r_outputs, | ||||||
|                                           .type             = AVMEDIA_TYPE_VIDEO, }, |  | ||||||
|                                         { .name = NULL}}, |  | ||||||
| }; | }; | ||||||
|  |  | ||||||
| static av_cold int source_init(AVFilterContext *ctx, const char *args) | static av_cold int source_init(AVFilterContext *ctx, const char *args) | ||||||
| @@ -478,6 +490,16 @@ fail: | |||||||
|     return ret; |     return ret; | ||||||
| } | } | ||||||
|  |  | ||||||
|  | static const AVFilterPad avfilter_vsrc_frei0r_src_outputs[] = { | ||||||
|  |     { | ||||||
|  |         .name          = "default", | ||||||
|  |         .type          = AVMEDIA_TYPE_VIDEO, | ||||||
|  |         .request_frame = source_request_frame, | ||||||
|  |         .config_props  = source_config_props | ||||||
|  |     }, | ||||||
|  |     { NULL } | ||||||
|  | }; | ||||||
|  |  | ||||||
| AVFilter avfilter_vsrc_frei0r_src = { | AVFilter avfilter_vsrc_frei0r_src = { | ||||||
|     .name        = "frei0r_src", |     .name        = "frei0r_src", | ||||||
|     .description = NULL_IF_CONFIG_SMALL("Generate a frei0r source."), |     .description = NULL_IF_CONFIG_SMALL("Generate a frei0r source."), | ||||||
| @@ -490,9 +512,5 @@ AVFilter avfilter_vsrc_frei0r_src = { | |||||||
|  |  | ||||||
|     .inputs    = NULL, |     .inputs    = NULL, | ||||||
|  |  | ||||||
|     .outputs   = (const AVFilterPad[]) {{ .name            = "default", |     .outputs   = avfilter_vsrc_frei0r_src_outputs, | ||||||
|                                           .type            = AVMEDIA_TYPE_VIDEO, |  | ||||||
|                                           .request_frame   = source_request_frame, |  | ||||||
|                                           .config_props    = source_config_props }, |  | ||||||
|                                         { .name = NULL}}, |  | ||||||
| }; | }; | ||||||
|   | |||||||
| @@ -216,6 +216,27 @@ static int end_frame(AVFilterLink *inlink) | |||||||
|     return 0; |     return 0; | ||||||
| } | } | ||||||
|  |  | ||||||
|  | static const AVFilterPad avfilter_vf_gradfun_inputs[] = { | ||||||
|  |     { | ||||||
|  |         .name         = "default", | ||||||
|  |         .type         = AVMEDIA_TYPE_VIDEO, | ||||||
|  |         .config_props = config_input, | ||||||
|  |         .start_frame  = ff_inplace_start_frame, | ||||||
|  |         .draw_slice   = null_draw_slice, | ||||||
|  |         .end_frame    = end_frame, | ||||||
|  |         .min_perms    = AV_PERM_READ, | ||||||
|  |     }, | ||||||
|  |     { NULL } | ||||||
|  | }; | ||||||
|  |  | ||||||
|  | static const AVFilterPad avfilter_vf_gradfun_outputs[] = { | ||||||
|  |     { | ||||||
|  |         .name = "default", | ||||||
|  |         .type = AVMEDIA_TYPE_VIDEO, | ||||||
|  |     }, | ||||||
|  |     { NULL } | ||||||
|  | }; | ||||||
|  |  | ||||||
| AVFilter avfilter_vf_gradfun = { | AVFilter avfilter_vf_gradfun = { | ||||||
|     .name          = "gradfun", |     .name          = "gradfun", | ||||||
|     .description   = NULL_IF_CONFIG_SMALL("Debands video quickly using gradients."), |     .description   = NULL_IF_CONFIG_SMALL("Debands video quickly using gradients."), | ||||||
| @@ -224,15 +245,6 @@ AVFilter avfilter_vf_gradfun = { | |||||||
|     .uninit        = uninit, |     .uninit        = uninit, | ||||||
|     .query_formats = query_formats, |     .query_formats = query_formats, | ||||||
|  |  | ||||||
|     .inputs    = (const AVFilterPad[]) {{ .name             = "default", |     .inputs    = avfilter_vf_gradfun_inputs, | ||||||
|                                           .type             = AVMEDIA_TYPE_VIDEO, |     .outputs   = avfilter_vf_gradfun_outputs, | ||||||
|                                           .config_props     = config_input, |  | ||||||
|                                           .start_frame      = ff_inplace_start_frame, |  | ||||||
|                                           .draw_slice       = null_draw_slice, |  | ||||||
|                                           .end_frame        = end_frame, |  | ||||||
|                                           .min_perms        = AV_PERM_READ, }, |  | ||||||
|                                         { .name = NULL}}, |  | ||||||
|     .outputs   = (const AVFilterPad[]) {{ .name             = "default", |  | ||||||
|                                           .type             = AVMEDIA_TYPE_VIDEO, }, |  | ||||||
|                                         { .name = NULL}}, |  | ||||||
| }; | }; | ||||||
|   | |||||||
| @@ -148,19 +148,31 @@ static int draw_slice(AVFilterLink *inlink, int y, int h, int slice_dir) | |||||||
|     return ff_draw_slice(inlink->dst->outputs[0], y, h, slice_dir); |     return ff_draw_slice(inlink->dst->outputs[0], y, h, slice_dir); | ||||||
| } | } | ||||||
|  |  | ||||||
|  | static const AVFilterPad avfilter_vf_hflip_inputs[] = { | ||||||
|  |     { | ||||||
|  |         .name         = "default", | ||||||
|  |         .type         = AVMEDIA_TYPE_VIDEO, | ||||||
|  |         .draw_slice   = draw_slice, | ||||||
|  |         .config_props = config_props, | ||||||
|  |         .min_perms    = AV_PERM_READ, | ||||||
|  |     }, | ||||||
|  |     { NULL } | ||||||
|  | }; | ||||||
|  |  | ||||||
|  | static const AVFilterPad avfilter_vf_hflip_outputs[] = { | ||||||
|  |     { | ||||||
|  |         .name = "default", | ||||||
|  |         .type = AVMEDIA_TYPE_VIDEO, | ||||||
|  |     }, | ||||||
|  |     { NULL } | ||||||
|  | }; | ||||||
|  |  | ||||||
| AVFilter avfilter_vf_hflip = { | AVFilter avfilter_vf_hflip = { | ||||||
|     .name      = "hflip", |     .name      = "hflip", | ||||||
|     .description = NULL_IF_CONFIG_SMALL("Horizontally flip the input video."), |     .description = NULL_IF_CONFIG_SMALL("Horizontally flip the input video."), | ||||||
|     .priv_size = sizeof(FlipContext), |     .priv_size = sizeof(FlipContext), | ||||||
|     .query_formats = query_formats, |     .query_formats = query_formats, | ||||||
|  |  | ||||||
|     .inputs    = (const AVFilterPad[]) {{ .name            = "default", |     .inputs    = avfilter_vf_hflip_inputs, | ||||||
|                                           .type            = AVMEDIA_TYPE_VIDEO, |     .outputs   = avfilter_vf_hflip_outputs, | ||||||
|                                           .draw_slice      = draw_slice, |  | ||||||
|                                           .config_props    = config_props, |  | ||||||
|                                           .min_perms       = AV_PERM_READ, }, |  | ||||||
|                                         { .name = NULL}}, |  | ||||||
|     .outputs   = (const AVFilterPad[]) {{ .name            = "default", |  | ||||||
|                                           .type            = AVMEDIA_TYPE_VIDEO, }, |  | ||||||
|                                         { .name = NULL}}, |  | ||||||
| }; | }; | ||||||
|   | |||||||
| @@ -349,6 +349,26 @@ static int end_frame(AVFilterLink *inlink) | |||||||
|     return 0; |     return 0; | ||||||
| } | } | ||||||
|  |  | ||||||
|  | static const AVFilterPad avfilter_vf_hqdn3d_inputs[] = { | ||||||
|  |     { | ||||||
|  |         .name         = "default", | ||||||
|  |         .type         = AVMEDIA_TYPE_VIDEO, | ||||||
|  |         .start_frame  = ff_inplace_start_frame, | ||||||
|  |         .draw_slice   = null_draw_slice, | ||||||
|  |         .config_props = config_input, | ||||||
|  |         .end_frame    = end_frame | ||||||
|  |     }, | ||||||
|  |     { NULL } | ||||||
|  | }; | ||||||
|  |  | ||||||
|  | static const AVFilterPad avfilter_vf_hqdn3d_outputs[] = { | ||||||
|  |     { | ||||||
|  |         .name = "default", | ||||||
|  |         .type = AVMEDIA_TYPE_VIDEO | ||||||
|  |     }, | ||||||
|  |     { NULL } | ||||||
|  | }; | ||||||
|  |  | ||||||
| AVFilter avfilter_vf_hqdn3d = { | AVFilter avfilter_vf_hqdn3d = { | ||||||
|     .name          = "hqdn3d", |     .name          = "hqdn3d", | ||||||
|     .description   = NULL_IF_CONFIG_SMALL("Apply a High Quality 3D Denoiser."), |     .description   = NULL_IF_CONFIG_SMALL("Apply a High Quality 3D Denoiser."), | ||||||
| @@ -358,15 +378,7 @@ AVFilter avfilter_vf_hqdn3d = { | |||||||
|     .uninit        = uninit, |     .uninit        = uninit, | ||||||
|     .query_formats = query_formats, |     .query_formats = query_formats, | ||||||
|  |  | ||||||
|     .inputs    = (const AVFilterPad[]) {{ .name             = "default", |     .inputs    = avfilter_vf_hqdn3d_inputs, | ||||||
|                                           .type             = AVMEDIA_TYPE_VIDEO, |  | ||||||
|                                           .start_frame      = ff_inplace_start_frame, |  | ||||||
|                                           .draw_slice       = null_draw_slice, |  | ||||||
|                                           .config_props     = config_input, |  | ||||||
|                                           .end_frame        = end_frame }, |  | ||||||
|                                         { .name = NULL}}, |  | ||||||
|  |  | ||||||
|     .outputs   = (const AVFilterPad[]) {{ .name             = "default", |     .outputs   = avfilter_vf_hqdn3d_outputs, | ||||||
|                                           .type             = AVMEDIA_TYPE_VIDEO }, |  | ||||||
|                                         { .name = NULL}}, |  | ||||||
| }; | }; | ||||||
|   | |||||||
| @@ -376,6 +376,25 @@ static int end_frame(AVFilterLink *inlink) | |||||||
|     return 0; |     return 0; | ||||||
| } | } | ||||||
|  |  | ||||||
|  | static const AVFilterPad avfilter_vf_ocv_inputs[] = { | ||||||
|  |     { | ||||||
|  |         .name       = "default", | ||||||
|  |         .type       = AVMEDIA_TYPE_VIDEO, | ||||||
|  |         .draw_slice = null_draw_slice, | ||||||
|  |         .end_frame  = end_frame, | ||||||
|  |         .min_perms  = AV_PERM_READ | ||||||
|  |     }, | ||||||
|  |     { NULL } | ||||||
|  | }; | ||||||
|  |  | ||||||
|  | static const AVFilterPad avfilter_vf_ocv_outputs[] = { | ||||||
|  |     { | ||||||
|  |         .name = "default", | ||||||
|  |         .type = AVMEDIA_TYPE_VIDEO, | ||||||
|  |     }, | ||||||
|  |     { NULL } | ||||||
|  | }; | ||||||
|  |  | ||||||
| AVFilter avfilter_vf_ocv = { | AVFilter avfilter_vf_ocv = { | ||||||
|     .name        = "ocv", |     .name        = "ocv", | ||||||
|     .description = NULL_IF_CONFIG_SMALL("Apply transform using libopencv."), |     .description = NULL_IF_CONFIG_SMALL("Apply transform using libopencv."), | ||||||
| @@ -386,14 +405,7 @@ AVFilter avfilter_vf_ocv = { | |||||||
|     .init = init, |     .init = init, | ||||||
|     .uninit = uninit, |     .uninit = uninit, | ||||||
|  |  | ||||||
|     .inputs    = (const AVFilterPad[]) {{ .name             = "default", |     .inputs    = avfilter_vf_ocv_inputs, | ||||||
|                                           .type             = AVMEDIA_TYPE_VIDEO, |  | ||||||
|                                           .draw_slice       = null_draw_slice, |  | ||||||
|                                           .end_frame        = end_frame, |  | ||||||
|                                           .min_perms        = AV_PERM_READ }, |  | ||||||
|                                         { .name = NULL}}, |  | ||||||
|  |  | ||||||
|     .outputs   = (const AVFilterPad[]) {{ .name             = "default", |     .outputs   = avfilter_vf_ocv_outputs, | ||||||
|                                           .type             = AVMEDIA_TYPE_VIDEO, }, |  | ||||||
|                                         { .name = NULL}}, |  | ||||||
| }; | }; | ||||||
|   | |||||||
| @@ -26,20 +26,32 @@ | |||||||
| #include "internal.h" | #include "internal.h" | ||||||
| #include "video.h" | #include "video.h" | ||||||
|  |  | ||||||
|  | static const AVFilterPad avfilter_vf_null_inputs[] = { | ||||||
|  |     { | ||||||
|  |         .name             = "default", | ||||||
|  |         .type             = AVMEDIA_TYPE_VIDEO, | ||||||
|  |         .get_video_buffer = ff_null_get_video_buffer, | ||||||
|  |         .start_frame      = ff_null_start_frame, | ||||||
|  |         .end_frame        = ff_null_end_frame | ||||||
|  |     }, | ||||||
|  |     { NULL } | ||||||
|  | }; | ||||||
|  |  | ||||||
|  | static const AVFilterPad avfilter_vf_null_outputs[] = { | ||||||
|  |     { | ||||||
|  |         .name = "default", | ||||||
|  |         .type = AVMEDIA_TYPE_VIDEO, | ||||||
|  |     }, | ||||||
|  |     { NULL } | ||||||
|  | }; | ||||||
|  |  | ||||||
| AVFilter avfilter_vf_null = { | AVFilter avfilter_vf_null = { | ||||||
|     .name      = "null", |     .name      = "null", | ||||||
|     .description = NULL_IF_CONFIG_SMALL("Pass the source unchanged to the output."), |     .description = NULL_IF_CONFIG_SMALL("Pass the source unchanged to the output."), | ||||||
|  |  | ||||||
|     .priv_size = 0, |     .priv_size = 0, | ||||||
|  |  | ||||||
|     .inputs    = (const AVFilterPad[]) {{ .name             = "default", |     .inputs    = avfilter_vf_null_inputs, | ||||||
|                                           .type             = AVMEDIA_TYPE_VIDEO, |  | ||||||
|                                           .get_video_buffer = ff_null_get_video_buffer, |  | ||||||
|                                           .start_frame      = ff_null_start_frame, |  | ||||||
|                                           .end_frame        = ff_null_end_frame }, |  | ||||||
|                                         { .name = NULL}}, |  | ||||||
|  |  | ||||||
|     .outputs   = (const AVFilterPad[]) {{ .name             = "default", |     .outputs   = avfilter_vf_null_outputs, | ||||||
|                                           .type             = AVMEDIA_TYPE_VIDEO, }, |  | ||||||
|                                         { .name = NULL}}, |  | ||||||
| }; | }; | ||||||
|   | |||||||
| @@ -374,6 +374,42 @@ static int request_frame(AVFilterLink *outlink) | |||||||
|     return output_frame(ctx); |     return output_frame(ctx); | ||||||
| } | } | ||||||
|  |  | ||||||
|  | static const AVFilterPad avfilter_vf_overlay_inputs[] = { | ||||||
|  |     { | ||||||
|  |         .name         = "main", | ||||||
|  |         .type         = AVMEDIA_TYPE_VIDEO, | ||||||
|  |         .start_frame  = null_start_frame, | ||||||
|  |         .config_props = config_input_main, | ||||||
|  |         .draw_slice   = null_draw_slice, | ||||||
|  |         .end_frame    = end_frame_main, | ||||||
|  |         .min_perms    = AV_PERM_READ, | ||||||
|  |         .rej_perms    = AV_PERM_REUSE2 | AV_PERM_PRESERVE, | ||||||
|  |         .needs_fifo   = 1, | ||||||
|  |     }, | ||||||
|  |     { | ||||||
|  |         .name         = "overlay", | ||||||
|  |         .type         = AVMEDIA_TYPE_VIDEO, | ||||||
|  |         .start_frame  = null_start_frame, | ||||||
|  |         .config_props = config_input_overlay, | ||||||
|  |         .draw_slice   = null_draw_slice, | ||||||
|  |         .end_frame    = end_frame_overlay, | ||||||
|  |         .min_perms    = AV_PERM_READ, | ||||||
|  |         .rej_perms    = AV_PERM_REUSE2, | ||||||
|  |         .needs_fifo   = 1, | ||||||
|  |     }, | ||||||
|  |     { NULL } | ||||||
|  | }; | ||||||
|  |  | ||||||
|  | static const AVFilterPad avfilter_vf_overlay_outputs[] = { | ||||||
|  |     { | ||||||
|  |         .name          = "default", | ||||||
|  |         .type          = AVMEDIA_TYPE_VIDEO, | ||||||
|  |         .config_props  = config_output, | ||||||
|  |         .request_frame = request_frame, | ||||||
|  |     }, | ||||||
|  |     { NULL } | ||||||
|  | }; | ||||||
|  |  | ||||||
| AVFilter avfilter_vf_overlay = { | AVFilter avfilter_vf_overlay = { | ||||||
|     .name      = "overlay", |     .name      = "overlay", | ||||||
|     .description = NULL_IF_CONFIG_SMALL("Overlay a video source on top of the input."), |     .description = NULL_IF_CONFIG_SMALL("Overlay a video source on top of the input."), | ||||||
| @@ -385,28 +421,6 @@ AVFilter avfilter_vf_overlay = { | |||||||
|  |  | ||||||
|     .query_formats = query_formats, |     .query_formats = query_formats, | ||||||
|  |  | ||||||
|     .inputs    = (const AVFilterPad[]) {{ .name            = "main", |     .inputs    = avfilter_vf_overlay_inputs, | ||||||
|                                           .type            = AVMEDIA_TYPE_VIDEO, |     .outputs   = avfilter_vf_overlay_outputs, | ||||||
|                                           .start_frame     = null_start_frame, |  | ||||||
|                                           .config_props    = config_input_main, |  | ||||||
|                                           .draw_slice      = null_draw_slice, |  | ||||||
|                                           .end_frame       = end_frame_main, |  | ||||||
|                                           .min_perms       = AV_PERM_READ, |  | ||||||
|                                           .rej_perms       = AV_PERM_REUSE2|AV_PERM_PRESERVE, |  | ||||||
|                                           .needs_fifo      = 1, }, |  | ||||||
|                                         { .name            = "overlay", |  | ||||||
|                                           .type            = AVMEDIA_TYPE_VIDEO, |  | ||||||
|                                           .start_frame     = null_start_frame, |  | ||||||
|                                           .config_props    = config_input_overlay, |  | ||||||
|                                           .draw_slice      = null_draw_slice, |  | ||||||
|                                           .end_frame       = end_frame_overlay, |  | ||||||
|                                           .min_perms       = AV_PERM_READ, |  | ||||||
|                                           .rej_perms       = AV_PERM_REUSE2, |  | ||||||
|                                           .needs_fifo      = 1, }, |  | ||||||
|                                         { .name = NULL}}, |  | ||||||
|     .outputs   = (const AVFilterPad[]) {{ .name            = "default", |  | ||||||
|                                           .type            = AVMEDIA_TYPE_VIDEO, |  | ||||||
|                                           .config_props    = config_output, |  | ||||||
|                                           .request_frame   = request_frame, }, |  | ||||||
|                                         { .name = NULL}}, |  | ||||||
| }; | }; | ||||||
|   | |||||||
| @@ -434,6 +434,28 @@ static int draw_slice(AVFilterLink *link, int y, int h, int slice_dir) | |||||||
|     return draw_send_bar_slice(link, y, h, slice_dir, -1); |     return draw_send_bar_slice(link, y, h, slice_dir, -1); | ||||||
| } | } | ||||||
|  |  | ||||||
|  | static const AVFilterPad avfilter_vf_pad_inputs[] = { | ||||||
|  |     { | ||||||
|  |         .name             = "default", | ||||||
|  |         .type             = AVMEDIA_TYPE_VIDEO, | ||||||
|  |         .config_props     = config_input, | ||||||
|  |         .get_video_buffer = get_video_buffer, | ||||||
|  |         .start_frame      = start_frame, | ||||||
|  |         .draw_slice       = draw_slice, | ||||||
|  |         .end_frame        = end_frame, | ||||||
|  |     }, | ||||||
|  |     { NULL } | ||||||
|  | }; | ||||||
|  |  | ||||||
|  | static const AVFilterPad avfilter_vf_pad_outputs[] = { | ||||||
|  |     { | ||||||
|  |         .name         = "default", | ||||||
|  |         .type         = AVMEDIA_TYPE_VIDEO, | ||||||
|  |         .config_props = config_output, | ||||||
|  |     }, | ||||||
|  |     { NULL } | ||||||
|  | }; | ||||||
|  |  | ||||||
| AVFilter avfilter_vf_pad = { | AVFilter avfilter_vf_pad = { | ||||||
|     .name          = "pad", |     .name          = "pad", | ||||||
|     .description   = NULL_IF_CONFIG_SMALL("Pad input image to width:height[:x:y[:color]] (default x and y: 0, default color: black)."), |     .description   = NULL_IF_CONFIG_SMALL("Pad input image to width:height[:x:y[:color]] (default x and y: 0, default color: black)."), | ||||||
| @@ -443,17 +465,7 @@ AVFilter avfilter_vf_pad = { | |||||||
|     .uninit        = uninit, |     .uninit        = uninit, | ||||||
|     .query_formats = query_formats, |     .query_formats = query_formats, | ||||||
|  |  | ||||||
|     .inputs    = (const AVFilterPad[]) {{ .name             = "default", |     .inputs    = avfilter_vf_pad_inputs, | ||||||
|                                           .type             = AVMEDIA_TYPE_VIDEO, |  | ||||||
|                                           .config_props     = config_input, |  | ||||||
|                                           .get_video_buffer = get_video_buffer, |  | ||||||
|                                           .start_frame      = start_frame, |  | ||||||
|                                           .draw_slice       = draw_slice, |  | ||||||
|                                           .end_frame        = end_frame, }, |  | ||||||
|                                         { .name = NULL}}, |  | ||||||
|  |  | ||||||
|     .outputs   = (const AVFilterPad[]) {{ .name             = "default", |     .outputs   = avfilter_vf_pad_outputs, | ||||||
|                                           .type             = AVMEDIA_TYPE_VIDEO, |  | ||||||
|                                           .config_props     = config_output, }, |  | ||||||
|                                         { .name = NULL}}, |  | ||||||
| }; | }; | ||||||
|   | |||||||
| @@ -126,6 +126,26 @@ static int draw_slice(AVFilterLink *inlink, int y, int h, int slice_dir) | |||||||
|     return ff_draw_slice(inlink->dst->outputs[0], y, h, slice_dir); |     return ff_draw_slice(inlink->dst->outputs[0], y, h, slice_dir); | ||||||
| } | } | ||||||
|  |  | ||||||
|  | static const AVFilterPad avfilter_vf_pixdesctest_inputs[] = { | ||||||
|  |     { | ||||||
|  |         .name         = "default", | ||||||
|  |         .type         = AVMEDIA_TYPE_VIDEO, | ||||||
|  |         .start_frame  = start_frame, | ||||||
|  |         .draw_slice   = draw_slice, | ||||||
|  |         .config_props = config_props, | ||||||
|  |         .min_perms    = AV_PERM_READ, | ||||||
|  |     }, | ||||||
|  |     { NULL } | ||||||
|  | }; | ||||||
|  |  | ||||||
|  | static const AVFilterPad avfilter_vf_pixdesctest_outputs[] = { | ||||||
|  |     { | ||||||
|  |         .name = "default", | ||||||
|  |         .type = AVMEDIA_TYPE_VIDEO, | ||||||
|  |     }, | ||||||
|  |     { NULL } | ||||||
|  | }; | ||||||
|  |  | ||||||
| AVFilter avfilter_vf_pixdesctest = { | AVFilter avfilter_vf_pixdesctest = { | ||||||
|     .name        = "pixdesctest", |     .name        = "pixdesctest", | ||||||
|     .description = NULL_IF_CONFIG_SMALL("Test pixel format definitions."), |     .description = NULL_IF_CONFIG_SMALL("Test pixel format definitions."), | ||||||
| @@ -133,15 +153,7 @@ AVFilter avfilter_vf_pixdesctest = { | |||||||
|     .priv_size = sizeof(PixdescTestContext), |     .priv_size = sizeof(PixdescTestContext), | ||||||
|     .uninit    = uninit, |     .uninit    = uninit, | ||||||
|  |  | ||||||
|     .inputs    = (const AVFilterPad[]) {{ .name            = "default", |     .inputs    = avfilter_vf_pixdesctest_inputs, | ||||||
|                                           .type            = AVMEDIA_TYPE_VIDEO, |  | ||||||
|                                           .start_frame     = start_frame, |  | ||||||
|                                           .draw_slice      = draw_slice, |  | ||||||
|                                           .config_props    = config_props, |  | ||||||
|                                           .min_perms       = AV_PERM_READ, }, |  | ||||||
|                                         { .name = NULL}}, |  | ||||||
|  |  | ||||||
|     .outputs   = (const AVFilterPad[]) {{ .name            = "default", |     .outputs   = avfilter_vf_pixdesctest_outputs, | ||||||
|                                           .type            = AVMEDIA_TYPE_VIDEO, }, |  | ||||||
|                                         { .name = NULL}}, |  | ||||||
| }; | }; | ||||||
|   | |||||||
| @@ -336,6 +336,26 @@ static int draw_slice(AVFilterLink *link, int y, int h, int slice_dir) | |||||||
|     return ret; |     return ret; | ||||||
| } | } | ||||||
|  |  | ||||||
|  | static const AVFilterPad avfilter_vf_scale_inputs[] = { | ||||||
|  |     { | ||||||
|  |         .name        = "default", | ||||||
|  |         .type        = AVMEDIA_TYPE_VIDEO, | ||||||
|  |         .start_frame = start_frame, | ||||||
|  |         .draw_slice  = draw_slice, | ||||||
|  |         .min_perms   = AV_PERM_READ, | ||||||
|  |     }, | ||||||
|  |     { NULL } | ||||||
|  | }; | ||||||
|  |  | ||||||
|  | static const AVFilterPad avfilter_vf_scale_outputs[] = { | ||||||
|  |     { | ||||||
|  |         .name         = "default", | ||||||
|  |         .type         = AVMEDIA_TYPE_VIDEO, | ||||||
|  |         .config_props = config_props, | ||||||
|  |     }, | ||||||
|  |     { NULL } | ||||||
|  | }; | ||||||
|  |  | ||||||
| AVFilter avfilter_vf_scale = { | AVFilter avfilter_vf_scale = { | ||||||
|     .name      = "scale", |     .name      = "scale", | ||||||
|     .description = NULL_IF_CONFIG_SMALL("Scale the input video to width:height size and/or convert the image format."), |     .description = NULL_IF_CONFIG_SMALL("Scale the input video to width:height size and/or convert the image format."), | ||||||
| @@ -347,14 +367,6 @@ AVFilter avfilter_vf_scale = { | |||||||
|  |  | ||||||
|     .priv_size = sizeof(ScaleContext), |     .priv_size = sizeof(ScaleContext), | ||||||
|  |  | ||||||
|     .inputs    = (const AVFilterPad[]) {{ .name             = "default", |     .inputs    = avfilter_vf_scale_inputs, | ||||||
|                                           .type             = AVMEDIA_TYPE_VIDEO, |     .outputs   = avfilter_vf_scale_outputs, | ||||||
|                                           .start_frame      = start_frame, |  | ||||||
|                                           .draw_slice       = draw_slice, |  | ||||||
|                                           .min_perms        = AV_PERM_READ, }, |  | ||||||
|                                         { .name = NULL}}, |  | ||||||
|     .outputs   = (const AVFilterPad[]) {{ .name             = "default", |  | ||||||
|                                           .type             = AVMEDIA_TYPE_VIDEO, |  | ||||||
|                                           .config_props     = config_props, }, |  | ||||||
|                                         { .name = NULL}}, |  | ||||||
| }; | }; | ||||||
|   | |||||||
| @@ -340,6 +340,29 @@ static av_cold void uninit(AVFilterContext *ctx) | |||||||
|     select->pending_frames = NULL; |     select->pending_frames = NULL; | ||||||
| } | } | ||||||
|  |  | ||||||
|  | static const AVFilterPad avfilter_vf_select_inputs[] = { | ||||||
|  |     { | ||||||
|  |         .name             = "default", | ||||||
|  |         .type             = AVMEDIA_TYPE_VIDEO, | ||||||
|  |         .get_video_buffer = ff_null_get_video_buffer, | ||||||
|  |         .config_props     = config_input, | ||||||
|  |         .start_frame      = start_frame, | ||||||
|  |         .draw_slice       = draw_slice, | ||||||
|  |         .end_frame        = end_frame | ||||||
|  |     }, | ||||||
|  |     { NULL } | ||||||
|  | }; | ||||||
|  |  | ||||||
|  | static const AVFilterPad avfilter_vf_select_outputs[] = { | ||||||
|  |     { | ||||||
|  |         .name          = "default", | ||||||
|  |         .type          = AVMEDIA_TYPE_VIDEO, | ||||||
|  |         .poll_frame    = poll_frame, | ||||||
|  |         .request_frame = request_frame, | ||||||
|  |     }, | ||||||
|  |     { NULL } | ||||||
|  | }; | ||||||
|  |  | ||||||
| AVFilter avfilter_vf_select = { | AVFilter avfilter_vf_select = { | ||||||
|     .name      = "select", |     .name      = "select", | ||||||
|     .description = NULL_IF_CONFIG_SMALL("Select frames to pass in output."), |     .description = NULL_IF_CONFIG_SMALL("Select frames to pass in output."), | ||||||
| @@ -348,17 +371,6 @@ AVFilter avfilter_vf_select = { | |||||||
|  |  | ||||||
|     .priv_size = sizeof(SelectContext), |     .priv_size = sizeof(SelectContext), | ||||||
|  |  | ||||||
|     .inputs    = (const AVFilterPad[]) {{ .name             = "default", |     .inputs    = avfilter_vf_select_inputs, | ||||||
|                                           .type             = AVMEDIA_TYPE_VIDEO, |     .outputs   = avfilter_vf_select_outputs, | ||||||
|                                           .get_video_buffer = ff_null_get_video_buffer, |  | ||||||
|                                           .config_props     = config_input, |  | ||||||
|                                           .start_frame      = start_frame, |  | ||||||
|                                           .draw_slice       = draw_slice, |  | ||||||
|                                           .end_frame        = end_frame }, |  | ||||||
|                                         { .name = NULL }}, |  | ||||||
|     .outputs   = (const AVFilterPad[]) {{ .name             = "default", |  | ||||||
|                                           .type             = AVMEDIA_TYPE_VIDEO, |  | ||||||
|                                           .poll_frame       = poll_frame, |  | ||||||
|                                           .request_frame    = request_frame, }, |  | ||||||
|                                         { .name = NULL}}, |  | ||||||
| }; | }; | ||||||
|   | |||||||
| @@ -144,6 +144,25 @@ static av_cold void uninit(AVFilterContext *ctx) | |||||||
|     setpts->expr = NULL; |     setpts->expr = NULL; | ||||||
| } | } | ||||||
|  |  | ||||||
|  | static const AVFilterPad avfilter_vf_setpts_inputs[] = { | ||||||
|  |     { | ||||||
|  |         .name             = "default", | ||||||
|  |         .type             = AVMEDIA_TYPE_VIDEO, | ||||||
|  |         .get_video_buffer = ff_null_get_video_buffer, | ||||||
|  |         .config_props     = config_input, | ||||||
|  |         .start_frame      = start_frame, | ||||||
|  |     }, | ||||||
|  |     { NULL } | ||||||
|  | }; | ||||||
|  |  | ||||||
|  | static const AVFilterPad avfilter_vf_setpts_outputs[] = { | ||||||
|  |     { | ||||||
|  |         .name = "default", | ||||||
|  |         .type = AVMEDIA_TYPE_VIDEO, | ||||||
|  |     }, | ||||||
|  |     { NULL } | ||||||
|  | }; | ||||||
|  |  | ||||||
| AVFilter avfilter_vf_setpts = { | AVFilter avfilter_vf_setpts = { | ||||||
|     .name      = "setpts", |     .name      = "setpts", | ||||||
|     .description = NULL_IF_CONFIG_SMALL("Set PTS for the output video frame."), |     .description = NULL_IF_CONFIG_SMALL("Set PTS for the output video frame."), | ||||||
| @@ -152,13 +171,6 @@ AVFilter avfilter_vf_setpts = { | |||||||
|  |  | ||||||
|     .priv_size = sizeof(SetPTSContext), |     .priv_size = sizeof(SetPTSContext), | ||||||
|  |  | ||||||
|     .inputs    = (const AVFilterPad[]) {{ .name             = "default", |     .inputs    = avfilter_vf_setpts_inputs, | ||||||
|                                           .type             = AVMEDIA_TYPE_VIDEO, |     .outputs   = avfilter_vf_setpts_outputs, | ||||||
|                                           .get_video_buffer = ff_null_get_video_buffer, |  | ||||||
|                                           .config_props     = config_input, |  | ||||||
|                                           .start_frame      = start_frame, }, |  | ||||||
|                                         { .name = NULL }}, |  | ||||||
|     .outputs   = (const AVFilterPad[]) {{ .name             = "default", |  | ||||||
|                                           .type             = AVMEDIA_TYPE_VIDEO, }, |  | ||||||
|                                         { .name = NULL}}, |  | ||||||
| }; | }; | ||||||
|   | |||||||
| @@ -125,6 +125,26 @@ static int start_frame(AVFilterLink *inlink, AVFilterBufferRef *picref) | |||||||
|     return ff_start_frame(outlink, picref); |     return ff_start_frame(outlink, picref); | ||||||
| } | } | ||||||
|  |  | ||||||
|  | static const AVFilterPad avfilter_vf_settb_inputs[] = { | ||||||
|  |     { | ||||||
|  |         .name             = "default", | ||||||
|  |         .type             = AVMEDIA_TYPE_VIDEO, | ||||||
|  |         .get_video_buffer = ff_null_get_video_buffer, | ||||||
|  |         .start_frame      = start_frame, | ||||||
|  |         .end_frame        = ff_null_end_frame | ||||||
|  |     }, | ||||||
|  |     { NULL } | ||||||
|  | }; | ||||||
|  |  | ||||||
|  | static const AVFilterPad avfilter_vf_settb_outputs[] = { | ||||||
|  |     { | ||||||
|  |         .name         = "default", | ||||||
|  |         .type         = AVMEDIA_TYPE_VIDEO, | ||||||
|  |         .config_props = config_output_props, | ||||||
|  |     }, | ||||||
|  |     { NULL } | ||||||
|  | }; | ||||||
|  |  | ||||||
| AVFilter avfilter_vf_settb = { | AVFilter avfilter_vf_settb = { | ||||||
|     .name      = "settb", |     .name      = "settb", | ||||||
|     .description = NULL_IF_CONFIG_SMALL("Set timebase for the output link."), |     .description = NULL_IF_CONFIG_SMALL("Set timebase for the output link."), | ||||||
| @@ -132,15 +152,7 @@ AVFilter avfilter_vf_settb = { | |||||||
|  |  | ||||||
|     .priv_size = sizeof(SetTBContext), |     .priv_size = sizeof(SetTBContext), | ||||||
|  |  | ||||||
|     .inputs    = (const AVFilterPad[]) {{ .name             = "default", |     .inputs    = avfilter_vf_settb_inputs, | ||||||
|                                           .type             = AVMEDIA_TYPE_VIDEO, |  | ||||||
|                                           .get_video_buffer = ff_null_get_video_buffer, |  | ||||||
|                                           .start_frame      = start_frame, |  | ||||||
|                                           .end_frame        = ff_null_end_frame }, |  | ||||||
|                                         { .name = NULL }}, |  | ||||||
|  |  | ||||||
|     .outputs   = (const AVFilterPad[]) {{ .name            = "default", |     .outputs   = avfilter_vf_settb_outputs, | ||||||
|                                           .type            = AVMEDIA_TYPE_VIDEO, |  | ||||||
|                                           .config_props    = config_output_props, }, |  | ||||||
|                                         { .name = NULL}}, |  | ||||||
| }; | }; | ||||||
|   | |||||||
| @@ -80,6 +80,26 @@ static int end_frame(AVFilterLink *inlink) | |||||||
|     return ff_end_frame(inlink->dst->outputs[0]); |     return ff_end_frame(inlink->dst->outputs[0]); | ||||||
| } | } | ||||||
|  |  | ||||||
|  | static const AVFilterPad avfilter_vf_showinfo_inputs[] = { | ||||||
|  |     { | ||||||
|  |         .name             = "default", | ||||||
|  |         .type             = AVMEDIA_TYPE_VIDEO, | ||||||
|  |         .get_video_buffer = ff_null_get_video_buffer, | ||||||
|  |         .start_frame      = ff_null_start_frame, | ||||||
|  |         .end_frame        = end_frame, | ||||||
|  |         .min_perms        = AV_PERM_READ, | ||||||
|  |     }, | ||||||
|  |     { NULL } | ||||||
|  | }; | ||||||
|  |  | ||||||
|  | static const AVFilterPad avfilter_vf_showinfo_outputs[] = { | ||||||
|  |     { | ||||||
|  |         .name = "default", | ||||||
|  |         .type = AVMEDIA_TYPE_VIDEO | ||||||
|  |     }, | ||||||
|  |     { NULL } | ||||||
|  | }; | ||||||
|  |  | ||||||
| AVFilter avfilter_vf_showinfo = { | AVFilter avfilter_vf_showinfo = { | ||||||
|     .name        = "showinfo", |     .name        = "showinfo", | ||||||
|     .description = NULL_IF_CONFIG_SMALL("Show textual information for each video frame."), |     .description = NULL_IF_CONFIG_SMALL("Show textual information for each video frame."), | ||||||
| @@ -87,15 +107,7 @@ AVFilter avfilter_vf_showinfo = { | |||||||
|     .priv_size = sizeof(ShowInfoContext), |     .priv_size = sizeof(ShowInfoContext), | ||||||
|     .init      = init, |     .init      = init, | ||||||
|  |  | ||||||
|     .inputs    = (const AVFilterPad[]) {{ .name = "default", |     .inputs    = avfilter_vf_showinfo_inputs, | ||||||
|                                           .type             = AVMEDIA_TYPE_VIDEO, |  | ||||||
|                                           .get_video_buffer = ff_null_get_video_buffer, |  | ||||||
|                                           .start_frame      = ff_null_start_frame, |  | ||||||
|                                           .end_frame        = end_frame, |  | ||||||
|                                           .min_perms        = AV_PERM_READ, }, |  | ||||||
|                                         { .name = NULL}}, |  | ||||||
|  |  | ||||||
|     .outputs   = (const AVFilterPad[]) {{ .name             = "default", |     .outputs   = avfilter_vf_showinfo_outputs, | ||||||
|                                           .type             = AVMEDIA_TYPE_VIDEO }, |  | ||||||
|                                         { .name = NULL}}, |  | ||||||
| }; | }; | ||||||
|   | |||||||
| @@ -106,6 +106,27 @@ static int draw_slice(AVFilterLink *link, int y, int h, int slice_dir) | |||||||
|     return 0; |     return 0; | ||||||
| } | } | ||||||
|  |  | ||||||
|  | static const AVFilterPad avfilter_vf_slicify_inputs[] = { | ||||||
|  |     { | ||||||
|  |         .name             = "default", | ||||||
|  |         .type             = AVMEDIA_TYPE_VIDEO, | ||||||
|  |         .get_video_buffer = ff_null_get_video_buffer, | ||||||
|  |         .start_frame      = start_frame, | ||||||
|  |         .draw_slice       = draw_slice, | ||||||
|  |         .config_props     = config_props, | ||||||
|  |         .end_frame        = ff_null_end_frame, | ||||||
|  |     }, | ||||||
|  |     { NULL } | ||||||
|  | }; | ||||||
|  |  | ||||||
|  | static const AVFilterPad avfilter_vf_slicify_outputs[] = { | ||||||
|  |     { | ||||||
|  |         .name = "default", | ||||||
|  |         .type = AVMEDIA_TYPE_VIDEO, | ||||||
|  |     }, | ||||||
|  |     { NULL } | ||||||
|  | }; | ||||||
|  |  | ||||||
| AVFilter avfilter_vf_slicify = { | AVFilter avfilter_vf_slicify = { | ||||||
|     .name      = "slicify", |     .name      = "slicify", | ||||||
|     .description = NULL_IF_CONFIG_SMALL("Pass the images of input video on to next video filter as multiple slices."), |     .description = NULL_IF_CONFIG_SMALL("Pass the images of input video on to next video filter as multiple slices."), | ||||||
| @@ -114,15 +135,6 @@ AVFilter avfilter_vf_slicify = { | |||||||
|  |  | ||||||
|     .priv_size = sizeof(SliceContext), |     .priv_size = sizeof(SliceContext), | ||||||
|  |  | ||||||
|     .inputs    = (const AVFilterPad[]) {{ .name             = "default", |     .inputs    = avfilter_vf_slicify_inputs, | ||||||
|                                           .type             = AVMEDIA_TYPE_VIDEO, |     .outputs   = avfilter_vf_slicify_outputs, | ||||||
|                                           .get_video_buffer = ff_null_get_video_buffer, |  | ||||||
|                                           .start_frame      = start_frame, |  | ||||||
|                                           .draw_slice       = draw_slice, |  | ||||||
|                                           .config_props     = config_props, |  | ||||||
|                                           .end_frame        = ff_null_end_frame, }, |  | ||||||
|                                         { .name = NULL}}, |  | ||||||
|     .outputs   = (const AVFilterPad[]) {{ .name            = "default", |  | ||||||
|                                           .type            = AVMEDIA_TYPE_VIDEO, }, |  | ||||||
|                                         { .name = NULL}}, |  | ||||||
| }; | }; | ||||||
|   | |||||||
| @@ -208,6 +208,26 @@ static int end_frame(AVFilterLink *inlink) | |||||||
|     return 0; |     return 0; | ||||||
| } | } | ||||||
|  |  | ||||||
|  | static const AVFilterPad avfilter_vf_transpose_inputs[] = { | ||||||
|  |     { | ||||||
|  |         .name        = "default", | ||||||
|  |         .type        = AVMEDIA_TYPE_VIDEO, | ||||||
|  |         .start_frame = start_frame, | ||||||
|  |         .end_frame   = end_frame, | ||||||
|  |         .min_perms   = AV_PERM_READ, | ||||||
|  |     }, | ||||||
|  |     { NULL } | ||||||
|  | }; | ||||||
|  |  | ||||||
|  | static const AVFilterPad avfilter_vf_transpose_outputs[] = { | ||||||
|  |     { | ||||||
|  |         .name         = "default", | ||||||
|  |         .config_props = config_props_output, | ||||||
|  |         .type         = AVMEDIA_TYPE_VIDEO, | ||||||
|  |     }, | ||||||
|  |     { NULL } | ||||||
|  | }; | ||||||
|  |  | ||||||
| AVFilter avfilter_vf_transpose = { | AVFilter avfilter_vf_transpose = { | ||||||
|     .name      = "transpose", |     .name      = "transpose", | ||||||
|     .description = NULL_IF_CONFIG_SMALL("Transpose input video."), |     .description = NULL_IF_CONFIG_SMALL("Transpose input video."), | ||||||
| @@ -217,14 +237,6 @@ AVFilter avfilter_vf_transpose = { | |||||||
|  |  | ||||||
|     .query_formats = query_formats, |     .query_formats = query_formats, | ||||||
|  |  | ||||||
|     .inputs    = (const AVFilterPad[]) {{ .name            = "default", |     .inputs    = avfilter_vf_transpose_inputs, | ||||||
|                                           .type            = AVMEDIA_TYPE_VIDEO, |     .outputs   = avfilter_vf_transpose_outputs, | ||||||
|                                           .start_frame     = start_frame, |  | ||||||
|                                           .end_frame       = end_frame, |  | ||||||
|                                           .min_perms       = AV_PERM_READ, }, |  | ||||||
|                                         { .name = NULL}}, |  | ||||||
|     .outputs   = (const AVFilterPad[]) {{ .name            = "default", |  | ||||||
|                                           .config_props    = config_props_output, |  | ||||||
|                                           .type            = AVMEDIA_TYPE_VIDEO, }, |  | ||||||
|                                         { .name = NULL}}, |  | ||||||
| }; | }; | ||||||
|   | |||||||
| @@ -237,6 +237,26 @@ static int draw_slice(AVFilterLink *link, int y, int h, int slice_dir) | |||||||
|     return 0; |     return 0; | ||||||
| } | } | ||||||
|  |  | ||||||
|  | static const AVFilterPad avfilter_vf_unsharp_inputs[] = { | ||||||
|  |     { | ||||||
|  |         .name         = "default", | ||||||
|  |         .type         = AVMEDIA_TYPE_VIDEO, | ||||||
|  |         .draw_slice   = draw_slice, | ||||||
|  |         .end_frame    = end_frame, | ||||||
|  |         .config_props = config_props, | ||||||
|  |         .min_perms    = AV_PERM_READ, | ||||||
|  |     }, | ||||||
|  |     { NULL } | ||||||
|  | }; | ||||||
|  |  | ||||||
|  | static const AVFilterPad avfilter_vf_unsharp_outputs[] = { | ||||||
|  |     { | ||||||
|  |         .name = "default", | ||||||
|  |         .type = AVMEDIA_TYPE_VIDEO, | ||||||
|  |     }, | ||||||
|  |     { NULL } | ||||||
|  | }; | ||||||
|  |  | ||||||
| AVFilter avfilter_vf_unsharp = { | AVFilter avfilter_vf_unsharp = { | ||||||
|     .name      = "unsharp", |     .name      = "unsharp", | ||||||
|     .description = NULL_IF_CONFIG_SMALL("Sharpen or blur the input video."), |     .description = NULL_IF_CONFIG_SMALL("Sharpen or blur the input video."), | ||||||
| @@ -247,15 +267,7 @@ AVFilter avfilter_vf_unsharp = { | |||||||
|     .uninit = uninit, |     .uninit = uninit, | ||||||
|     .query_formats = query_formats, |     .query_formats = query_formats, | ||||||
|  |  | ||||||
|     .inputs    = (const AVFilterPad[]) {{ .name             = "default", |     .inputs    = avfilter_vf_unsharp_inputs, | ||||||
|                                           .type             = AVMEDIA_TYPE_VIDEO, |  | ||||||
|                                           .draw_slice       = draw_slice, |  | ||||||
|                                           .end_frame        = end_frame, |  | ||||||
|                                           .config_props     = config_props, |  | ||||||
|                                           .min_perms        = AV_PERM_READ, }, |  | ||||||
|                                         { .name = NULL}}, |  | ||||||
|  |  | ||||||
|     .outputs   = (const AVFilterPad[]) {{ .name             = "default", |     .outputs   = avfilter_vf_unsharp_outputs, | ||||||
|                                           .type             = AVMEDIA_TYPE_VIDEO, }, |  | ||||||
|                                         { .name = NULL}}, |  | ||||||
| }; | }; | ||||||
|   | |||||||
| @@ -96,20 +96,32 @@ static int draw_slice(AVFilterLink *link, int y, int h, int slice_dir) | |||||||
|     return ff_draw_slice(ctx->outputs[0], link->h - (y+h), h, -1 * slice_dir); |     return ff_draw_slice(ctx->outputs[0], link->h - (y+h), h, -1 * slice_dir); | ||||||
| } | } | ||||||
|  |  | ||||||
|  | static const AVFilterPad avfilter_vf_vflip_inputs[] = { | ||||||
|  |     { | ||||||
|  |         .name             = "default", | ||||||
|  |         .type             = AVMEDIA_TYPE_VIDEO, | ||||||
|  |         .get_video_buffer = get_video_buffer, | ||||||
|  |         .start_frame      = start_frame, | ||||||
|  |         .draw_slice       = draw_slice, | ||||||
|  |         .config_props     = config_input, | ||||||
|  |     }, | ||||||
|  |     { NULL } | ||||||
|  | }; | ||||||
|  |  | ||||||
|  | static const AVFilterPad avfilter_vf_vflip_outputs[] = { | ||||||
|  |     { | ||||||
|  |         .name = "default", | ||||||
|  |         .type = AVMEDIA_TYPE_VIDEO, | ||||||
|  |     }, | ||||||
|  |     { NULL } | ||||||
|  | }; | ||||||
|  |  | ||||||
| AVFilter avfilter_vf_vflip = { | AVFilter avfilter_vf_vflip = { | ||||||
|     .name      = "vflip", |     .name      = "vflip", | ||||||
|     .description = NULL_IF_CONFIG_SMALL("Flip the input video vertically."), |     .description = NULL_IF_CONFIG_SMALL("Flip the input video vertically."), | ||||||
|  |  | ||||||
|     .priv_size = sizeof(FlipContext), |     .priv_size = sizeof(FlipContext), | ||||||
|  |  | ||||||
|     .inputs    = (const AVFilterPad[]) {{ .name             = "default", |     .inputs    = avfilter_vf_vflip_inputs, | ||||||
|                                           .type             = AVMEDIA_TYPE_VIDEO, |     .outputs   = avfilter_vf_vflip_outputs, | ||||||
|                                           .get_video_buffer = get_video_buffer, |  | ||||||
|                                           .start_frame      = start_frame, |  | ||||||
|                                           .draw_slice       = draw_slice, |  | ||||||
|                                           .config_props     = config_input, }, |  | ||||||
|                                         { .name = NULL}}, |  | ||||||
|     .outputs   = (const AVFilterPad[]) {{ .name             = "default", |  | ||||||
|                                           .type             = AVMEDIA_TYPE_VIDEO, }, |  | ||||||
|                                         { .name = NULL}}, |  | ||||||
| }; | }; | ||||||
|   | |||||||
| @@ -424,6 +424,29 @@ static int config_props(AVFilterLink *link) | |||||||
|     return 0; |     return 0; | ||||||
| } | } | ||||||
|  |  | ||||||
|  | static const AVFilterPad avfilter_vf_yadif_inputs[] = { | ||||||
|  |     { | ||||||
|  |         .name             = "default", | ||||||
|  |         .type             = AVMEDIA_TYPE_VIDEO, | ||||||
|  |         .start_frame      = start_frame, | ||||||
|  |         .get_video_buffer = get_video_buffer, | ||||||
|  |         .draw_slice       = null_draw_slice, | ||||||
|  |         .end_frame        = end_frame, | ||||||
|  |     }, | ||||||
|  |     { NULL } | ||||||
|  | }; | ||||||
|  |  | ||||||
|  | static const AVFilterPad avfilter_vf_yadif_outputs[] = { | ||||||
|  |     { | ||||||
|  |         .name          = "default", | ||||||
|  |         .type          = AVMEDIA_TYPE_VIDEO, | ||||||
|  |         .poll_frame    = poll_frame, | ||||||
|  |         .request_frame = request_frame, | ||||||
|  |         .config_props  = config_props, | ||||||
|  |     }, | ||||||
|  |     { NULL } | ||||||
|  | }; | ||||||
|  |  | ||||||
| AVFilter avfilter_vf_yadif = { | AVFilter avfilter_vf_yadif = { | ||||||
|     .name          = "yadif", |     .name          = "yadif", | ||||||
|     .description   = NULL_IF_CONFIG_SMALL("Deinterlace the input image"), |     .description   = NULL_IF_CONFIG_SMALL("Deinterlace the input image"), | ||||||
| @@ -433,18 +456,7 @@ AVFilter avfilter_vf_yadif = { | |||||||
|     .uninit        = uninit, |     .uninit        = uninit, | ||||||
|     .query_formats = query_formats, |     .query_formats = query_formats, | ||||||
|  |  | ||||||
|     .inputs    = (const AVFilterPad[]) {{ .name             = "default", |     .inputs    = avfilter_vf_yadif_inputs, | ||||||
|                                           .type             = AVMEDIA_TYPE_VIDEO, |  | ||||||
|                                           .start_frame      = start_frame, |  | ||||||
|                                           .get_video_buffer = get_video_buffer, |  | ||||||
|                                           .draw_slice       = null_draw_slice, |  | ||||||
|                                           .end_frame        = end_frame, }, |  | ||||||
|                                         { .name = NULL}}, |  | ||||||
|  |  | ||||||
|     .outputs   = (const AVFilterPad[]) {{ .name             = "default", |     .outputs   = avfilter_vf_yadif_outputs, | ||||||
|                                           .type             = AVMEDIA_TYPE_VIDEO, |  | ||||||
|                                           .poll_frame       = poll_frame, |  | ||||||
|                                           .request_frame    = request_frame, |  | ||||||
|                                           .config_props     = config_props, }, |  | ||||||
|                                         { .name = NULL}}, |  | ||||||
| }; | }; | ||||||
|   | |||||||
| @@ -30,20 +30,22 @@ static int end_frame(AVFilterLink *link) | |||||||
|     return 0; |     return 0; | ||||||
| } | } | ||||||
|  |  | ||||||
|  | static const AVFilterPad avfilter_vsink_nullsink_inputs[] = { | ||||||
|  |     { | ||||||
|  |         .name        = "default", | ||||||
|  |         .type        = AVMEDIA_TYPE_VIDEO, | ||||||
|  |         .start_frame = start_frame, | ||||||
|  |         .end_frame   = end_frame, | ||||||
|  |     }, | ||||||
|  |     { NULL }, | ||||||
|  | }; | ||||||
|  |  | ||||||
| AVFilter avfilter_vsink_nullsink = { | AVFilter avfilter_vsink_nullsink = { | ||||||
|     .name        = "nullsink", |     .name        = "nullsink", | ||||||
|     .description = NULL_IF_CONFIG_SMALL("Do absolutely nothing with the input video."), |     .description = NULL_IF_CONFIG_SMALL("Do absolutely nothing with the input video."), | ||||||
|  |  | ||||||
|     .priv_size = 0, |     .priv_size = 0, | ||||||
|  |  | ||||||
|     .inputs    = (const AVFilterPad[]) { |     .inputs    = avfilter_vsink_nullsink_inputs, | ||||||
|         { |  | ||||||
|             .name            = "default", |  | ||||||
|             .type            = AVMEDIA_TYPE_VIDEO, |  | ||||||
|             .start_frame     = start_frame, |  | ||||||
|             .end_frame       = end_frame, |  | ||||||
|         }, |  | ||||||
|         { .name = NULL}, |  | ||||||
|     }, |  | ||||||
|     .outputs   = NULL, |     .outputs   = NULL, | ||||||
| }; | }; | ||||||
|   | |||||||
| @@ -182,6 +182,16 @@ fail: | |||||||
|     return ret; |     return ret; | ||||||
| } | } | ||||||
|  |  | ||||||
|  | static const AVFilterPad avfilter_vsrc_color_outputs[] = { | ||||||
|  |     { | ||||||
|  |         .name          = "default", | ||||||
|  |         .type          = AVMEDIA_TYPE_VIDEO, | ||||||
|  |         .request_frame = color_request_frame, | ||||||
|  |         .config_props  = color_config_props | ||||||
|  |     }, | ||||||
|  |     { NULL } | ||||||
|  | }; | ||||||
|  |  | ||||||
| AVFilter avfilter_vsrc_color = { | AVFilter avfilter_vsrc_color = { | ||||||
|     .name        = "color", |     .name        = "color", | ||||||
|     .description = NULL_IF_CONFIG_SMALL("Provide an uniformly colored input, syntax is: [color[:size[:rate]]]"), |     .description = NULL_IF_CONFIG_SMALL("Provide an uniformly colored input, syntax is: [color[:size[:rate]]]"), | ||||||
| @@ -194,9 +204,5 @@ AVFilter avfilter_vsrc_color = { | |||||||
|  |  | ||||||
|     .inputs    = NULL, |     .inputs    = NULL, | ||||||
|  |  | ||||||
|     .outputs   = (const AVFilterPad[]) {{ .name            = "default", |     .outputs   = avfilter_vsrc_color_outputs, | ||||||
|                                           .type            = AVMEDIA_TYPE_VIDEO, |  | ||||||
|                                           .request_frame   = color_request_frame, |  | ||||||
|                                           .config_props    = color_config_props }, |  | ||||||
|                                         { .name = NULL}}, |  | ||||||
| }; | }; | ||||||
|   | |||||||
| @@ -309,6 +309,16 @@ fail: | |||||||
|     return ret; |     return ret; | ||||||
| } | } | ||||||
|  |  | ||||||
|  | static const AVFilterPad avfilter_vsrc_movie_outputs[] = { | ||||||
|  |     { | ||||||
|  |         .name          = "default", | ||||||
|  |         .type          = AVMEDIA_TYPE_VIDEO, | ||||||
|  |         .request_frame = request_frame, | ||||||
|  |         .config_props  = config_output_props, | ||||||
|  |     }, | ||||||
|  |     { NULL } | ||||||
|  | }; | ||||||
|  |  | ||||||
| AVFilter avfilter_vsrc_movie = { | AVFilter avfilter_vsrc_movie = { | ||||||
|     .name          = "movie", |     .name          = "movie", | ||||||
|     .description   = NULL_IF_CONFIG_SMALL("Read from a movie source."), |     .description   = NULL_IF_CONFIG_SMALL("Read from a movie source."), | ||||||
| @@ -318,9 +328,5 @@ AVFilter avfilter_vsrc_movie = { | |||||||
|     .query_formats = query_formats, |     .query_formats = query_formats, | ||||||
|  |  | ||||||
|     .inputs    = NULL, |     .inputs    = NULL, | ||||||
|     .outputs   = (const AVFilterPad[]) {{ .name            = "default", |     .outputs   = avfilter_vsrc_movie_outputs, | ||||||
|                                           .type            = AVMEDIA_TYPE_VIDEO, |  | ||||||
|                                           .request_frame   = request_frame, |  | ||||||
|                                           .config_props    = config_output_props, }, |  | ||||||
|                                         { .name = NULL}}, |  | ||||||
| }; | }; | ||||||
|   | |||||||
| @@ -114,6 +114,16 @@ static int request_frame(AVFilterLink *link) | |||||||
|     return -1; |     return -1; | ||||||
| } | } | ||||||
|  |  | ||||||
|  | static const AVFilterPad avfilter_vsrc_nullsrc_outputs[] = { | ||||||
|  |     { | ||||||
|  |         .name          = "default", | ||||||
|  |         .type          = AVMEDIA_TYPE_VIDEO, | ||||||
|  |         .config_props  = config_props, | ||||||
|  |         .request_frame = request_frame, | ||||||
|  |     }, | ||||||
|  |     { NULL } | ||||||
|  | }; | ||||||
|  |  | ||||||
| AVFilter avfilter_vsrc_nullsrc = { | AVFilter avfilter_vsrc_nullsrc = { | ||||||
|     .name        = "nullsrc", |     .name        = "nullsrc", | ||||||
|     .description = NULL_IF_CONFIG_SMALL("Null video source, never return images."), |     .description = NULL_IF_CONFIG_SMALL("Null video source, never return images."), | ||||||
| @@ -123,13 +133,5 @@ AVFilter avfilter_vsrc_nullsrc = { | |||||||
|  |  | ||||||
|     .inputs    = NULL, |     .inputs    = NULL, | ||||||
|  |  | ||||||
|     .outputs   = (const AVFilterPad[]) { |     .outputs   = avfilter_vsrc_nullsrc_outputs, | ||||||
|         { |  | ||||||
|             .name            = "default", |  | ||||||
|             .type            = AVMEDIA_TYPE_VIDEO, |  | ||||||
|             .config_props    = config_props, |  | ||||||
|             .request_frame   = request_frame, |  | ||||||
|         }, |  | ||||||
|         { .name = NULL} |  | ||||||
|     }, |  | ||||||
| }; | }; | ||||||
|   | |||||||
| @@ -359,6 +359,16 @@ static int test_query_formats(AVFilterContext *ctx) | |||||||
|     return 0; |     return 0; | ||||||
| } | } | ||||||
|  |  | ||||||
|  | static const AVFilterPad avfilter_vsrc_testsrc_outputs[] = { | ||||||
|  |     { | ||||||
|  |         .name          = "default", | ||||||
|  |         .type          = AVMEDIA_TYPE_VIDEO, | ||||||
|  |         .request_frame = request_frame, | ||||||
|  |         .config_props  = config_props, | ||||||
|  |     }, | ||||||
|  |     { NULL } | ||||||
|  | }; | ||||||
|  |  | ||||||
| AVFilter avfilter_vsrc_testsrc = { | AVFilter avfilter_vsrc_testsrc = { | ||||||
|     .name          = "testsrc", |     .name          = "testsrc", | ||||||
|     .description   = NULL_IF_CONFIG_SMALL("Generate test pattern."), |     .description   = NULL_IF_CONFIG_SMALL("Generate test pattern."), | ||||||
| @@ -369,11 +379,7 @@ AVFilter avfilter_vsrc_testsrc = { | |||||||
|  |  | ||||||
|     .inputs    = NULL, |     .inputs    = NULL, | ||||||
|  |  | ||||||
|     .outputs   = (const AVFilterPad[]) {{ .name = "default", |     .outputs   = avfilter_vsrc_testsrc_outputs, | ||||||
|                                           .type = AVMEDIA_TYPE_VIDEO, |  | ||||||
|                                           .request_frame = request_frame, |  | ||||||
|                                           .config_props  = config_props, }, |  | ||||||
|                                         { .name = NULL }}, |  | ||||||
| }; | }; | ||||||
|  |  | ||||||
| #endif /* CONFIG_TESTSRC_FILTER */ | #endif /* CONFIG_TESTSRC_FILTER */ | ||||||
| @@ -486,6 +492,16 @@ static int rgbtest_config_props(AVFilterLink *outlink) | |||||||
|     return config_props(outlink); |     return config_props(outlink); | ||||||
| } | } | ||||||
|  |  | ||||||
|  | static const AVFilterPad avfilter_vsrc_rgbtestsrc_outputs[] = { | ||||||
|  |     { | ||||||
|  |         .name          = "default", | ||||||
|  |         .type          = AVMEDIA_TYPE_VIDEO, | ||||||
|  |         .request_frame = request_frame, | ||||||
|  |         .config_props  = rgbtest_config_props, | ||||||
|  |     }, | ||||||
|  |     { NULL } | ||||||
|  | }; | ||||||
|  |  | ||||||
| AVFilter avfilter_vsrc_rgbtestsrc = { | AVFilter avfilter_vsrc_rgbtestsrc = { | ||||||
|     .name          = "rgbtestsrc", |     .name          = "rgbtestsrc", | ||||||
|     .description   = NULL_IF_CONFIG_SMALL("Generate RGB test pattern."), |     .description   = NULL_IF_CONFIG_SMALL("Generate RGB test pattern."), | ||||||
| @@ -496,11 +512,7 @@ AVFilter avfilter_vsrc_rgbtestsrc = { | |||||||
|  |  | ||||||
|     .inputs    = NULL, |     .inputs    = NULL, | ||||||
|  |  | ||||||
|     .outputs   = (const AVFilterPad[]) {{ .name = "default", |     .outputs   = avfilter_vsrc_rgbtestsrc_outputs, | ||||||
|                                           .type = AVMEDIA_TYPE_VIDEO, |  | ||||||
|                                           .request_frame = request_frame, |  | ||||||
|                                           .config_props  = rgbtest_config_props, }, |  | ||||||
|                                         { .name = NULL }}, |  | ||||||
| }; | }; | ||||||
|  |  | ||||||
| #endif /* CONFIG_RGBTESTSRC_FILTER */ | #endif /* CONFIG_RGBTESTSRC_FILTER */ | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user