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

Go to the source code of this file.

Data Structures

struct  DCShiftContext
 

Macros

#define OFFSET(x)   offsetof(DCShiftContext, x)
 
#define A   AV_OPT_FLAG_AUDIO_PARAM|AV_OPT_FLAG_FILTERING_PARAM
 

Functions

 AVFILTER_DEFINE_CLASS (dcshift)
 
static av_cold int init (AVFilterContext *ctx)
 
static int filter_frame (AVFilterLink *inlink, AVFrame *in)
 

Variables

static const AVOption dcshift_options []
 
static const AVFilterPad dcshift_inputs []
 
static const AVFilterPad dcshift_outputs []
 
const AVFilter ff_af_dcshift
 

Macro Definition Documentation

◆ OFFSET

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

Definition at line 35 of file af_dcshift.c.

◆ A

Definition at line 36 of file af_dcshift.c.

Function Documentation

◆ AVFILTER_DEFINE_CLASS()

AVFILTER_DEFINE_CLASS ( dcshift  )

◆ init()

static av_cold int init ( AVFilterContext ctx)
static

Definition at line 46 of file af_dcshift.c.

◆ filter_frame()

static int filter_frame ( AVFilterLink inlink,
AVFrame in 
)
static

Definition at line 55 of file af_dcshift.c.

Variable Documentation

◆ dcshift_options

const AVOption dcshift_options[]
static
Initial value:
= {
{ "shift", "set DC shift", OFFSET(dcshift), AV_OPT_TYPE_DOUBLE, {.dbl=0}, -1, 1, A },
{ "limitergain", "set limiter gain", OFFSET(limitergain), AV_OPT_TYPE_DOUBLE, {.dbl=0}, 0, 1, A },
{ NULL }
}

Definition at line 38 of file af_dcshift.c.

◆ dcshift_inputs

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

Definition at line 117 of file af_dcshift.c.

◆ dcshift_outputs

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

Definition at line 125 of file af_dcshift.c.

◆ ff_af_dcshift

const AVFilter ff_af_dcshift
Initial value:
= {
.name = "dcshift",
.description = NULL_IF_CONFIG_SMALL("Apply a DC shift to the audio."),
.priv_size = sizeof(DCShiftContext),
.priv_class = &dcshift_class,
.init = init,
}

Definition at line 132 of file af_dcshift.c.

FILTER_SINGLE_SAMPLEFMT
#define FILTER_SINGLE_SAMPLEFMT(sample_fmt_)
Definition: internal.h:184
AV_SAMPLE_FMT_S32P
@ AV_SAMPLE_FMT_S32P
signed 32 bits, planar
Definition: samplefmt.h:68
OFFSET
#define OFFSET(x)
Definition: af_dcshift.c:35
dcshift_outputs
static const AVFilterPad dcshift_outputs[]
Definition: af_dcshift.c:125
AV_OPT_TYPE_DOUBLE
@ AV_OPT_TYPE_DOUBLE
Definition: opt.h:226
AVMEDIA_TYPE_AUDIO
@ AVMEDIA_TYPE_AUDIO
Definition: avutil.h:202
A
#define A
Definition: af_dcshift.c:36
FILTER_INPUTS
#define FILTER_INPUTS(array)
Definition: internal.h:191
NULL
#define NULL
Definition: coverity.c:32
init
static av_cold int init(AVFilterContext *ctx)
Definition: af_dcshift.c:46
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_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:130
filter_frame
static int filter_frame(AVFilterLink *inlink, AVFrame *in)
Definition: af_dcshift.c:55
FILTER_OUTPUTS
#define FILTER_OUTPUTS(array)
Definition: internal.h:192
dcshift_inputs
static const AVFilterPad dcshift_inputs[]
Definition: af_dcshift.c:117
DCShiftContext
Definition: af_dcshift.c:28