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

Go to the source code of this file.

Data Structures

struct  AFDelaySrcContext
 

Macros

#define AF   AV_OPT_FLAG_AUDIO_PARAM|AV_OPT_FLAG_FILTERING_PARAM
 
#define OFFSET(x)   offsetof(AFDelaySrcContext, x)
 

Functions

static av_cold int init (AVFilterContext *ctx)
 
static float sincf (float x)
 
static int activate (AVFilterContext *ctx)
 
static int query_formats (AVFilterContext *ctx)
 
static int config_output (AVFilterLink *outlink)
 
static av_cold void uninit (AVFilterContext *ctx)
 
 AVFILTER_DEFINE_CLASS (afdelaysrc)
 

Variables

static const AVFilterPad afdelaysrc_outputs []
 
static const AVOption afdelaysrc_options []
 
const AVFilter ff_asrc_afdelaysrc
 

Macro Definition Documentation

◆ AF

Definition at line 143 of file asrc_afdelaysrc.c.

◆ OFFSET

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

Definition at line 144 of file asrc_afdelaysrc.c.

Function Documentation

◆ init()

static av_cold int init ( AVFilterContext ctx)
static

Definition at line 43 of file asrc_afdelaysrc.c.

◆ sincf()

static float sincf ( float  x)
static

Definition at line 55 of file asrc_afdelaysrc.c.

Referenced by activate().

◆ activate()

static int activate ( AVFilterContext ctx)
static

Definition at line 62 of file asrc_afdelaysrc.c.

◆ query_formats()

static int query_formats ( AVFilterContext ctx)
static

Definition at line 97 of file asrc_afdelaysrc.c.

◆ config_output()

static int config_output ( AVFilterLink outlink)
static

Definition at line 115 of file asrc_afdelaysrc.c.

◆ uninit()

static av_cold void uninit ( AVFilterContext ctx)
static

Definition at line 136 of file asrc_afdelaysrc.c.

◆ AVFILTER_DEFINE_CLASS()

AVFILTER_DEFINE_CLASS ( afdelaysrc  )

Variable Documentation

◆ afdelaysrc_outputs

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

Definition at line 128 of file asrc_afdelaysrc.c.

◆ afdelaysrc_options

const AVOption afdelaysrc_options[]
static
Initial value:
= {
{ "delay", "set fractional delay", OFFSET(delay), AV_OPT_TYPE_DOUBLE,{.dbl=0}, 0, INT16_MAX, AF },
{ "d", "set fractional delay", OFFSET(delay), AV_OPT_TYPE_DOUBLE,{.dbl=0}, 0, INT16_MAX, AF },
{ "sample_rate", "set sample rate", OFFSET(sample_rate), AV_OPT_TYPE_INT, {.i64=44100}, 1, INT_MAX, AF },
{ "r", "set sample rate", OFFSET(sample_rate), AV_OPT_TYPE_INT, {.i64=44100}, 1, INT_MAX, AF },
{ "nb_samples", "set the number of samples per requested frame", OFFSET(nb_samples), AV_OPT_TYPE_INT, {.i64=1024}, 1, INT_MAX, AF },
{ "n", "set the number of samples per requested frame", OFFSET(nb_samples), AV_OPT_TYPE_INT, {.i64=1024}, 1, INT_MAX, AF },
{ "taps", "set number of taps for delay filter", OFFSET(nb_taps), AV_OPT_TYPE_INT, {.i64=0}, 0, 32768, AF },
{ "t", "set number of taps for delay filter", OFFSET(nb_taps), AV_OPT_TYPE_INT, {.i64=0}, 0, 32768, AF },
{ "channel_layout", "set channel layout", OFFSET(chlayout_str),AV_OPT_TYPE_STRING,{.str="stereo"},0, 0, AF },
{ "c", "set channel layout", OFFSET(chlayout_str),AV_OPT_TYPE_STRING,{.str="stereo"},0, 0, AF },
{ NULL }
}

Definition at line 146 of file asrc_afdelaysrc.c.

◆ ff_asrc_afdelaysrc

const AVFilter ff_asrc_afdelaysrc
Initial value:
= {
.name = "afdelaysrc",
.description = NULL_IF_CONFIG_SMALL("Generate a Fractional delay FIR coefficients."),
.priv_size = sizeof(AFDelaySrcContext),
.priv_class = &afdelaysrc_class,
.init = init,
}

Definition at line 162 of file asrc_afdelaysrc.c.

config_output
static int config_output(AVFilterLink *outlink)
Definition: asrc_afdelaysrc.c:115
query_formats
static int query_formats(AVFilterContext *ctx)
Definition: asrc_afdelaysrc.c:97
uninit
static av_cold void uninit(AVFilterContext *ctx)
Definition: asrc_afdelaysrc.c:136
FILTER_QUERY_FUNC
#define FILTER_QUERY_FUNC(func)
Definition: internal.h:171
sample_rate
sample_rate
Definition: ffmpeg_filter.c:156
AF
#define AF
Definition: asrc_afdelaysrc.c:143
afdelaysrc_outputs
static const AVFilterPad afdelaysrc_outputs[]
Definition: asrc_afdelaysrc.c:128
AFDelaySrcContext
Definition: asrc_afdelaysrc.c:30
AV_OPT_TYPE_DOUBLE
@ AV_OPT_TYPE_DOUBLE
Definition: opt.h:227
AVMEDIA_TYPE_AUDIO
@ AVMEDIA_TYPE_AUDIO
Definition: avutil.h:202
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
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:115
activate
static int activate(AVFilterContext *ctx)
Definition: asrc_afdelaysrc.c:62
init
static av_cold int init(AVFilterContext *ctx)
Definition: asrc_afdelaysrc.c:43
OFFSET
#define OFFSET(x)
Definition: asrc_afdelaysrc.c:144
AV_OPT_TYPE_INT
@ AV_OPT_TYPE_INT
Definition: opt.h:225
FILTER_OUTPUTS
#define FILTER_OUTPUTS(array)
Definition: internal.h:195
AV_OPT_TYPE_STRING
@ AV_OPT_TYPE_STRING
Definition: opt.h:229