[FFmpeg-devel] [PATCH 1/2] lavfi: merge asrc_abuffer into vsrc_buffer.
Stefano Sabatini
stefasab at gmail.com
Fri Apr 27 23:58:21 CEST 2012
On date Friday 2012-04-27 19:38:34 +0200, Nicolas George encoded:
>
> Signed-off-by: Nicolas George <nicolas.george at normalesup.org>
> ---
> libavfilter/Makefile | 1 -
> libavfilter/asrc_abuffer.c | 372 --------------------------------------------
> libavfilter/vsrc_buffer.c | 349 ++++++++++++++++++++++++++++++++++++++++--
> 3 files changed, 338 insertions(+), 384 deletions(-)
> delete mode 100644 libavfilter/asrc_abuffer.c
[...]
> AVFilter avfilter_vsrc_buffer = {
> .name = "buffer",
> .description = NULL_IF_CONFIG_SMALL("Buffer video frames, and make them accessible to the filterchain."),
> .priv_size = sizeof(BufferSourceContext),
> - .query_formats = query_formats,
> + .query_formats = query_formats_video,
>
> - .init = init,
> + .init = init_video,
> .uninit = uninit,
>
> .inputs = (const AVFilterPad[]) {{ .name = NULL }},
> @@ -293,6 +598,28 @@ AVFilter avfilter_vsrc_buffer = {
> .type = AVMEDIA_TYPE_VIDEO,
> .request_frame = request_frame,
> .poll_frame = poll_frame,
> - .config_props = config_props, },
> + .config_props = config_output_video, },
Nit: config_output_video -> vsrc_config_output, consistent with
sink_buffer.c. Same below.
> { .name = NULL}},
> };
> +
> +#ifdef CONFIG_ABUFFER_FILTER
You can save a few KBs of unused binary code in case of disable by
reorganizing the function order, putting under #ifdef those which
are not shared (see sink_buffer.c).
> +
> +AVFilter avfilter_asrc_abuffer = {
> + .name = "abuffer",
> + .description = NULL_IF_CONFIG_SMALL("Buffer audio frames, and make them accessible to the filterchain."),
> + .priv_size = sizeof(BufferSourceContext),
> + .query_formats = query_formats_audio,
> +
> + .init = init_audio,
> + .uninit = uninit,
> +
> + .inputs = (const AVFilterPad[]) {{ .name = NULL }},
> + .outputs = (const AVFilterPad[]) {{ .name = "default",
> + .type = AVMEDIA_TYPE_AUDIO,
> + .request_frame = request_frame,
> + .poll_frame = poll_frame,
> + .config_props = config_output_audio, },
And thanks for working on this, that was in my todo since a long time.
--
FFmpeg = Friendly and Funny Mean Pitiful Esoteric Generator
More information about the ffmpeg-devel
mailing list