diff mbox

[FFmpeg-devel] lavfi: rename af_aresample to af_resample

Message ID CAE9qxYCxNNUndgaH0m91w-cDqugg9Xzd=VB=XE6-U2Dv9Xrm+Q@mail.gmail.com
State New
Headers show

Commit Message

Rostislav Pehlivanov March 6, 2017, 9:08 a.m. UTC
On 6 March 2017 at 09:00, Carl Eugen Hoyos <ceffmpeg@gmail.com> wrote:

> 2017-03-06 9:48 GMT+01:00 Rostislav Pehlivanov <atomnuker@gmail.com>:
>
> > +AVFilter ff_af_resample = {
> > +    .name          = "resample",
>
> Why? Do we really need two identical filters with similar name?
>
> We cannot remove the "aresample" filter that is mentioned
> all over our documentation.
> We did not support he resample filter for several years,
> removing it can't be an issue.
>
> Carl Eugen
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>

Yeah, I agree, I'd prefer af_aresample to remain. Most of our filters use
af_a<something> for audio and vf_<something> for video (e.g. af_apad and
vf_pad).
I'd be happy with the filename remaining af_aresample and the filter
remaining as af_aresample but also providing af_resample (that is if
there's a real need for it; I don't believe there is but maybe someone can
say there is). I've attached a patch which does that.
diff mbox

Patch

From 7a7b31afd4211ba980f73e7d3247d00d3bc563b1 Mon Sep 17 00:00:00 2001
From: Rostislav Pehlivanov <atomnuker@gmail.com>
Date: Mon, 6 Mar 2017 09:06:19 +0000
Subject: [PATCH] af_aresample: provide af_resample

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
---
 libavfilter/af_aresample.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/libavfilter/af_aresample.c b/libavfilter/af_aresample.c
index 028e105318..1ee02a96ad 100644
--- a/libavfilter/af_aresample.c
+++ b/libavfilter/af_aresample.c
@@ -349,3 +349,16 @@  AVFilter ff_af_aresample = {
     .inputs        = aresample_inputs,
     .outputs       = aresample_outputs,
 };
+
+/* af_resample got removed, this provides compatibility for now */
+AVFilter ff_af_resample = {
+    .name          = "resample",
+    .description   = NULL_IF_CONFIG_SMALL("Resample audio data."),
+    .init_dict     = init_dict,
+    .uninit        = uninit,
+    .query_formats = query_formats,
+    .priv_size     = sizeof(AResampleContext),
+    .priv_class    = &aresample_class,
+    .inputs        = aresample_inputs,
+    .outputs       = aresample_outputs,
+};
-- 
2.12.0.rc1.440.g5b76565f74