FFmpeg
 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
 

Macros

#define OFFSET(x)   offsetof(AResampleContext, x)
 
#define FLAGS   AV_OPT_FLAG_AUDIO_PARAM|AV_OPT_FLAG_FILTERING_PARAM
 

Functions

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 request_frame (AVFilterLink *outlink)
 
static const AVClassresample_child_class_next (const AVClass *prev)
 
static voidresample_child_next (void *obj, void *prev)
 

Variables

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 272 of file af_aresample.c.

Definition at line 273 of file af_aresample.c.

Function Documentation

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

Definition at line 46 of file af_aresample.c.

static av_cold void uninit ( AVFilterContext ctx)
static

Definition at line 73 of file af_aresample.c.

static int query_formats ( AVFilterContext ctx)
static

Definition at line 79 of file af_aresample.c.

static int config_output ( AVFilterLink outlink)
static

Definition at line 126 of file af_aresample.c.

static int filter_frame ( AVFilterLink inlink,
AVFrame insamplesref 
)
static

Definition at line 172 of file af_aresample.c.

static int request_frame ( AVFilterLink outlink)
static

Definition at line 221 of file af_aresample.c.

static const AVClass* resample_child_class_next ( const AVClass prev)
static

Definition at line 261 of file af_aresample.c.

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

Definition at line 266 of file af_aresample.c.

Variable Documentation

const AVOption options[]
static
Initial value:
= {
{"sample_rate", NULL, OFFSET(sample_rate_arg), AV_OPT_TYPE_INT, {.i64=0}, 0, INT_MAX, FLAGS },
{NULL}
}

Definition at line 275 of file af_aresample.c.

const AVClass aresample_class
static
Initial value:
= {
.class_name = "aresample",
.item_name = av_default_item_name,
.option = options,
.child_class_next = resample_child_class_next,
}

Definition at line 280 of file af_aresample.c.

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

Definition at line 289 of file af_aresample.c.

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

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

Definition at line 308 of file af_aresample.c.