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 query_formats (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 []
 
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.

◆ query_formats()

static int query_formats ( AVFilterContext ctx)
static

Definition at line 55 of file af_dcshift.c.

◆ filter_frame()

static int filter_frame ( AVFilterLink inlink,
AVFrame in 
)
static

Definition at line 84 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,
},
{ NULL }
}

Definition at line 146 of file af_dcshift.c.

◆ dcshift_outputs

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

Definition at line 155 of file af_dcshift.c.

◆ ff_af_dcshift

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

Definition at line 163 of file af_dcshift.c.

OFFSET
#define OFFSET(x)
Definition: af_dcshift.c:35
dcshift_outputs
static const AVFilterPad dcshift_outputs[]
Definition: af_dcshift.c:155
AV_OPT_TYPE_DOUBLE
@ AV_OPT_TYPE_DOUBLE
Definition: opt.h:225
AVMEDIA_TYPE_AUDIO
@ AVMEDIA_TYPE_AUDIO
Definition: avutil.h:202
outputs
static const AVFilterPad outputs[]
Definition: af_acontrast.c:203
A
#define A
Definition: af_dcshift.c:36
NULL
#define NULL
Definition: coverity.c:32
inputs
these buffered frames must be flushed immediately if a new input produces new the filter must not call request_frame to get more It must just process the frame or queue it The task of requesting more frames is left to the filter s request_frame method or the application If a filter has several inputs
Definition: filter_design.txt:243
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:188
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:125
query_formats
static int query_formats(AVFilterContext *ctx)
Definition: af_dcshift.c:55
filter_frame
static int filter_frame(AVFilterLink *inlink, AVFrame *in)
Definition: af_dcshift.c:84
flags
#define flags(name, subs,...)
Definition: cbs_av1.c:565
dcshift_inputs
static const AVFilterPad dcshift_inputs[]
Definition: af_dcshift.c:146
DCShiftContext
Definition: af_dcshift.c:28