FFmpeg
Data Structures | Macros | Functions | Variables
af_vibrato.c File Reference
#include "libavutil/opt.h"
#include "avfilter.h"
#include "internal.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 int query_formats (AVFilterContext *ctx)
 
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 []
 
static const AVFilterPad avfilter_af_vibrato_outputs []
 
const AVFilter ff_af_vibrato
 

Macro Definition Documentation

◆ OFFSET

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

Definition at line 42 of file af_vibrato.c.

◆ FLAGS

Definition at line 43 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 53 of file af_vibrato.c.

◆ query_formats()

static int query_formats ( AVFilterContext ctx)
static

Definition at line 114 of file af_vibrato.c.

◆ uninit()

static av_cold void uninit ( AVFilterContext ctx)
static

Definition at line 144 of file af_vibrato.c.

◆ config_input()

static int config_input ( AVFilterLink inlink)
static

Definition at line 155 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 45 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,
},
{ NULL }
}

Definition at line 183 of file af_vibrato.c.

◆ avfilter_af_vibrato_outputs

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

Definition at line 193 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 201 of file af_vibrato.c.

VibratoContext
Definition: af_vibrato.c:27
filter_frame
static int filter_frame(AVFilterLink *inlink, AVFrame *in)
Definition: af_vibrato.c:53
uninit
static av_cold void uninit(AVFilterContext *ctx)
Definition: af_vibrato.c:144
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
avfilter_af_vibrato_inputs
static const AVFilterPad avfilter_af_vibrato_inputs[]
Definition: af_vibrato.c:183
AV_OPT_TYPE_DOUBLE
@ AV_OPT_TYPE_DOUBLE
Definition: opt.h:227
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
config_input
static int config_input(AVFilterLink *inlink)
Definition: af_vibrato.c:155
FLAGS
#define FLAGS
Definition: af_vibrato.c:43
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:117
avfilter_af_vibrato_outputs
static const AVFilterPad avfilter_af_vibrato_outputs[]
Definition: af_vibrato.c:193
query_formats
static int query_formats(AVFilterContext *ctx)
Definition: af_vibrato.c:114
OFFSET
#define OFFSET(x)
Definition: af_vibrato.c:42