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

Go to the source code of this file.

Data Structures

struct  ChannelStats
 
struct  DRMeterContext
 

Macros

#define OFFSET(x)   offsetof(DRMeterContext, x)
 
#define FLAGS   AV_OPT_FLAG_AUDIO_PARAM|AV_OPT_FLAG_FILTERING_PARAM
 
#define SQR(a)   ((a)*(a))
 

Functions

 AVFILTER_DEFINE_CLASS (drmeter)
 
static int query_formats (AVFilterContext *ctx)
 
static int config_output (AVFilterLink *outlink)
 
static void finish_block (ChannelStats *p)
 
static void update_stat (DRMeterContext *s, ChannelStats *p, float sample)
 
static int filter_frame (AVFilterLink *inlink, AVFrame *buf)
 
static void print_stats (AVFilterContext *ctx)
 
static av_cold void uninit (AVFilterContext *ctx)
 

Variables

static const AVOption drmeter_options []
 
static const AVFilterPad drmeter_inputs []
 
static const AVFilterPad drmeter_outputs []
 
AVFilter ff_af_drmeter
 

Macro Definition Documentation

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

Definition at line 46 of file af_drmeter.c.

Definition at line 47 of file af_drmeter.c.

#define SQR (   a)    ((a)*(a))

Definition at line 157 of file af_drmeter.c.

Referenced by print_stats().

Function Documentation

AVFILTER_DEFINE_CLASS ( drmeter  )
static int query_formats ( AVFilterContext ctx)
static

Definition at line 56 of file af_drmeter.c.

static int config_output ( AVFilterLink outlink)
static

Definition at line 86 of file af_drmeter.c.

static void finish_block ( ChannelStats p)
static

Definition at line 99 of file af_drmeter.c.

Referenced by print_stats(), and update_stat().

static void update_stat ( DRMeterContext s,
ChannelStats p,
float  sample 
)
static

Definition at line 117 of file af_drmeter.c.

Referenced by filter_frame().

static int filter_frame ( AVFilterLink inlink,
AVFrame buf 
)
static

Definition at line 128 of file af_drmeter.c.

static void print_stats ( AVFilterContext ctx)
static

Definition at line 159 of file af_drmeter.c.

Referenced by uninit().

static av_cold void uninit ( AVFilterContext ctx)
static

Definition at line 197 of file af_drmeter.c.

Variable Documentation

const AVOption drmeter_options[]
static
Initial value:
= {
{ "length", "set the window length", OFFSET(time_constant), AV_OPT_TYPE_DOUBLE, {.dbl=3}, .01, 10, FLAGS },
{ NULL }
}
#define NULL
Definition: coverity.c:32
#define OFFSET(x)
Definition: af_drmeter.c:46
#define FLAGS
Definition: af_drmeter.c:47

Definition at line 49 of file af_drmeter.c.

const AVFilterPad drmeter_inputs[]
static
Initial value:
= {
{
.name = "default",
.filter_frame = filter_frame,
},
{ NULL }
}
#define NULL
Definition: coverity.c:32
static int filter_frame(AVFilterLink *inlink, AVFrame *buf)
Definition: af_drmeter.c:128

Definition at line 206 of file af_drmeter.c.

const AVFilterPad drmeter_outputs[]
static
Initial value:
= {
{
.name = "default",
.config_props = config_output,
},
{ NULL }
}
#define NULL
Definition: coverity.c:32
static int config_output(AVFilterLink *outlink)
Definition: af_drmeter.c:86

Definition at line 215 of file af_drmeter.c.

AVFilter ff_af_drmeter
Initial value:
= {
.name = "drmeter",
.description = NULL_IF_CONFIG_SMALL("Measure audio dynamic range."),
.query_formats = query_formats,
.priv_size = sizeof(DRMeterContext),
.priv_class = &drmeter_class,
}
#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 inputs[]
Definition: af_acontrast.c:193
static const AVFilterPad outputs[]
Definition: af_acontrast.c:203
static int query_formats(AVFilterContext *ctx)
Definition: af_drmeter.c:56
static const AVFilterPad drmeter_inputs[]
Definition: af_drmeter.c:206
static av_cold void uninit(AVFilterContext *ctx)
Definition: af_drmeter.c:197
static const AVFilterPad drmeter_outputs[]
Definition: af_drmeter.c:215

Definition at line 224 of file af_drmeter.c.