FFmpeg
Data Structures | Macros | Functions | Variables
af_tremolo.c File Reference
#include "libavutil/mem.h"
#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 36 of file af_tremolo.c.

◆ FLAGS

Definition at line 37 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 47 of file af_tremolo.c.

◆ uninit()

static av_cold void uninit ( AVFilterContext ctx)
static

Definition at line 87 of file af_tremolo.c.

◆ config_input()

static int config_input ( AVFilterLink inlink)
static

Definition at line 93 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 39 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 116 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 125 of file af_tremolo.c.

FLAGS
#define FLAGS
Definition: af_tremolo.c:37
FILTER_SINGLE_SAMPLEFMT
#define FILTER_SINGLE_SAMPLEFMT(sample_fmt_)
Definition: internal.h:175
TremoloContext
Definition: af_tremolo.c:27
OFFSET
#define OFFSET(x)
Definition: af_tremolo.c:36
filter_frame
static int filter_frame(AVFilterLink *inlink, AVFrame *in)
Definition: af_tremolo.c:47
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:116
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:94
config_input
static int config_input(AVFilterLink *inlink)
Definition: af_tremolo.c:93
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:87
FILTER_OUTPUTS
#define FILTER_OUTPUTS(array)
Definition: internal.h:183
AV_SAMPLE_FMT_DBL
@ AV_SAMPLE_FMT_DBL
double
Definition: samplefmt.h:61