[FFmpeg-devel] [PATCH] avfilter/af_rubberband: add process_command()
Paul B Mahol
onemda at gmail.com
Thu Oct 1 09:29:10 CEST 2015
On 10/1/15, Michael Niedermayer <michaelni at gmx.at> wrote:
> 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
Clang complain if I do not give it "l".
>
> 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]
You sure have latest version of rubberband?
>
>
>
> [...]
>
> --
> Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
>
> The greatest way to live with honor in this world is to be what we pretend
> to be. -- Socrates
>
More information about the ffmpeg-devel
mailing list