FFmpeg
Data Structures | Functions | Variables
af_resample.c File Reference
#include "libavutil/avassert.h"
#include "libavutil/avstring.h"
#include "libavutil/common.h"
#include "libavutil/dict.h"
#include "libavutil/mathematics.h"
#include "libavutil/opt.h"
#include "libavresample/avresample.h"
#include "audio.h"
#include "avfilter.h"
#include "formats.h"
#include "internal.h"

Go to the source code of this file.

Data Structures

struct  resample_init_func
 

Functions

static av_cold int init (AVFilterContext *ctx, AVDictionary **opts)
 
static av_cold void uninit (AVFilterContext *ctx)
 
static int query_formats (AVFilterContext *ctx)
 
static int config_output (AVFilterLink *outlink)
 
static int request_frame (AVFilterLink *outlink)
 
static int filter_frame (AVFilterLink *inlink, AVFrame *in)
 
static const AVClassresample_child_class_iterate (void **iter)
 
static void * resample_child_next (void *obj, void *prev)
 

Variables

static const AVClass resample_class
 
static const AVFilterPad avfilter_af_resample_inputs []
 
static const AVFilterPad avfilter_af_resample_outputs []
 
AVFilter ff_af_resample
 

Detailed Description

sample format and channel layout conversion audio filter

Definition in file af_resample.c.

Function Documentation

◆ init()

static av_cold int init ( AVFilterContext ctx,
AVDictionary **  opts 
)
static

Definition at line 51 of file af_resample.c.

◆ uninit()

static av_cold void uninit ( AVFilterContext ctx)
static

Definition at line 78 of file af_resample.c.

◆ query_formats()

static int query_formats ( AVFilterContext ctx)
static

Definition at line 89 of file af_resample.c.

◆ config_output()

static int config_output ( AVFilterLink outlink)
static

Definition at line 116 of file af_resample.c.

◆ request_frame()

static int request_frame ( AVFilterLink outlink)
static

Definition at line 186 of file af_resample.c.

◆ filter_frame()

static int filter_frame ( AVFilterLink inlink,
AVFrame in 
)
static

Definition at line 223 of file af_resample.c.

◆ resample_child_class_iterate()

static const AVClass* resample_child_class_iterate ( void **  iter)
static

Definition at line 316 of file af_resample.c.

◆ resample_child_next()

static void* resample_child_next ( void *  obj,
void *  prev 
)
static

Definition at line 323 of file af_resample.c.

Variable Documentation

◆ resample_class

const AVClass resample_class
static
Initial value:
= {
.class_name = "resample",
.item_name = av_default_item_name,
.child_class_iterate = resample_child_class_iterate,
}

Definition at line 329 of file af_resample.c.

◆ avfilter_af_resample_inputs

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

Definition at line 340 of file af_resample.c.

◆ avfilter_af_resample_outputs

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

Definition at line 349 of file af_resample.c.

◆ ff_af_resample

AVFilter ff_af_resample
Initial value:
= {
.name = "resample",
.description = NULL_IF_CONFIG_SMALL("Audio resampling and conversion."),
.priv_size = sizeof(ResampleContext),
.priv_class = &resample_class,
}

Definition at line 359 of file af_resample.c.

init
static av_cold int init(AVFilterContext *ctx, AVDictionary **opts)
Definition: af_resample.c:51
resample_class
static const AVClass resample_class
Definition: af_resample.c:329
query_formats
static int query_formats(AVFilterContext *ctx)
Definition: af_resample.c:89
config_output
static int config_output(AVFilterLink *outlink)
Definition: af_resample.c:116
resample_child_next
static void * resample_child_next(void *obj, void *prev)
Definition: af_resample.c:323
filter_frame
static int filter_frame(AVFilterLink *inlink, AVFrame *in)
Definition: af_resample.c:223
request_frame
static int request_frame(AVFilterLink *outlink)
Definition: af_resample.c:186
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
ResampleContext
Definition: af_resample.c:38
AVMEDIA_TYPE_AUDIO
@ AVMEDIA_TYPE_AUDIO
Definition: avutil.h:202
outputs
static const AVFilterPad outputs[]
Definition: af_acontrast.c:203
LIBAVUTIL_VERSION_INT
#define LIBAVUTIL_VERSION_INT
Definition: version.h:85
NULL
#define NULL
Definition: coverity.c:32
init_dict
static av_cold int init_dict(AVFilterContext *ctx, AVDictionary **opts)
Definition: af_aresample.c:46
av_default_item_name
const char * av_default_item_name(void *ptr)
Return the context name.
Definition: log.c:235
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
AVClass::child_next
void *(* child_next)(void *obj, void *prev)
Return next AVOptions-enabled child or NULL.
Definition: log.h:113
avfilter_af_resample_inputs
static const AVFilterPad avfilter_af_resample_inputs[]
Definition: af_resample.c:340
avfilter_af_resample_outputs
static const AVFilterPad avfilter_af_resample_outputs[]
Definition: af_resample.c:349
uninit
static av_cold void uninit(AVFilterContext *ctx)
Definition: af_resample.c:78
resample_child_class_iterate
static const AVClass * resample_child_class_iterate(void **iter)
Definition: af_resample.c:316