FFmpeg
Data Structures | Macros | Functions | Variables
asrc_afdelaysrc.c File Reference
#include "libavutil/channel_layout.h"
#include "libavutil/opt.h"
#include "audio.h"
#include "avfilter.h"
#include "filters.h"
#include "formats.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 float sincf (float x)
 
static int activate (AVFilterContext *ctx)
 
static int query_formats (AVFilterContext *ctx)
 
static int config_output (AVFilterLink *outlink)
 
 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 123 of file asrc_afdelaysrc.c.

◆ OFFSET

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

Definition at line 124 of file asrc_afdelaysrc.c.

Function Documentation

◆ sincf()

static float sincf ( float  x)
static

Definition at line 42 of file asrc_afdelaysrc.c.

Referenced by activate().

◆ activate()

static int activate ( AVFilterContext ctx)
static

Definition at line 49 of file asrc_afdelaysrc.c.

◆ query_formats()

static int query_formats ( AVFilterContext ctx)
static

Definition at line 84 of file asrc_afdelaysrc.c.

◆ config_output()

static int config_output ( AVFilterLink outlink)
static

Definition at line 102 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 115 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), AV_OPT_TYPE_CHLAYOUT,{.str="stereo"},0, 0, AF },
{ "c", "set channel layout", OFFSET(chlayout), AV_OPT_TYPE_CHLAYOUT,{.str="stereo"},0, 0, AF },
{ NULL }
}

Definition at line 126 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,
}

Definition at line 142 of file asrc_afdelaysrc.c.

config_output
static int config_output(AVFilterLink *outlink)
Definition: asrc_afdelaysrc.c:102
query_formats
static int query_formats(AVFilterContext *ctx)
Definition: asrc_afdelaysrc.c:84
FILTER_QUERY_FUNC
#define FILTER_QUERY_FUNC(func)
Definition: internal.h:159
sample_rate
sample_rate
Definition: ffmpeg_filter.c:424
AF
#define AF
Definition: asrc_afdelaysrc.c:123
afdelaysrc_outputs
static const AVFilterPad afdelaysrc_outputs[]
Definition: asrc_afdelaysrc.c:115
AFDelaySrcContext
Definition: asrc_afdelaysrc.c:30
AV_OPT_TYPE_DOUBLE
@ AV_OPT_TYPE_DOUBLE
Definition: opt.h:247
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
AV_OPT_TYPE_CHLAYOUT
@ AV_OPT_TYPE_CHLAYOUT
Definition: opt.h:262
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:94
activate
static int activate(AVFilterContext *ctx)
Definition: asrc_afdelaysrc.c:49
OFFSET
#define OFFSET(x)
Definition: asrc_afdelaysrc.c:124
AV_OPT_TYPE_INT
@ AV_OPT_TYPE_INT
Definition: opt.h:245
FILTER_OUTPUTS
#define FILTER_OUTPUTS(array)
Definition: internal.h:183