FFmpeg
Data Structures | Macros | Functions | Variables
af_rubberband.c File Reference
#include <rubberband/rubberband-c.h>
#include "libavutil/channel_layout.h"
#include "libavutil/common.h"
#include "libavutil/opt.h"
#include "audio.h"
#include "avfilter.h"
#include "filters.h"
#include "formats.h"
#include "internal.h"

Go to the source code of this file.

Data Structures

struct  RubberBandContext
 

Macros

#define OFFSET(x)   offsetof(RubberBandContext, x)
 
#define A   AV_OPT_FLAG_AUDIO_PARAM|AV_OPT_FLAG_FILTERING_PARAM
 

Functions

 AVFILTER_DEFINE_CLASS (rubberband)
 
static av_cold void uninit (AVFilterContext *ctx)
 
static int query_formats (AVFilterContext *ctx)
 
static int filter_frame (AVFilterLink *inlink, AVFrame *in)
 
static int config_input (AVFilterLink *inlink)
 
static int activate (AVFilterContext *ctx)
 
static int process_command (AVFilterContext *ctx, const char *cmd, const char *args, char *res, int res_len, int flags)
 

Variables

static const AVOption rubberband_options []
 
static const AVFilterPad rubberband_inputs []
 
static const AVFilterPad rubberband_outputs []
 
AVFilter ff_af_rubberband
 

Macro Definition Documentation

◆ OFFSET

#define OFFSET (   x)    offsetof(RubberBandContext, x)

Definition at line 44 of file af_rubberband.c.

◆ A

Definition at line 45 of file af_rubberband.c.

Function Documentation

◆ AVFILTER_DEFINE_CLASS()

AVFILTER_DEFINE_CLASS ( rubberband  )

◆ uninit()

static av_cold void uninit ( AVFilterContext ctx)
static

Definition at line 83 of file af_rubberband.c.

◆ query_formats()

static int query_formats ( AVFilterContext ctx)
static

Definition at line 91 of file af_rubberband.c.

◆ filter_frame()

static int filter_frame ( AVFilterLink inlink,
AVFrame in 
)
static

Definition at line 121 of file af_rubberband.c.

Referenced by activate().

◆ config_input()

static int config_input ( AVFilterLink inlink)
static

Definition at line 154 of file af_rubberband.c.

◆ activate()

static int activate ( AVFilterContext ctx)
static

Definition at line 174 of file af_rubberband.c.

◆ process_command()

static int process_command ( AVFilterContext ctx,
const char *  cmd,
const char *  args,
char *  res,
int  res_len,
int  flags 
)
static

Definition at line 199 of file af_rubberband.c.

Variable Documentation

◆ rubberband_options

const AVOption rubberband_options[]
static

Definition at line 47 of file af_rubberband.c.

◆ rubberband_inputs

const AVFilterPad rubberband_inputs[]
static
Initial value:
= {
{
.name = "default",
.config_props = config_input,
},
{ NULL }
}

Definition at line 231 of file af_rubberband.c.

◆ rubberband_outputs

const AVFilterPad rubberband_outputs[]
static
Initial value:
= {
{
.name = "default",
},
{ NULL }
}

Definition at line 240 of file af_rubberband.c.

◆ ff_af_rubberband

AVFilter ff_af_rubberband
Initial value:
= {
.name = "rubberband",
.description = NULL_IF_CONFIG_SMALL("Apply time-stretching and pitch-shifting."),
.query_formats = query_formats,
.priv_size = sizeof(RubberBandContext),
.priv_class = &rubberband_class,
}

Definition at line 248 of file af_rubberband.c.

config_input
static int config_input(AVFilterLink *inlink)
Definition: af_rubberband.c:154
process_command
static int process_command(AVFilterContext *ctx, const char *cmd, const char *args, char *res, int res_len, int flags)
Definition: af_rubberband.c:199
RubberBandContext
Definition: af_rubberband.c:31
rubberband_inputs
static const AVFilterPad rubberband_inputs[]
Definition: af_rubberband.c:231
activate
static int activate(AVFilterContext *ctx)
Definition: af_rubberband.c:174
AVMEDIA_TYPE_AUDIO
@ AVMEDIA_TYPE_AUDIO
Definition: avutil.h:202
outputs
static const AVFilterPad outputs[]
Definition: af_acontrast.c:203
NULL
#define NULL
Definition: coverity.c:32
inputs
these buffered frames must be flushed immediately if a new input produces new the filter must not call request_frame to get more It must just process the frame or queue it The task of requesting more frames is left to the filter s request_frame method or the application If a filter has several inputs
Definition: filter_design.txt:243
NULL_IF_CONFIG_SMALL
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
Definition: internal.h:188
query_formats
static int query_formats(AVFilterContext *ctx)
Definition: af_rubberband.c:91
rubberband_outputs
static const AVFilterPad rubberband_outputs[]
Definition: af_rubberband.c:240
uninit
static av_cold void uninit(AVFilterContext *ctx)
Definition: af_rubberband.c:83