FFmpeg
Data Structures | Macros | Functions | Variables
af_vibrato.c File Reference
#include "libavutil/mem.h"
#include "libavutil/opt.h"
#include "avfilter.h"
#include "filters.h"
#include "audio.h"
#include "generate_wave_table.h"

Go to the source code of this file.

Data Structures

struct  VibratoContext
 

Macros

#define OFFSET(x)   offsetof(VibratoContext, x)
 
#define FLAGS   AV_OPT_FLAG_AUDIO_PARAM|AV_OPT_FLAG_FILTERING_PARAM
 

Functions

 AVFILTER_DEFINE_CLASS (vibrato)
 
static int filter_frame (AVFilterLink *inlink, AVFrame *in)
 
static av_cold void uninit (AVFilterContext *ctx)
 
static int config_input (AVFilterLink *inlink)
 

Variables

static const AVOption vibrato_options []
 
static const AVFilterPad avfilter_af_vibrato_inputs []
 
const AVFilter ff_af_vibrato
 

Macro Definition Documentation

◆ OFFSET

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

Definition at line 43 of file af_vibrato.c.

◆ FLAGS

Definition at line 44 of file af_vibrato.c.

Function Documentation

◆ AVFILTER_DEFINE_CLASS()

AVFILTER_DEFINE_CLASS ( vibrato  )

◆ filter_frame()

static int filter_frame ( AVFilterLink inlink,
AVFrame in 
)
static

Definition at line 54 of file af_vibrato.c.

◆ uninit()

static av_cold void uninit ( AVFilterContext ctx)
static

Definition at line 121 of file af_vibrato.c.

◆ config_input()

static int config_input ( AVFilterLink inlink)
static

Definition at line 132 of file af_vibrato.c.

Variable Documentation

◆ vibrato_options

const AVOption vibrato_options[]
static
Initial value:
= {
{ "f", "set frequency in hertz", OFFSET(freq), AV_OPT_TYPE_DOUBLE, {.dbl = 5.0}, 0.1, 20000.0, FLAGS },
{ "d", "set depth as percentage", OFFSET(depth), AV_OPT_TYPE_DOUBLE, {.dbl = 0.5}, 0.00, 1.0, FLAGS },
{ NULL }
}

Definition at line 46 of file af_vibrato.c.

◆ avfilter_af_vibrato_inputs

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

Definition at line 160 of file af_vibrato.c.

◆ ff_af_vibrato

const AVFilter ff_af_vibrato
Initial value:
= {
.name = "vibrato",
.description = NULL_IF_CONFIG_SMALL("Apply vibrato effect."),
.priv_size = sizeof(VibratoContext),
.priv_class = &vibrato_class,
}

Definition at line 169 of file af_vibrato.c.

FILTER_INPUTS
#define FILTER_INPUTS(array)
Definition: filters.h:262
VibratoContext
Definition: af_vibrato.c:28
filter_frame
static int filter_frame(AVFilterLink *inlink, AVFrame *in)
Definition: af_vibrato.c:54
uninit
static av_cold void uninit(AVFilterContext *ctx)
Definition: af_vibrato.c:121
avfilter_af_vibrato_inputs
static const AVFilterPad avfilter_af_vibrato_inputs[]
Definition: af_vibrato.c:160
AV_OPT_TYPE_DOUBLE
@ AV_OPT_TYPE_DOUBLE
Underlying C type is double.
Definition: opt.h:267
AVMEDIA_TYPE_AUDIO
@ AVMEDIA_TYPE_AUDIO
Definition: avutil.h:202
FILTER_OUTPUTS
#define FILTER_OUTPUTS(array)
Definition: filters.h:263
NULL
#define NULL
Definition: coverity.c:32
config_input
static int config_input(AVFilterLink *inlink)
Definition: af_vibrato.c:132
ff_audio_default_filterpad
const AVFilterPad ff_audio_default_filterpad[1]
An AVFilterPad array whose only entry has name "default" and is of type AVMEDIA_TYPE_AUDIO.
Definition: audio.c:34
FLAGS
#define FLAGS
Definition: af_vibrato.c:44
FILTER_SINGLE_SAMPLEFMT
#define FILTER_SINGLE_SAMPLEFMT(sample_fmt_)
Definition: filters.h:255
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:94
AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC
#define AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC
Some filters support a generic "enable" expression option that can be used to enable or disable a fil...
Definition: avfilter.h:182
AV_SAMPLE_FMT_DBLP
@ AV_SAMPLE_FMT_DBLP
double, planar
Definition: samplefmt.h:67
OFFSET
#define OFFSET(x)
Definition: af_vibrato.c:43