FFmpeg
Data Structures | Macros | Functions | Variables
af_aecho.c File Reference
#include "libavutil/avassert.h"
#include "libavutil/avstring.h"
#include "libavutil/opt.h"
#include "libavutil/samplefmt.h"
#include "avfilter.h"
#include "audio.h"
#include "filters.h"
#include "internal.h"

Go to the source code of this file.

Data Structures

struct  AudioEchoContext
 

Macros

#define OFFSET(x)   offsetof(AudioEchoContext, x)
 
#define A   AV_OPT_FLAG_AUDIO_PARAM|AV_OPT_FLAG_FILTERING_PARAM
 
#define MOD(a, b)   (((a) >= (b)) ? (a) - (b) : (a))
 
#define ECHO(name, type, min, max)
 

Functions

 AVFILTER_DEFINE_CLASS (aecho)
 
static void count_items (char *item_str, int *nb_items)
 
static void fill_items (char *item_str, int *nb_items, float *items)
 
static av_cold void uninit (AVFilterContext *ctx)
 
static av_cold int init (AVFilterContext *ctx)
 
static int config_output (AVFilterLink *outlink)
 
static int filter_frame (AVFilterLink *inlink, AVFrame *frame)
 
static int request_frame (AVFilterLink *outlink)
 
static int activate (AVFilterContext *ctx)
 

Variables

static const AVOption aecho_options []
 
static const AVFilterPad aecho_inputs []
 
static const AVFilterPad aecho_outputs []
 
const AVFilter ff_af_aecho
 

Macro Definition Documentation

◆ OFFSET

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

Definition at line 48 of file af_aecho.c.

◆ A

Definition at line 49 of file af_aecho.c.

◆ MOD

#define MOD (   a,
  b 
)    (((a) >= (b)) ? (a) - (b) : (a))

Definition at line 155 of file af_aecho.c.

◆ ECHO

#define ECHO (   name,
  type,
  min,
  max 
)

Definition at line 157 of file af_aecho.c.

Function Documentation

◆ AVFILTER_DEFINE_CLASS()

AVFILTER_DEFINE_CLASS ( aecho  )

◆ count_items()

static void count_items ( char *  item_str,
int nb_items 
)
static

Definition at line 61 of file af_aecho.c.

Referenced by init().

◆ fill_items()

static void fill_items ( char *  item_str,
int nb_items,
float *  items 
)
static

Definition at line 73 of file af_aecho.c.

Referenced by init().

◆ uninit()

static av_cold void uninit ( AVFilterContext ctx)
static

Definition at line 89 of file af_aecho.c.

◆ init()

static av_cold int init ( AVFilterContext ctx)
static

Definition at line 102 of file af_aecho.c.

◆ config_output()

static int config_output ( AVFilterLink outlink)
static

Definition at line 203 of file af_aecho.c.

◆ filter_frame()

static int filter_frame ( AVFilterLink inlink,
AVFrame frame 
)
static

Definition at line 244 of file af_aecho.c.

Referenced by activate().

◆ request_frame()

static int request_frame ( AVFilterLink outlink)
static

Definition at line 272 of file af_aecho.c.

Referenced by activate(), and ff_request_frame().

◆ activate()

static int activate ( AVFilterContext ctx)
static

Definition at line 298 of file af_aecho.c.

Variable Documentation

◆ aecho_options

const AVOption aecho_options[]
static
Initial value:
= {
{ "in_gain", "set signal input gain", OFFSET(in_gain), AV_OPT_TYPE_FLOAT, {.dbl=0.6}, 0, 1, A },
{ "out_gain", "set signal output gain", OFFSET(out_gain), AV_OPT_TYPE_FLOAT, {.dbl=0.3}, 0, 1, A },
{ "delays", "set list of signal delays", OFFSET(delays), AV_OPT_TYPE_STRING, {.str="1000"}, 0, 0, A },
{ "decays", "set list of signal decays", OFFSET(decays), AV_OPT_TYPE_STRING, {.str="0.5"}, 0, 0, A },
{ NULL }
}

Definition at line 51 of file af_aecho.c.

◆ aecho_inputs

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

Definition at line 331 of file af_aecho.c.

◆ aecho_outputs

const AVFilterPad aecho_outputs[]
static
Initial value:
= {
{
.name = "default",
.config_props = config_output,
},
}

Definition at line 338 of file af_aecho.c.

◆ ff_af_aecho

const AVFilter ff_af_aecho
Initial value:
= {
.name = "aecho",
.description = NULL_IF_CONFIG_SMALL("Add echoing to the audio."),
.priv_size = sizeof(AudioEchoContext),
.priv_class = &aecho_class,
.init = init,
}

Definition at line 346 of file af_aecho.c.

aecho_outputs
static const AVFilterPad aecho_outputs[]
Definition: af_aecho.c:338
AV_SAMPLE_FMT_FLTP
@ AV_SAMPLE_FMT_FLTP
float, planar
Definition: samplefmt.h:69
OFFSET
#define OFFSET(x)
Definition: af_aecho.c:48
AV_SAMPLE_FMT_S32P
@ AV_SAMPLE_FMT_S32P
signed 32 bits, planar
Definition: samplefmt.h:68
init
static av_cold int init(AVFilterContext *ctx)
Definition: af_aecho.c:102
config_output
static int config_output(AVFilterLink *outlink)
Definition: af_aecho.c:203
A
#define A
Definition: af_aecho.c:49
uninit
static av_cold void uninit(AVFilterContext *ctx)
Definition: af_aecho.c:89
AVMEDIA_TYPE_AUDIO
@ AVMEDIA_TYPE_AUDIO
Definition: avutil.h:202
aecho_inputs
static const AVFilterPad aecho_inputs[]
Definition: af_aecho.c:331
FILTER_INPUTS
#define FILTER_INPUTS(array)
Definition: internal.h:191
NULL
#define NULL
Definition: coverity.c:32
AudioEchoContext
Definition: af_aecho.c:30
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
AV_SAMPLE_FMT_S16P
@ AV_SAMPLE_FMT_S16P
signed 16 bits, planar
Definition: samplefmt.h:67
AV_OPT_TYPE_FLOAT
@ AV_OPT_TYPE_FLOAT
Definition: opt.h:227
AV_SAMPLE_FMT_DBLP
@ AV_SAMPLE_FMT_DBLP
double, planar
Definition: samplefmt.h:70
activate
static int activate(AVFilterContext *ctx)
Definition: af_aecho.c:298
FILTER_OUTPUTS
#define FILTER_OUTPUTS(array)
Definition: internal.h:192
AV_OPT_TYPE_STRING
@ AV_OPT_TYPE_STRING
Definition: opt.h:228
FILTER_SAMPLEFMTS
#define FILTER_SAMPLEFMTS(...)
Definition: internal.h:179