FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
af_asetrate.c File Reference
#include "libavutil/opt.h"
#include "avfilter.h"
#include "internal.h"

Go to the source code of this file.

Data Structures

struct  ASetRateContext
 

Macros

#define CONTEXT   ASetRateContext
 
#define FLAGS   AV_OPT_FLAG_AUDIO_PARAM|AV_OPT_FLAG_FILTERING_PARAM
 
#define OPT_GENERIC(name, field, def, min, max, descr, type, deffield,...)
 
#define OPT_INT(name, field, def, min, max, descr,...)   OPT_GENERIC(name, field, def, min, max, descr, INT, i64, __VA_ARGS__)
 

Functions

 AVFILTER_DEFINE_CLASS (asetrate)
 
static av_cold int query_formats (AVFilterContext *ctx)
 
static av_cold int config_props (AVFilterLink *outlink)
 
static int filter_frame (AVFilterLink *inlink, AVFrame *frame)
 

Variables

static const AVOption asetrate_options []
 
static const AVFilterPad asetrate_inputs []
 
static const AVFilterPad asetrate_outputs []
 
AVFilter avfilter_af_asetrate
 

Macro Definition Documentation

#define CONTEXT   ASetRateContext

Definition at line 31 of file af_asetrate.c.

Definition at line 32 of file af_asetrate.c.

#define OPT_GENERIC (   name,
  field,
  def,
  min,
  max,
  descr,
  type,
  deffield,
  ... 
)
Value:
{ name, descr, offsetof(CONTEXT, field), AV_OPT_TYPE_ ## type, \
{ .deffield = def }, min, max, FLAGS, __VA_ARGS__ }

Definition at line 34 of file af_asetrate.c.

#define OPT_INT (   name,
  field,
  def,
  min,
  max,
  descr,
  ... 
)    OPT_GENERIC(name, field, def, min, max, descr, INT, i64, __VA_ARGS__)

Definition at line 38 of file af_asetrate.c.

Function Documentation

AVFILTER_DEFINE_CLASS ( asetrate  )
static av_cold int query_formats ( AVFilterContext ctx)
static

Definition at line 49 of file af_asetrate.c.

static av_cold int config_props ( AVFilterLink outlink)
static

Definition at line 59 of file af_asetrate.c.

static int filter_frame ( AVFilterLink inlink,
AVFrame frame 
)
static

Definition at line 79 of file af_asetrate.c.

Variable Documentation

const AVOption asetrate_options[]
static
Initial value:
= {
OPT_INT("sample_rate", sample_rate, 44100, 1, INT_MAX, "set the sample rate"),
OPT_INT("r", sample_rate, 44100, 1, INT_MAX, "set the sample rate"),
{NULL},
}

Definition at line 41 of file af_asetrate.c.

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

Definition at line 92 of file af_asetrate.c.

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

Definition at line 101 of file af_asetrate.c.

AVFilter avfilter_af_asetrate
Initial value:
= {
.name = "asetrate",
.description = NULL_IF_CONFIG_SMALL("Change the sample rate without "
"altering the data."),
.query_formats = query_formats,
.priv_size = sizeof(ASetRateContext),
.priv_class = &asetrate_class,
}

Definition at line 110 of file af_asetrate.c.