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 "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 124 of file asrc_afdelaysrc.c.

◆ OFFSET

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

Definition at line 125 of file asrc_afdelaysrc.c.

Function Documentation

◆ sincf()

static float sincf ( float  x)
static

Definition at line 43 of file asrc_afdelaysrc.c.

Referenced by activate().

◆ activate()

static int activate ( AVFilterContext ctx)
static

Definition at line 50 of file asrc_afdelaysrc.c.

◆ query_formats()

static int query_formats ( AVFilterContext ctx)
static

Definition at line 85 of file asrc_afdelaysrc.c.

◆ config_output()

static int config_output ( AVFilterLink outlink)
static

Definition at line 103 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 116 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 127 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 143 of file asrc_afdelaysrc.c.

config_output
static int config_output(AVFilterLink *outlink)
Definition: asrc_afdelaysrc.c:103
query_formats
static int query_formats(AVFilterContext *ctx)
Definition: asrc_afdelaysrc.c:85
FILTER_QUERY_FUNC
#define FILTER_QUERY_FUNC(func)
Definition: internal.h:159
sample_rate
sample_rate
Definition: ffmpeg_filter.c:410
AF
#define AF
Definition: asrc_afdelaysrc.c:124
afdelaysrc_outputs
static const AVFilterPad afdelaysrc_outputs[]
Definition: asrc_afdelaysrc.c:116
AFDelaySrcContext
Definition: asrc_afdelaysrc.c:31
AV_OPT_TYPE_DOUBLE
@ AV_OPT_TYPE_DOUBLE
Definition: opt.h:237
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:252
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:106
activate
static int activate(AVFilterContext *ctx)
Definition: asrc_afdelaysrc.c:50
OFFSET
#define OFFSET(x)
Definition: asrc_afdelaysrc.c:125
AV_OPT_TYPE_INT
@ AV_OPT_TYPE_INT
Definition: opt.h:235
FILTER_OUTPUTS
#define FILTER_OUTPUTS(array)
Definition: internal.h:183