[FFmpeg-devel] [PATCH] avfilter/af_rubberband: add process_command()
Michael Niedermayer
michaelni at gmx.at
Thu Oct 1 00:50:19 CEST 2015
On Wed, Sep 30, 2015 at 09:41:35PM +0200, Paul B Mahol wrote:
> Signed-off-by: Paul B Mahol <onemda at gmail.com>
> ---
> libavfilter/af_rubberband.c | 34 ++++++++++++++++++++++++++++++++++
> 1 file changed, 34 insertions(+)
>
> diff --git a/libavfilter/af_rubberband.c b/libavfilter/af_rubberband.c
> index 0a15fdc..b958681 100644
> --- a/libavfilter/af_rubberband.c
> +++ b/libavfilter/af_rubberband.c
> @@ -207,6 +207,39 @@ static int request_frame(AVFilterLink *outlink)
> return ret;
> }
>
> +static int process_command(AVFilterContext *ctx, const char *cmd, const char *args,
> + char *res, int res_len, int flags)
> +{
> + RubberBandContext *s = ctx->priv;
> + int ret;
> +
> + if (!strcmp(cmd, "tempo")) {
> + double arg;
> +
> + sscanf(args, "%lf", &arg);
> + if (arg < 0.01 || arg > 100) {
> + av_log(ctx, AV_LOG_ERROR,
> + "Tempo scale factor '%lf' out of range\n", arg);
[...]
> + "Pitch scale factor '%lf' out of range\n", arg);
"l" is unneeded, %f is for double already
also af_rubberband seems to fail to build with 1.3-1.2 from ubuntu
libavfilter/af_rubberband.c:53:54: error: ‘RubberBandOptionDetectorCompound’ undeclared here (not in a function)
libavfilter/af_rubberband.c:54:56: error: ‘RubberBandOptionDetectorPercussive’ undeclared here (not in a function)
libavfilter/af_rubberband.c:55:50: error: ‘RubberBandOptionDetectorSoft’ undeclared here (not in a function)
libavfilter/af_rubberband.c:64:49: error: ‘RubberBandOptionSmoothingOff’ undeclared here (not in a function)
libavfilter/af_rubberband.c:65:48: error: ‘RubberBandOptionSmoothingOn’ undeclared here (not in a function)
libavfilter/af_rubberband.c:74:51: error: ‘RubberBandOptionChannelsApart’ undeclared here (not in a function)
libavfilter/af_rubberband.c:75:54: error: ‘RubberBandOptionChannelsTogether’ undeclared here (not in a function)
libavfilter/af_rubberband.c: In function ‘process_command’:
libavfilter/af_rubberband.c:214:9: warning: unused variable ‘ret’ [-Wunused-variable]
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
The greatest way to live with honor in this world is to be what we pretend
to be. -- Socrates
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20151001/187db2f0/attachment.sig>
More information about the ffmpeg-devel
mailing list