All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
af_aresample.c File Reference

resampling audio filter More...

#include "libavutil/avstring.h"
#include "libavutil/channel_layout.h"
#include "libavutil/opt.h"
#include "libavutil/samplefmt.h"
#include "libavutil/avassert.h"
#include "libswresample/swresample.h"
#include "avfilter.h"
#include "audio.h"
#include "internal.h"

Go to the source code of this file.

Data Structures

struct  AResampleContext


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


static av_cold int init_dict (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 filter_frame (AVFilterLink *inlink, AVFrame *insamplesref)
static int flush_frame (AVFilterLink *outlink, int final, AVFrame **outsamplesref_ret)
static int request_frame (AVFilterLink *outlink)
static const AVClassresample_child_class_next (const AVClass *prev)
static voidresample_child_next (void *obj, void *prev)


static const AVOption options []
static const AVClass aresample_class
static const AVFilterPad aresample_inputs []
static const AVFilterPad aresample_outputs []
AVFilter ff_af_aresample

Detailed Description

resampling audio filter

Definition in file af_aresample.c.

Macro Definition Documentation

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

Definition at line 315 of file af_aresample.c.

Definition at line 316 of file af_aresample.c.

Function Documentation

static av_cold int init_dict ( AVFilterContext ctx,
AVDictionary **  opts 

Definition at line 47 of file af_aresample.c.

static av_cold void uninit ( AVFilterContext ctx)

Definition at line 74 of file af_aresample.c.

static int query_formats ( AVFilterContext ctx)

Definition at line 80 of file af_aresample.c.

static int config_output ( AVFilterLink outlink)

Definition at line 143 of file af_aresample.c.

static int filter_frame ( AVFilterLink inlink,
AVFrame insamplesref 

Definition at line 188 of file af_aresample.c.

static int flush_frame ( AVFilterLink outlink,
int  final,
AVFrame **  outsamplesref_ret 

Definition at line 239 of file af_aresample.c.

Referenced by request_frame().

static int request_frame ( AVFilterLink outlink)

Definition at line 270 of file af_aresample.c.

static const AVClass* resample_child_class_next ( const AVClass prev)

Definition at line 304 of file af_aresample.c.

static void* resample_child_next ( void obj,
void prev 

Definition at line 309 of file af_aresample.c.

Variable Documentation

const AVOption options[]
Initial value:
= {
{"sample_rate", NULL, OFFSET(sample_rate_arg), AV_OPT_TYPE_INT, {.i64=0}, 0, INT_MAX, FLAGS },
#define NULL
Definition: coverity.c:32
#define FLAGS
Definition: af_aresample.c:316
#define OFFSET(x)
Definition: af_aresample.c:315

Definition at line 318 of file af_aresample.c.

const AVClass aresample_class
Initial value:
= {
.class_name = "aresample",
.item_name = av_default_item_name,
.option = options,
.child_class_next = resample_child_class_next,
Definition: version.h:62
static const AVOption options[]
Definition: af_aresample.c:318
static void * resample_child_next(void *obj, void *prev)
Definition: af_aresample.c:309
static const AVClass * resample_child_class_next(const AVClass *prev)
Definition: af_aresample.c:304
void *(* child_next)(void *obj, void *prev)
Return next AVOptions-enabled child or NULL.
Definition: log.h:113

Definition at line 323 of file af_aresample.c.

const AVFilterPad aresample_inputs[]
Initial value:
= {
.name = "default",
.filter_frame = filter_frame,
{ NULL }
#define NULL
Definition: coverity.c:32
static int filter_frame(AVFilterLink *inlink, AVFrame *insamplesref)
Definition: af_aresample.c:188

Definition at line 332 of file af_aresample.c.

const AVFilterPad aresample_outputs[]
Initial value:
= {
.name = "default",
.config_props = config_output,
.request_frame = request_frame,
{ NULL }
#define NULL
Definition: coverity.c:32
static int request_frame(AVFilterLink *outlink)
Definition: af_aresample.c:270
static int config_output(AVFilterLink *outlink)
Definition: af_aresample.c:143

Definition at line 341 of file af_aresample.c.

AVFilter ff_af_aresample
Initial value:
= {
.name = "aresample",
.description = NULL_IF_CONFIG_SMALL("Resample audio data."),
.init_dict = init_dict,
.uninit = uninit,
.query_formats = query_formats,
.priv_size = sizeof(AResampleContext),
.priv_class = &aresample_class,
static const AVFilterPad aresample_inputs[]
Definition: af_aresample.c:332
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:175
static const AVClass aresample_class
Definition: af_aresample.c:323
static av_cold int init_dict(AVFilterContext *ctx, AVDictionary **opts)
Definition: af_aresample.c:47
static av_cold void uninit(AVFilterContext *ctx)
Definition: af_aresample.c:74
static const AVFilterPad outputs[]
Definition: af_agate.c:221
static const AVFilterPad aresample_outputs[]
Definition: af_aresample.c:341
static const AVFilterPad inputs[]
Definition: af_agate.c:211
static int query_formats(AVFilterContext *ctx)
Definition: af_aresample.c:80

Definition at line 351 of file af_aresample.c.