FFmpeg
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

#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__ }
#define FLAGS
Definition: af_asetrate.c:32
GLint GLenum type
Definition: opengl_enc.c:104
#define max(a, b)
Definition: cuda_runtime.h:33
it s the only field you need to keep assuming you have a context There is some magic you don t need to care about around this field
#define CONTEXT
Definition: af_asetrate.c:31
float min
const char * name
Definition: opengl_enc.c:102

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 58 of file af_asetrate.c.

static int filter_frame ( AVFilterLink inlink,
AVFrame frame 
)
static

Definition at line 78 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},
}
#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.

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.

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.

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 outputs[]
Definition: af_acontrast.c:203
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 at line 109 of file af_asetrate.c.