FFmpeg
Data Structures | Macros | Functions | Variables
af_tremolo.c File Reference
#include "libavutil/opt.h"
#include "avfilter.h"
#include "internal.h"
#include "audio.h"

Go to the source code of this file.

Data Structures

struct  TremoloContext
 

Macros

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

Functions

 AVFILTER_DEFINE_CLASS (tremolo)
 
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 tremolo_options []
 
static const AVFilterPad avfilter_af_tremolo_inputs []
 
const AVFilter ff_af_tremolo
 

Macro Definition Documentation

◆ OFFSET

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

Definition at line 35 of file af_tremolo.c.

◆ FLAGS

Definition at line 36 of file af_tremolo.c.

Function Documentation

◆ AVFILTER_DEFINE_CLASS()

AVFILTER_DEFINE_CLASS ( tremolo  )

◆ filter_frame()

static int filter_frame ( AVFilterLink inlink,
AVFrame in 
)
static

Definition at line 46 of file af_tremolo.c.

◆ uninit()

static av_cold void uninit ( AVFilterContext ctx)
static

Definition at line 86 of file af_tremolo.c.

◆ config_input()

static int config_input ( AVFilterLink inlink)
static

Definition at line 92 of file af_tremolo.c.

Variable Documentation

◆ tremolo_options

const AVOption tremolo_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.0, 1.0, FLAGS },
{ NULL }
}

Definition at line 38 of file af_tremolo.c.

◆ avfilter_af_tremolo_inputs

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

Definition at line 115 of file af_tremolo.c.

◆ ff_af_tremolo

const AVFilter ff_af_tremolo
Initial value:
= {
.name = "tremolo",
.description = NULL_IF_CONFIG_SMALL("Apply tremolo effect."),
.priv_size = sizeof(TremoloContext),
.priv_class = &tremolo_class,
}

Definition at line 124 of file af_tremolo.c.

FLAGS
#define FLAGS
Definition: af_tremolo.c:36
FILTER_SINGLE_SAMPLEFMT
#define FILTER_SINGLE_SAMPLEFMT(sample_fmt_)
Definition: internal.h:175
TremoloContext
Definition: af_tremolo.c:26
OFFSET
#define OFFSET(x)
Definition: af_tremolo.c:35
filter_frame
static int filter_frame(AVFilterLink *inlink, AVFrame *in)
Definition: af_tremolo.c:46
AV_OPT_TYPE_DOUBLE
@ AV_OPT_TYPE_DOUBLE
Definition: opt.h:237
AVMEDIA_TYPE_AUDIO
@ AVMEDIA_TYPE_AUDIO
Definition: avutil.h:202
FILTER_INPUTS
#define FILTER_INPUTS(array)
Definition: internal.h:182
avfilter_af_tremolo_inputs
static const AVFilterPad avfilter_af_tremolo_inputs[]
Definition: af_tremolo.c:115
NULL
#define NULL
Definition: coverity.c:32
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:33
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:106
config_input
static int config_input(AVFilterLink *inlink)
Definition: af_tremolo.c:92
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:147
uninit
static av_cold void uninit(AVFilterContext *ctx)
Definition: af_tremolo.c:86
FILTER_OUTPUTS
#define FILTER_OUTPUTS(array)
Definition: internal.h:183
AV_SAMPLE_FMT_DBL
@ AV_SAMPLE_FMT_DBL
double
Definition: samplefmt.h:61