FFmpeg  4.0
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 ff_af_asetrate
 

Macro Definition Documentation

◆ CONTEXT

#define CONTEXT   ASetRateContext

Definition at line 31 of file af_asetrate.c.

◆ FLAGS

Definition at line 32 of file af_asetrate.c.

◆ OPT_GENERIC

#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__ }
const char * name
Definition: avisynth_c.h:775
#define FLAGS
Definition: af_asetrate.c:32
#define CONTEXT
Definition: af_asetrate.c:31
cl_device_type type
float min

Definition at line 34 of file af_asetrate.c.

◆ OPT_INT

#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()

AVFILTER_DEFINE_CLASS ( asetrate  )

◆ query_formats()

static av_cold int query_formats ( AVFilterContext ctx)
static

Definition at line 49 of file af_asetrate.c.

◆ config_props()

static av_cold int config_props ( AVFilterLink outlink)
static

Definition at line 58 of file af_asetrate.c.

◆ filter_frame()

static int filter_frame ( AVFilterLink inlink,
AVFrame frame 
)
static

Definition at line 78 of file af_asetrate.c.

Variable Documentation

◆ asetrate_options

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},
}
#define NULL
Definition: coverity.c:32
sample_rate
#define OPT_INT(name, field, def, min, max, descr,...)
Definition: af_asetrate.c:38

Definition at line 41 of file af_asetrate.c.

◆ asetrate_inputs

const AVFilterPad asetrate_inputs[]
static
Initial value:
= {
{
.name = "default",
.filter_frame = filter_frame,
},
{ NULL }
}
#define NULL
Definition: coverity.c:32
static int filter_frame(AVFilterLink *inlink, AVFrame *frame)
Definition: af_asetrate.c:78

Definition at line 91 of file af_asetrate.c.

◆ asetrate_outputs

const AVFilterPad asetrate_outputs[]
static
Initial value:
= {
{
.name = "default",
.config_props = config_props,
},
{ NULL }
}
#define NULL
Definition: coverity.c:32
static av_cold int config_props(AVFilterLink *outlink)
Definition: af_asetrate.c:58

Definition at line 100 of file af_asetrate.c.

◆ ff_af_asetrate

AVFilter ff_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,
}
static const AVFilterPad asetrate_inputs[]
Definition: af_asetrate.c:91
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:186
static const AVFilterPad asetrate_outputs[]
Definition: af_asetrate.c:100
static av_cold int query_formats(AVFilterContext *ctx)
Definition: af_asetrate.c:49
static const AVFilterPad inputs[]
Definition: af_acontrast.c:193
static const AVFilterPad outputs[]
Definition: af_acontrast.c:203

Definition at line 109 of file af_asetrate.c.