FFmpeg
Loading...
Searching...
No Matches
af_aecho.c File Reference
#include "libavutil/avassert.h"
#include "libavutil/avstring.h"
#include "libavutil/mem.h"
#include "libavutil/opt.h"
#include "libavutil/samplefmt.h"
#include "avfilter.h"
#include "audio.h"
#include "filters.h"

Go to the source code of this file.

Data Structures

struct  AudioEchoContext
 

Macros

#define OFFSET(x)
 
#define A   AV_OPT_FLAG_AUDIO_PARAM|AV_OPT_FLAG_FILTERING_PARAM
 
#define MOD(a, b)
 
#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_outputs []
 
const FFFilter ff_af_aecho
 

Macro Definition Documentation

◆ OFFSET

#define OFFSET ( x)
Value:

Definition at line 48 of file af_aecho.c.

◆ A

Definition at line 49 of file af_aecho.c.

◆ MOD

#define MOD ( a,
b )
Value:
(((a) >= (b)) ? (a) - (b) : (a))
int a
#define b
Definition input.c:43

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.

Referenced by set_tty_echo(), and term_init().

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 }
}
#define A(x)
Definition vpx_arith.h:28
#define NULL
Definition coverity.c:32
#define OFFSET(x)
@ AV_OPT_TYPE_FLOAT
Underlying C type is float.
Definition opt.h:270
@ AV_OPT_TYPE_STRING
Underlying C type is a uint8_t* that is either NULL or points to a C string allocated with the av_mal...
Definition opt.h:275

Definition at line 51 of file af_aecho.c.

◆ aecho_outputs

const AVFilterPad aecho_outputs[]
static
Initial value:
= {
{
.name = "default",
.config_props = config_output,
},
}
@ AVMEDIA_TYPE_AUDIO
Definition avutil.h:201
static int config_output(AVBitStreamFilterLink *outlink)

Definition at line 331 of file af_aecho.c.

◆ ff_af_aecho

const FFFilter ff_af_aecho
Initial value:
= {
.p.name = "aecho",
.p.description = NULL_IF_CONFIG_SMALL("Add echoing to the audio."),
.p.priv_class = &aecho_class,
.priv_size = sizeof(AudioEchoContext),
.init = init,
}
static const AVFilterPad aecho_outputs[]
Definition af_aecho.c:331
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
int(* init)(AVBSFContext *ctx)
Definition dts2pts.c:608
@ AV_SAMPLE_FMT_FLTP
float, planar
Definition samplefmt.h:66
@ AV_SAMPLE_FMT_S16P
signed 16 bits, planar
Definition samplefmt.h:64
@ AV_SAMPLE_FMT_S32P
signed 32 bits, planar
Definition samplefmt.h:65
@ AV_SAMPLE_FMT_DBLP
double, planar
Definition samplefmt.h:67
static av_cold void uninit(AVBitStreamFilterContext *ctx)
static int activate(AVBitStreamFilterContext *ctx)
#define FILTER_INPUTS(array)
Definition filters.h:264
#define FILTER_OUTPUTS(array)
Definition filters.h:265
#define FILTER_SAMPLEFMTS(...)
Definition filters.h:252
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
Definition internal.h:88

Definition at line 339 of file af_aecho.c.